dsolve unable to find a solution

9 visualizaciones (últimos 30 días)
Sam K
Sam K el 8 de Abr. de 2018
Comentada: Walter Roberson el 8 de Abr. de 2018
Hi, I need to find a solution for the differential equation (image attached), where theta, gamma and M are parameters. I am trying to solve the equations using dsolve (code attached). It returns an error "Warning: Unable to find explicit solution." Am I doing something wrong or should I use a different ode solver for this equation? Please help! Thanks!

Respuesta aceptada

Sam K
Sam K el 8 de Abr. de 2018
Sorry about the confusion about the notation. The superscript "T" in my model is not the transpose. The notation denotes the type of source in my model, which is irrelevant to my question here. So, please ignore the superscript "T".
  2 comentarios
Walter Roberson
Walter Roberson el 8 de Abr. de 2018
In any case you have QT multiplied by something in the image but evaluated at something instead of multiplied in the code.
Walter Roberson
Walter Roberson el 8 de Abr. de 2018
>> syms theta lambda M
>> a = (1 - theta/exp(lambda*M));
>> syms Q(t)
>> eqn = diff(Q,t) == Q*a;
cond = Q(0) == 400;
qSol(t) = dsolve(eqn,cond)
qSol(t) =
400*exp(-t*exp(-M*lambda)*(theta - exp(M*lambda)))

Iniciar sesión para comentar.

Más respuestas (2)

Walter Roberson
Walter Roberson el 8 de Abr. de 2018
Your image shows Q transpose multiplied by something, but your function has Q evaluated at something not multiplied.

Sam K
Sam K el 8 de Abr. de 2018
Editada: Sam K el 8 de Abr. de 2018
Hi walter,
Thank you for helping me out with this. I see your point. I guess that is part of my confusion on how to write the code. My equation for Q, as shown in the picture, is: dQ/dt = Q*a, where a is the parameters in the parentheses. I need to plot this equation based on the initial value of Q. I thought dsolve would be a good solver, but I must be doing something wrong with the code since I am a newbie to Matlab coding. Should I change the code as follows:
a = (1 - theta/exp(lambda*M));
syms Q(t) a
eqn = diff(Q,t) == Q*a;
cond = Q(0) == 400;
qSol(t) = dsolve(eqn,cond);

Categorías

Más información sobre Mathematics en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by