1st order differential equation , boundary conditions

2 views (last 30 days)
please can someone help me to solve this 1st differential equation my function is Dp=kp ln(450/p) p(0)=40 and p(15)=95 , k is constant can someone help please, i am new to MATLAB k is constant and p is p(t)

Accepted Answer

Torsten
Torsten on 14 Sep 2018
syms y1(t) y2(t)
eqn = [diff(y1,t) == y2*y1*log(450/y1), diff(y2,t) == 0];
cond = [y1(0)==40, y1(15)==95];
[y1Sol(t) y2Sol(t)] = dsolve(eqn,cond)

More Answers (2)

Takey Asaad
Takey Asaad on 14 Sep 2018
ans =
40
ans =
450*exp(exp(20*log(log(19/90)) - 19*log(log(4/45))))
answer at t=300 must be 450 and the plot is empty , do you know what is the problem. Thanks,

Takey Asaad
Takey Asaad on 14 Sep 2018
Hi, why you use log instead of exp?
  1 Comment
Torsten
Torsten on 17 Sep 2018
Because you use "ln" in your problem formulation.
And please do not always create answers in this thread. The replies you give are comments to answers.
What do you get for y1Sol ?
Best wishes
Torsten.

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!