Implicit Boundary Value Problem

Is there a way in Matlab to use the bvp4c or bvp5c functions to solve a system consisting of boundary value and algebraic equations where the deifinction of at least one of the derivatives is implicit?
The system looks somewhat like this:
dY(1)/dx=a
dY(2)/dx=f(Y(1),Y(3))
g(Y(2),Y(3))*[dY(1)/dx]+h(Y(2),Y(3))=0
B.C.:
yb(1)=0
ya(2)=ya(3)=0
where a and K are constants and f, g, h and j are functions relating Y(1) and Y(3) to each other. Naturally, the boundary conditions are known.

8 comentarios

J. Alex Lee
J. Alex Lee el 27 de Feb. de 2020
Are you sure about the equations themselves? In this particular case, can't you just divide Eq.2 by f and Eq.3 by h to put dY2/dx on the LHS? In which case you have 2 disparate expressions for the same variable Y2...
Saeid
Saeid el 27 de Feb. de 2020
Your're right, Alex. That was a bit confusing I guess. So I updated the more realistic version. Is the problem solvable now?
darova
darova el 27 de Feb. de 2020
What are functions f() and g()? Is it possible to express Y(3)?
g(Y(2),Y(3))*[dY(1)/dx]+h(Y(2),Y(3))=0
Saeid
Saeid el 27 de Feb. de 2020
dY1/dx=a
dy2/dx=y1/(-b*y1^2+y3+c)
And y3 is the root of the quadratic equation:
y3^2+c*y3+b*c*y1^2
Where a, b, c and d are constants.
darova
darova el 27 de Feb. de 2020
I think it's possible to solve such system of equations.
Can you attach the whole code? Do you have any attempts?
darova
darova el 27 de Feb. de 2020
But as soon as possible
Saeid
Saeid el 27 de Feb. de 2020
Actually, I mispromised, and I don't have the code (I was inbetween mesages, sorry)!
The point is, I don't know how to formulate a problem with two BVPs and one algebraic equation. Apparently the ode15i function allows this for the case of PDE with only initial values, but I couldn't find any sources for BVPs.
darova
darova el 27 de Feb. de 2020
Please attach the functions

Iniciar sesión para comentar.

 Respuesta aceptada

J. Alex Lee
J. Alex Lee el 27 de Feb. de 2020

0 votos

Ok, so looks like what you are after is solving a DAE that has BCs at more than one boundary.
Docs say it is ode15s and ode23t that are capable of handling DAE (not ode15i; https://www.mathworks.com/help/matlab/math/solve-differential-algebraic-equations-daes.html)
It seems Matlab does not have built-in functionality to address directly (https://www.mathworks.com/matlabcentral/answers/478652-solving-bvp-for-dae-in-matlab)
This system seems simple enough to use a shooting strategy, I think. You have 3 different boundary locations, so you can treat the problem as if it were an IVP leaving 2 guesses for 2 out of 3 of the Y's at x=0 as guesses (not sure which ones, you are mixing a's, b's, and 1,2,3's), use either of the odeXX (with appropriate handling of the algebraic equation), and you will get some values for the Y's at the 2 other boundaries in the course of integration. Their deviations from your actual BCs will become residuals for a 2-variable root finding.

Más respuestas (0)

Productos

Preguntada:

el 27 de Feb. de 2020

Comentada:

el 28 de Feb. de 2020

Community Treasure Hunt

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

Start Hunting!

Translated by