How to solve equations symbolically and limit the equations?

1 view (last 30 days)
I've used the dsolve function to solve a bunch of equations but is there anyway for it to solve in symbolically as I have Lam values and Mu values which I've had to input a numerical value for but is there anyway to keep these in sysmbolic form. Also is there anyway to get an output which limits t to infinty? Thanks Ben
syms P0(t) P1(t)
Lam = 2000
Mu = 1000
eqns = [diff(P0,t) == -Lam*P0+Mu*P1,...
diff(P1,t) == Lam*P0-Mu*P1];
sol = dsolve(eqns, P0(0) == 1, P1(0) == 0)
solP0(t)= sol.P0
solP1(t)= sol.P1

Answers (1)

Walter Roberson
Walter Roberson on 27 Feb 2019
Just change your Lam = 2000 and Mu = 1000 to
syms Lam Mu
The results you get in solP0 and solP1 will involve variables Lam and Mu

Categories

Find more on Symbolic Math Toolbox 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!