Please help :(
dy/dx = 5x Use Euler's method to approximate y when x = 1 with 4 steps
Euler's method states that \[ y_{k+1}=y_k+h\times f(x_k,y_k) \]
information missing: \(y(0)=?\)
step size: \[h = \frac{b-a}{n}={1\over4}=0.25\]
y(0) = 5!!!
and \[f(x,y)=5x\]
ok.. we start from k=0 0) \[k=0\\ x_0=0\qquad y_0=5\\ y_1=y_0+h\times f(x_0,y_0)=5+0.25\times(5\times0)\\ x_1=x_0+h=0+0.25=0.25 \]
1)\[ k=1\\ y_2=y_1+h\times f(x_1,y_1)=5+0.25\times(5\times0.25)=5.3125\\ x_2=x_1+h=0.25+0.25=0.5 \]
3)\[ k=2\\ y_3=y_2+h\times f(x_2,y_2)=5.3125+0.25\times(5\times0.5)=5.9375\\ x_3=x_2+h=0.5+0.25=0.75 \]
and you continue two more times
how did you find the step size? if it says like 2 steps then would the h value be 1/2 ?
no. step size = (final x - initial x) / number of steps
oh..didn't you get 1/4 by doing 1-0 / 4?
yep
oh ok. but do you know what it means if a problem says to solve a DE with an initial condition for [0,1] using 10 subintervals? how would you find the h value then?
what it means is 1) (0,1) -> \(y(x=0)=1\) 2) n = 10 -> number of steps
but it already says the initial condition is y(0) = 5?? ?? sorry the whole problem basically says use euler's method to solve this DE with y(0) = 5, for [0,1] using 10 subintervals so what does that meannn
then the ew h becomes\[h=(1-0)/10=0.1\] and find \[y_1,y_2,\ldots,y_{10}\]
Note that the exact solution for the given DE is: \(\Large y(x)={5\over2}(x^2+2)\) the correct \(y(1)=7.5\) the smaller the step size, the accurate your answer would be.
Join our real-time social learning platform and learn together with your friends!