Unable to solve a differential equation with dsolve
5 次查看(过去 30 天)
显示 更早的评论
Hello, I am attempting to use the dsolve command to solve the following equation:
dC/dt = (1/V)(AFDe^(-At)-EVC
( with the known constants, the equation looks like this)
dC/dt = (1/10500)(0.215*0.68*1*e^(-0.215*t)-(2.772*10500*C)
This is what I have in my script:
dsolve('DCa = (1/10500)*(0.215*0.68*1*exp(-0.215*t) - 2.772*10500*C)','C(0)=0')
The issue is that the answer that dsolve gives me is not even close to what the answer should be when I solve it using a different platform like wolfram alpha. I also can't pinpoint what I did wrong. Any help would be must appreciated! Thank you!
0 个评论
回答(1 个)
Tamir Suliman
2016-11-27
编辑:Tamir Suliman
2016-11-27
you probably need to check the parenthesis and the equation you used with dsolve you might to organize it
v=10500;a=0.215;f=0.68;d=1;e=2.72;
syms a v f d e C(t)
cond = C(0) ==0;
eqn = diff(C,t) == (1/v)*(a*f*d)*(exp(-a*t))-e*v*C;
Csol(t)=dsolve(eqn,cond)
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!