Shooting Method Boundary Problem

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 :
\hat{L}y_{total}= \hat{L}\{\phi + y_{homogen}\} = \cos(2x)\\<br /> \hat{L}\phi = \hat{L}\{y_{total} - y_{hom}\}<br />
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 y_{total} = y_{homogen} +\int\limits_{0}^5 f(x&#039;)G(x,x&#039;)\,\text{d}x&#039;
 
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
 
There are two things I don't understand about this problem. First, when finding the nth root of a number, there should in theory be n solutions. However, the formula produces n+1 roots. Here is how. The first root is simply ##\left(r\right)^{\left(\frac{1}{n}\right)}##. Then you multiply this first root by n additional expressions given by the formula, as you go through k=0,1,...n-1. So you end up with n+1 roots, which cannot be correct. Let me illustrate what I mean. For this...
Back
Top