Am I doing a step size for DE correctly? (made up my own example)
With the following Differential Equation: \(\large\displaystyle\frac{dy}{dx}=x^2+2y\) given that y(0)=1, what is y(8) ?
wait, I forgot the formula for step size...
hey, can you start me with the first step, with stepsize 1 ?
(stepsize, h=1 )
are you doing eulers method
Yes. ok, I am really not sure, but I will try. I am given a point (0,1) the slope at this point is 0^2+2(1) = 2 So, my next point is: (0+1 , 1 * 2 * 1) (1,2)
is this correct?
it should be (1, 1 + 1*2) = (1,3)
y sub (n-1) + (dy/dx at the point of y sub (n-1) ) * (step size) = y(sub n) ?
$$ \Large \rm { \frac{dy}{dx}= f(x,y)\\ y_{n+1}= y_n + h \cdot f_n \\~\\ \\ y_0 = 1 \\ y_1 = 1 + 1\cdot f_0= 1 + 1\cdot f(0,1)= 1 + 1\cdot 2 = 3 } $$
y(2)=2 + 1*(1^2 + 2*2) = 2 + 1*(5) = 7
oh, the very first 2 should be a 3
then y(2)=8
then y(3)=8+1*(2^2 + 2*3)=8+10=18
don't know why I am struggling, but tnx for taking your time to help me. I will read my book more.
All I needed is \(\displaystyle \Large \rm y_n=y_{n-1}+h~F(x_{n-1},y_{n-1})\) tnx again
y(2)=3 + 1*(1^2 + 2*3) = 3+7 = 10
Join our real-time social learning platform and learn together with your friends!