How to solve simulatenous non linear differential equation with coupled boundary conditions ?

1 view (last 30 days)
I am trying to solve two differential equations - y''= exp(y) , 0<x<4 y''= exp(y)-100 -0.5<x<0
The boundary conditions are- y'= 0 at x=-0.5 y'=0 at x=4 y and y' are continuous at x= 0.
I cannot handle the third boundary condition. Anyone can suggest how to approach for the solution ? It will be a great help.

Accepted Answer

Roger Stafford
Roger Stafford on 5 Jun 2013
Edited: Roger Stafford on 5 Jun 2013
It may make things more convenient that the differential equation y" = exp(y) in 0<=x<=4 has an explicit solution. If dy/dx = 0 and y = y1 at x = x1, that solution can be expressed by:
y = y1+log(sec(1/sqrt(2)*exp(y1/2)*(x-x1))^2)
You can verify this by taking the second derivative of this expression and checking that it is identically equal to exp(y). Also it is easy to check that y = y1 and dy/dx = 0 at x = x1.
This means that setting x1 = 4 and making an estimate for y1 will give you y and dy/dx at x = 0 directly in terms of y1 without having to use an 'ode' solver.
Unfortunately I am unaware of an explicit solution for the second differential equation, y" = exp(y)-100. However, it is possible to use the above values of y and dy/dx at x = 0 and run an 'ode' process backwards from x = 0 until dy/dx is zero. At that point you can determine what negative x has been attained. By adjusting the original y1 value it should be possible to eventually find a value for y1 which will result in a dy/dx = 0 right at x = -0.5 .
For this purpose you could construct a function to do all the above processing with an unknown parameter, y1, and use 'fzero' to find the correct value for y1. When you have found it, you have then obtained a function y(x) from x = .5 to x = 4 which satisfies all your conditions.
Note that you should use caution with the estimates made for y1. If it is too large the following 'ode' may never reach a zero value for dy/dx.

More Answers (0)

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!