Shooting Method Boundary Problem

In summary, you are trying to solve a second order differential equation with initial conditions y(0) = 1 and y'(0) = a. The second order differential equation has two first order differential equations as derivatives. You are trying to solve for y(5) + y'(5) using the parameter 'a'.
  • #1
perlawin
3
0

Homework Statement



y"+xy'=cos(2x), y(0)=1, y'(5)+2y(5)=10

Homework Equations





The Attempt at a Solution



I am trying to solve this using matlab. I split the 2nd order d.e. into 2 first order d.e.'s. I set y1=y, and y2= dy/dx. Thus dy1/dx=y2 and dy2/dx= cos(2x)-x*y2. Then dy/dt= [y2; cos(2x)-x*y2].

X spans from 0 to 5, which comes easily from the problem.
I know that y1(0)= 0 easily.

I cannot fathom what to make of the second initial condition. I thought of integrating dy2/dx but I can't get an answer. I really have no idea where I should go.
 
Physics news on Phys.org
  • #2
You could find the Greens function for it?
First make sure your BC.S are homogeneous. I use L to represent the operator i.e. differentiate twice plus x time diff. once :
[itex]\hat{L}y_{total}= \hat{L}\{\phi + y_{homogen}\} = \cos(2x)\\
\hat{L}\phi = \hat{L}\{y_{total} - y_{hom}\}
[/itex]
By definition the total solution and the homogeneous sol. have the inhomogeneous BCS so the particular solution phi has homogeneous.
So if you use Greens then the solution is [itex] y_{total} = y_{homogen} +\int\limits_{0}^5 f(x')G(x,x')\,\text{d}x'[/itex]
 
  • #3
perlawin said:

Homework Statement



y"+xy'=cos(2x), y(0)=1, y'(5)+2y(5)=10

Homework Equations





The Attempt at a Solution



I am trying to solve this using matlab. I split the 2nd order d.e. into 2 first order d.e.'s. I set y1=y, and y2= dy/dx. Thus dy1/dx=y2 and dy2/dx= cos(2x)-x*y2. Then dy/dt= [y2; cos(2x)-x*y2].

X spans from 0 to 5, which comes easily from the problem.
I know that y1(0)= 0 easily.

I cannot fathom what to make of the second initial condition. I thought of integrating dy2/dx but I can't get an answer. I really have no idea where I should go.

If you are working "analytically", just solve the problem using initial conditions y(0) = 1 and y'(0) = a, an unknown constant. Now solve the DE out to x = 5 and write y(5) + y'(5) in terms of your parameter 'a'. If you are working purely numerically you can do something similar, starting with a trial value of y'(0) and seeing what happens at x = 5, then adjusting the value of y'(0) up or down as needed (using methods available in the literature to figure out what to do).

RGV
 

FAQ: Shooting Method Boundary Problem

What is the Shooting Method Boundary Problem?

The Shooting Method Boundary Problem is a mathematical technique used to solve boundary value problems in differential equations. It involves converting the problem into an initial value problem and iteratively adjusting the initial conditions until the desired boundary conditions are satisfied.

How does the Shooting Method work?

The Shooting Method involves selecting an initial guess for the solution and then solving the corresponding initial value problem. The resulting solution is then compared to the desired boundary conditions, and the initial guess is adjusted if necessary. This process is repeated until the solution converges to the desired boundary conditions within a specified tolerance.

What types of problems can be solved using the Shooting Method?

The Shooting Method can be used to solve a wide range of boundary value problems in differential equations, including linear and nonlinear problems. It is particularly useful for problems with non-constant boundary conditions or where other methods, such as finite difference or finite element, may be difficult to apply.

What are the advantages of using the Shooting Method?

The Shooting Method has several advantages, including its versatility in solving a wide range of boundary value problems, its ability to handle non-constant boundary conditions, and its relatively simple implementation. It also tends to have better convergence properties compared to other numerical methods.

What are the limitations of the Shooting Method?

One limitation of the Shooting Method is that it can be computationally expensive, especially for highly nonlinear problems. It also requires a good initial guess for the solution in order to converge to the desired solution. Additionally, it may not be suitable for problems with discontinuous boundary conditions or singularities.

Back
Top