Dsolve for two point boundary value problem

Can dsolve of Matlab 2019a solve the following system of differential equations (BVP):
Capture.PNG
With the following BC:
Capture2.PNG
(T= 60)
I tried to insert it like this:
xlambdasol = dsolve(eqns, cond)
with eqns and cond being the above specified expressions but I get the output:
Warning: Unable to find explicit solution.
> In dsolve (line 201)
In inner_minimization_problem_mfile (line 294)
So I guess it can not. Why is that? What is the method used in dsolve?

9 Commenti

Torsten
Torsten il 25 Giu 2019
Modificato: Torsten il 25 Giu 2019
Use bvp4c instead of dsolve.
Your problem is much too difficult to be solved analytically.
By the way: what is "e" in your equations ?
I did infact do that.
Do you know a way to specify inequality constraints along the trajectory of the state variable (x_i) with bvp4c?
Because I obtain a solution but with complex values because of sqrt(x_i) so I want to constrain the solution to:
x_i >= 0
Torsten
Torsten il 25 Giu 2019
Modificato: Torsten il 25 Giu 2019
You have 12 ODEs in 12 unknowns with 12 boundary conditions. This should give a unique solution. So you can't put constraints on it.
What you could try is to evaluate sqrt(x1-x2), sqrt(x2-x3) and sqrt(xi) as sqrt(abs(x1-x2)), sqrt(abs(x2-x3)) and sqrt(abs(xi)) and check whether your final solution satisfies x1 >= x2, x2 >= x3 and xi >= 0.
Torsten, aren't the ODEs nonlinear enough to potentially have multiple solutions?
Maybe, but how to sort out complex solutions in a way different from what I suggested ?
My guess is that they have no physical meaning for the problem at hand.
Torsten, you are absolutely right of course I forgot to include the constraints in the original problem from which I derived this BVP.
So I tried to solve the BVP numerically but I get the error message
Error using bvp4c (line 251)
Unable to solve the collocation equations -- a singular Jacobian encountered.
Error in bvp_solution (line 8)
sol4c = bvp4c(@bvpfcn, @bcfcn, solinit, opts);
Though I made sure that my Jacobians are allright with a case distinction. Furthermore I am actually checking if the Jacobian is singular by calculating the conditioning number like this
cond(dfdt)
det(dfdt)
with dfdt being the jacobian of the system dynamics. The conditioning number is at 1.9161e+05. The determinant at -0.0705. Is that singular already?
I went a bit into bvp4c.m and saw that the error is raised due to
if any(wt == 0) || ~all(isfinite(nonzeros(dPHIdy)))
singularJacobian = true;
else
Where any(wt == 0) evaluates to true.
I am missing the understanding of what this means? Can you help me further here?
Did you try using bvp5c?
Yes I did and it is giving a solution now. There was still something wrong in my BCs.
Little follow up question:
And tried to apply it to my case setting as "internal" boundaries the points where my functions are discontinuous (where the discontinuity depends on the states (dependent variables) of my equations). And there is the problem already, my states are not the independent variable of the problem. The time t is my independent variable. So I cannot really treat those equations as a multipoint BVP since I can not state the time (independent variable) at which the discontinuouties (= region boundary) will appear?
Is that right or is there another way?
Paragraph of the tutorial I am referring to:
Form Initial Guess
For multipoint BVPs, the boundary conditions are automatically applied at the beginning and end of the interval of integration. However, you must specify double entries in xmesh for the other interface points. A simple guess that satisfies the boundary conditions is the constant guess y = [1; 1].
xc = 1;
xmesh = [0 0.25 0.5 0.75 xc xc 1.25 1.5 1.75 2];
yinit = [1; 1];
sol = bvpinit(xmesh,yinit);
If you implement a shooting method (e.g. by combining "ode45" for the forward integration and "fsolve" to adjust the missing boundary conditions at t=0), you could use the "event" facility of the ODE solvers to interrupt integration when a state-dependent discontinuity appears.
When you use "bvp4c", this is not possible since you solve the complete problem on a predefined t-mesh. The only thing you could try is using "if"-statements to handle the discontinuities.

Accedi per commentare.

Risposte (0)

Prodotti

Release

R2019a

Richiesto:

il 25 Giu 2019

Commentato:

il 28 Giu 2019

Community Treasure Hunt

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

Start Hunting!

Translated by