This repository contains a simple Python program that demonstrates how gradient descent can be applied to approximate the solution of a cubic polynomial.
The general form of the equation is:
[ f(x) = ax^3 + bx^2 + dx + c ]
- Takes user input for coefficients a, b, c, d.
- Generates a random initial value for
x. - Iteratively updates
xusing a gradient-based approach. - Prints the approximate solution after running for a fixed number of epochs.
- Python 3.x
- NumPy
Install dependencies using:
pip install numpy