Help solving differential equations
Show older comments
Hello,
I need helping a differential equation using ode45().
I have the following statements and need to find tmax:
A(t) = dA/dt = -k0*A
A(0) = A0
B(t) = dB/dt = k0*A - k1*B
B(0) = 0
E(t) = dE/dt = k1*B
E(0) = 0
k0 = 0.01
k1 = 0.035
2 Comments
Stephan
on 6 May 2022
Please provide the code you have so far.
Juan Lara Alcaraz
on 6 May 2022
Accepted Answer
More Answers (1)
Torsten
on 6 May 2022
syms k0 k1 A0 A(t) B(t) E(t)
eqns = [diff(A,t)==-k0*A,diff(B,t)==k0*A-k1*B,diff(E,t)==k1*B];
conds = [A(0)==A0,B(0)==0,E(0)==0]
[Asol(t),Bsol(t),Esol(t)]=dsolve(eqns,conds)
2 Comments
Juan Lara Alcaraz
on 7 May 2022
Torsten
on 7 May 2022
Yes. The equations are that easy that they can be solved using pencil and paper.
Categories
Find more on Programming in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
