Shooting Method Boundary Problem

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
2 replies · 2K views
perlawin
Messages
3
Reaction score
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
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)\\<br /> \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]
 
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