Solve the differential equation dy/dx =xy with the initial condition y(0) = 3. Use the solution to find the actual value of y(2). I found its estimate value to be 9.84. How do I find the actual value?
it is seperable right?
Yes
dy/y = x dx ln(y) = x^2/2 + C y = Ce^(x^2/2) y=3 when x=0 3 = C y = 3e^(x^2/2)
let x=2 and solve for y
how did you determine the estimate?
initial x = 0 Y(0) = 3 delta y = x y delta x = (0)(3)(.5) = 0 so y(.5) = 3 + 0 = 3 Y(.5) = 3 delta y = (.5)(3)(.5) = .75 Y(1) = 3 + .75 = 3.75 Y(1) = 3.75 delta y = 1 (3.75)(.5) = 1.875 Y(1.5) = 3.75+1.875 = 5.625 Y(1.5) = 5.625 delta y = 1.5(5.625).5 = 4.22 Y(2) = 5.625 + 4.22 = 9.84
a .5 step ... was curious :)
It was part of a 2 step problem where first you find solve the equation with the step size at 0.5 to estimate y(2) then you have to find the actual value and compare the 2.
But the second part doesn't say anything about the step size.
(0,3): y' = 0: +0/2 (.5,3): y' = 1.5: +1.5/2 (.5,3.75) ... your steps look good the second part is asking you to solve it outright and not by approximations
a) Use Euler's method with step size of 0.5 and the initial condition of y(0) = 3 to estimate y(2). b) Solve the differential equation dy/dx=x y with the initial condition y(0) = 3. Use the solution to find the actual value of y(2).
right.
by using seperation:\[\frac{dx}{dy}=xy\] \[\frac1y ~{dy}=x~dx\] \[\int \frac1y ~{dy}=\int x~dx\] \[ln(y)=\frac 12 x^2+C\] \[e^{ln(y)}=e^{\frac 12 x^2+C}\] \[y=e^{\frac 12 x^2}~e^C\] \[y=Ce^{\frac 12 x^2}\]
when x=0, y=3, C=3: therefore, \[\Large y=3e^{\frac{1}{2}x^2}\]
when x=2, y=3e^2
I got 3e^2 or 22.167. Is this right?
And I don't get why the step sizes are different even though the 9.84 is an estimate and the other is an actual.
when we work the steps we introduce an error each time. instead of following the exact curve, it is more like trying to steer a tank. |dw:1418661651568:dw|
Join our real-time social learning platform and learn together with your friends!