Warning: Unable to find explicit solution.

I was trying to use dsolve for a system of ODE's (line 19 is the dsolve function)
  1. d(Ca)/d(t)=-(k*ca*cb)-(vo*ca)/(Vo+vo*t)
  2. d(Cb)/d(t)=-(k*ca*cb)+(vo(cbo-cb))/(Vo+vo*t)
  3. d(Cc)/d(t)=(k*ca*cb)-(vo*cc)/(Vo+vo*t)
  4. d(Cd)/d(t)=(k*ca*cb)-(vo*cd)/(Vo+vo*t)
k=2.2;
vo=0.05;
cbo=0.025;
Vo=5;
cao=0.05;
tspam=0:100:500;
syms cb(t) ca(t) cc(t) cd(t)
s=dsolve(diff(ca)==-(k*ca*cb)-(vo*ca)/(Vo+vo*t),diff(cb)==-(k*ca*cb)+(vo*(cbo-cb))/(Vo+vo*t),diff(cc)==(k*ca*cb)-(vo*cc)/(Vo+vo*t),diff(cd)==(k*ca*cb)-(vo*cd)/(Vo+vo*t),cc(0)==0,cd(0)==0,ca(0)==cao,cb(0)==cbo);
Warning: Unable to find explicit solution.
> In dsolve (line 201)
In Ejercicio4_29 (line 19)

Respuestas (1)

madhan ravi
madhan ravi el 11 de Abr. de 2019
dsolve() is not able to solve the problem so use ode45() instead:
k=2.2;
vo=0.05;
cbo=0.025;
Vo=5;
cao=0.05;
% tspam=0:100:500; %%?
syms cb(t) ca(t) cc(t) cd(t)
eq1 = diff(ca)==-(k*ca*cb)-(vo*ca)/(Vo+vo*t);
eq2 = diff(cb)==-(k*ca*cb)+(vo*(cbo-cb))/(Vo+vo*t);
eq3 = diff(cc)==(k*ca*cb)-(vo*cc)/(Vo+vo*t);
eq4 = diff(cd)==(k*ca*cb)-(vo*cd)/(Vo+vo*t);
vars = [cb(t); ca(t); cc(t); cd(t)];
V = odeToVectorField([eq1,eq2,eq3,eq4])
M = matlabFunction(V,'vars', {'t','Y'})
interval = [0 1.5]; %time interval
y0 = [cao cbo 0 0]; %initial conditions
ySol = ode45(M,interval,y0);
tValues = linspace(interval(1),interval(2),1000);
yValues = deval(ySol,tValues,1); %number 1 denotes first solution likewise you can mention 2 , 3 & 4 for the next two solutions
plot(tValues,yValues)

3 comentarios

Gabriela Tezanos Pinto
Gabriela Tezanos Pinto el 11 de Abr. de 2019
First: Thank you so much for giving me a little or your time!!
it works for the first value but for the other it doesn`t. It`s supossed to be like the figure down hereWhatsApp Image 2019-04-11 at 1.00.42 AM.jpeg
madhan ravi
madhan ravi el 11 de Abr. de 2019
Upload your equations in latex form and the initial conditions.
Gabriela Tezanos Pinto
Gabriela Tezanos Pinto el 11 de Abr. de 2019
I'm sorry I don't understand, how do i change them to that latex form?.

Iniciar sesión para comentar.

Etiquetas

Preguntada:

el 11 de Abr. de 2019

Comentada:

el 11 de Abr. de 2019

Community Treasure Hunt

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

Start Hunting!

Translated by