In: Physics
compute the first three iterations of the gradient ascent algorithm applied to the function f(x) = -0.2 + x + x^2 - 5.5x^3 +4x^4. Assume initial value for x0 = 0.11 and alpha = 0.1.
The formula for gradient ascent alogorithm will be,
Calculating the gradient of the function, we will get the direction of maximum increase as,
Since it only has one direction we will just write it normally without the direction info, Hence we can write the iterative equation as,
Substituting the value of alpha, we can write the equation as,
Now, the first three iterations will be,