Maple Tool 3
This tool is designed to be used with Exercise 19 in Section 5.3.
Enter your formula for the derivative, yprime. Your formula should involve both x and y.
> | yprime:=(x,y)->???; |
The following steps carry out the iteration and plot the numerical solution.
> | n:=10; Delta:=1/n; x:=k->k*Delta; Y := proc(k) |
> | Y(k) := evalf(Y(k-1)+yprime(x(k-1),Y(k-1))*Delta); |
> | end: |
> | Y(0):= 0: solution:=[seq([x(k),Y(k)],k=0..n)]: |
> | solPlot := plot(solution, x=0..1, y=0..1, style=POINT,symbol=circle, color=blue, thickness=2):%; |
> |
Compare the left and right sides of the defining equation at x = 1:
> | sin(1.0)*cos(Y(n)); Y(n); |
> |