Can Euler's Method Be Used to Approximate Nonlinear Differential Equations?

  • Thread starter Thread starter Nusc
  • Start date Start date
  • Tags Tags
    Method
Nusc
Messages
752
Reaction score
2

Homework Statement


y''=2y'-y+x*exp(x)
0<=x<=2 y(0)=0 , y(2)=-4, h = 0.2
Approximate the solution using Euler's method

Homework Equations





The Attempt at a Solution



So we'll have two guesses
y1''=2*y1'-y1'+x*exp(x)-x y1(0)=0,
y2''=2*y2'-y2'+x*exp(x)-x y2(0)=0,
y=a1*y1+a2*y2
So i need to find the coefficients

What boundary conditions do I require? y1'(0)=? y2'(0)= ?
 
Physics news on Phys.org
Pick two random values for y1'(0) and y2'(0). This will give you two solutions to the ODE.
Then y = a*y1 + b*y2 is also a solution.
You know that y1(0)=0 and y(2) =0, so ay1(0)+by2(0)=0. So fix a = 1, and pick b such that y1(2) + b*y2(2) = y(2).
So b = (y(2) - y1(2)) / y2(2), where y1(2) and y2(2) are the result of shooting with arbitrary guesses for y1'(0) and y2'(0).
 
Okay so say if I choose y1'(0)=1 and y2'(0)=2

y'=ay1'+by2' =>
y'(0)=a*(1)+b*(2)=0
=> a=-2*b

y(2)=-(2*b)*y1(2)+b*y2(2)=-4
-2y1(2)+y2(2)=-4/b

y2(2)=-4/b +2y1(2)

b=(-4-y1(2))/(-4/b+2y1(2))

b(-4/b+2y1(2)=-4-y1(2)

=> 3by1(2)=0
b or y1(2) is 0.

This correct so far?
 
Last edited:
Prove $$\int\limits_0^{\sqrt2/4}\frac{1}{\sqrt{x-x^2}}\arcsin\sqrt{\frac{(x-1)\left(x-1+x\sqrt{9-16x}\right)}{1-2x}} \, \mathrm dx = \frac{\pi^2}{8}.$$ Let $$I = \int\limits_0^{\sqrt 2 / 4}\frac{1}{\sqrt{x-x^2}}\arcsin\sqrt{\frac{(x-1)\left(x-1+x\sqrt{9-16x}\right)}{1-2x}} \, \mathrm dx. \tag{1}$$ The representation integral of ##\arcsin## is $$\arcsin u = \int\limits_{0}^{1} \frac{\mathrm dt}{\sqrt{1-t^2}}, \qquad 0 \leqslant u \leqslant 1.$$ Plugging identity above into ##(1)## with ##u...
Back
Top