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

• Nusc
In summary, the conversation is about using Euler's method to approximate the solution of the differential equation y''=2y'-y+x*exp(x) with boundary conditions y(0)=0 and y(2)=-4, using a step size of h=0.2. The speaker is discussing how to find the coefficients a and b in the equation y=a*y1+b*y2, where y1 and y2 are solutions to the ODE obtained by shooting with arbitrary guesses for y1'(0) and y2'(0). The conversation ends with the speaker suggesting to choose y1'(0)=1 and y2'(0)=2 and solving for b to determine the final solution.
Nusc

## 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

## 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)= ?

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:

## 1. What is the Linear-Shooting Method?

The Linear-Shooting Method is a numerical technique used to solve ordinary differential equations (ODEs). It involves converting the ODE into a system of first-order ODEs, and then solving the system using an initial value problem approach. This method is particularly useful for solving boundary value problems.

## 2. How does the Linear-Shooting Method work?

The Linear-Shooting Method works by converting a second-order ODE into a system of first-order ODEs. This system is then solved using an initial value problem solver, such as the Runge-Kutta method. The initial values for the system are chosen based on the boundary conditions of the original ODE. The solution obtained using this method may be improved by adjusting the initial values and repeating the process.

## 3. When is the Linear-Shooting Method used?

The Linear-Shooting Method is used when solving boundary value problems, particularly for second-order ODEs. It is also commonly used in physics and engineering applications, such as in the study of projectile motion or electrical circuits.

## 4. What are the advantages of using the Linear-Shooting Method?

One advantage of the Linear-Shooting Method is that it can handle a wide range of problems and is applicable to both linear and nonlinear ODEs. It also provides a numerical solution, which can be more accurate than analytical methods in some cases. Additionally, it is relatively simple to implement and can be easily adapted to solve different types of ODEs.

## 5. Are there any limitations to the Linear-Shooting Method?

While the Linear-Shooting Method is a powerful tool for solving ODEs, it does have some limitations. It may not be suitable for problems with highly oscillatory solutions or for stiff systems. Additionally, the accuracy of the solution can be affected by the choice of initial values, and finding suitable initial values can be a time-consuming process.

• Calculus and Beyond Homework Help
Replies
7
Views
625
• Calculus and Beyond Homework Help
Replies
3
Views
517
• Calculus and Beyond Homework Help
Replies
3
Views
1K
• Calculus and Beyond Homework Help
Replies
1
Views
1K
• Calculus and Beyond Homework Help
Replies
6
Views
946
• Calculus and Beyond Homework Help
Replies
18
Views
1K
• Calculus and Beyond Homework Help
Replies
12
Views
2K
• Calculus and Beyond Homework Help
Replies
2
Views
1K
• Calculus and Beyond Homework Help
Replies
9
Views
4K
• Calculus and Beyond Homework Help
Replies
1
Views
1K