Numerical Solution for BVODE without First Derivatives: Help Required

  • Thread starter Thread starter ktsharp
  • Start date Start date
ktsharp
Messages
8
Reaction score
0
I'm intending to solve the following BVODE:

<br /> <br /> \frac{dy}{dx} &amp; = &amp; a + by,<br /> <br />

<br /> <br /> \frac{d^{2}z}{dx^{2}} &amp; = &amp; {\alpha}y\frac{dz}{dx} - \beta +cz\frac{dy}{dx}.<br /> <br />



I have the boundary values for both y and z at x=0, L, however I do NOT have any values for either first derivatives. How can I solve this numerically?
 
Physics news on Phys.org
What numerical methods do you know? It sounds like you are trying to use something like a "Runge-Kutta" which really applies to initial value problems. Typically for a boundary value problem you would use "finite elements". That is, divide the interval from 0 to L into intervals of length h (equal length intervals is simplest but not necessary), then approximate the first derivative by
\frac{z(x_{i+1})- z(x_f)}{h}
and the second derivative by
\frac{z(x_{i+2})- 2f(x_{i+1})+ f(x_i)}{h^2}

That will give a system of equations to solve for z(x_i) and y(x_i).
 
Thank you for your reply!

I am not familiar with the FEM, although I am familiar with finite difference methods, which is what this seems to be as you have written it above, but for an ODE. If I make the above assumption, I will get


<br /> <br /> y_{i+1} = y_{i}(hb+1) + ha.<br /> <br />

<br /> <br /> f(y_{i})z_{i+2} = g(y_{i})z_{i+1} -\beta h^{2} - z_{i}.<br /> <br />

It seems the problem is then what is the BV for z_{i+1}?
 
There is no "boundary condition" for z_{i+1} because you no longer have a differential equation for z_{i+1}.

As a very simple example, suppose you were to use 3 intervals so you need to find y_0, y_1, y_2, y_3, z_0, z_1, z_2, z_3.
Then the left boundary condition gives you values for y_0 and z_0. Those are your first two equations. Then on the three intervals, your differential equation gives 6 equations involving two values of y and z. Finally, your right boundary condition gives two values for y_3 and z_3. That's a total of 8 equations to solve for the 8 values of y and z.
 
Thanks again for your help. So what happens with the nonlinear terms in the second equation?
 
If your differential equations are non-linear, as these are, then the simultaneous equations you get will be non-linear. You might have to use something like Newton's method to solve those.
 
Back
Top