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

  • Thread starter Thread starter Nusc
  • Start date Start date
  • Tags Tags
    Method
Click For Summary
SUMMARY

The discussion focuses on using Euler's method to approximate the solution of the nonlinear differential equation y''=2y'-y+x*exp(x) over the interval 0<=x<=2 with boundary conditions y(0)=0 and y(2)=-4, using a step size of h=0.2. The user proposes two initial guesses for y1 and y2, and outlines a method to find coefficients a and b to satisfy the boundary conditions. The discussion emphasizes the importance of selecting appropriate initial derivatives y1'(0) and y2'(0) to derive valid solutions to the ordinary differential equation (ODE).

PREREQUISITES
  • Understanding of Euler's method for numerical approximation
  • Familiarity with ordinary differential equations (ODEs)
  • Knowledge of boundary value problems and their solutions
  • Basic calculus, including derivatives and exponential functions
NEXT STEPS
  • Study the implementation of Euler's method in numerical analysis
  • Learn about boundary value problem techniques, such as the shooting method
  • Explore the stability and accuracy of numerical methods for ODEs
  • Investigate alternative numerical methods for solving nonlinear differential equations, such as Runge-Kutta methods
USEFUL FOR

Students and professionals in mathematics, engineering, and physics who are working on numerical methods for solving differential equations, particularly those dealing with boundary value problems.

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:

Similar threads

  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
Replies
3
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 12 ·
Replies
12
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
Replies
2
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 9 ·
Replies
9
Views
5K