Undefined constants of ODE solution
3 views (last 30 days)
Show older comments
Hi,
I have two ODE, one is homogenous and other is nonhomogenous. The similarity of them is the same left hand side (except equ_2 with G while equ_1 without G).
Obviously, they are different equations therefore the undefined constant should be different.
But the solution from dsolve is not such thing. It leads to mistakes when I want to add these two solution. (Just add the two C_1 from two different solution.)
Here is the code.
eqn_1 = -V_T*mu_p*diff(p,x,2) + F*mu_p*diff(p,x) + r_m*p == 0;
p_dark(x) = dsolve(eqn_1)
eqn_2 = -V_T*mu_p*diff(p,x,2) + F*mu_p*diff(p,x) + r_m*p -G(x,lumda) == 0;
p_ph(x,lumda) = dsolve(eqn_2)
So my question is
why the solutions have the same C1 and C2 in two different ODE? What should I do to get a different undefined constant? Like C_1 C_2 for equ_1 and C_3 C_4 for equ_2?
I find this problem in version 2021b. But when I used 2019a, the results are what I want.
Thanks in advance
Jason
0 Comments
Answers (0)
See Also
Categories
Find more on Ordinary Differential Equations 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!