Use the secant method to find the time at which $y(t) = 0$.

27 Views Asked by At

Hi I need to solve the following exercise.

1)Apply both the Runge-Kutta boostrapping and the Adams-Bashforth method to solve the initial-value problem $y' =\cos(t)+y−y^3$, $y(0)=2$ up to time $t = 6$ using a step-size of $h = 0.1$. Compute the (absolute) error at $t = 6$, given that the exact value is −0.4845092473 (10 dp). What happens to the error if you halve the step size?

2) Use the secant method to find the time at which $y(t) = 0$.

Hint: Find the step i such that y(t) crosses 0 between $t_i$ and $t_{i+1}$. Then find a step size $h_i$ such that $y(t_i + h_i) = 0$.

Note: You should give the estimated values of y for times up to 0.5, and for the final time.

I have already solved the part 1), but I am really struggling with the second one. Any help would be appreciated.