# Differential equation plotting (Solved) [closed]

I am quite new to Mathematica so sorry if this is quite a simple fix. I was just wondering if anyone knew a solution that could help me fix this. Any help is appreciated, thanks in advance.

## closed as off-topic by Szabolcs, zhk, Bob Hanlon, Chris K, bbgodfreyOct 8 '17 at 14:45

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "This question arises due to a simple mistake such as a trivial syntax error, incorrect capitalization, spelling mistake, or other typographical error and is unlikely to help any future visitors, or else it is easily found in the documentation." – Szabolcs, zhk, Bob Hanlon, Chris K, bbgodfrey
If this question can be reworded to fit the rules in the help center, please edit the question.

• how is plot defined – Coolwater Oct 8 '17 at 12:43
• Ah yeah, it's a Capital thanks I fixed that up, but I still have an error from the DSolve. – john smith Oct 8 '17 at 12:46
• ca is black (not blue) in your screenshot. It indicates that it has a definition, which should not be the case. Also, you have a ; after the definition of odes. Remove it so you can see what it actually evaluates to. The same with the DSolve line. That'll make it clear to you what is happening. – Szabolcs Oct 8 '17 at 12:53
• Thanks for the help I did as you said but I am still unsure how to fix it. – john smith Oct 8 '17 at 13:01

Here is what you are looking for.

odes = {ca'[t] == -k1*ca[t], cr'[t] == k1*ca[t] - k2*cr[t],
cs'[t] == k2*cr[t] - k3, ct'[t] == k3, ca[0] == ca0, cr[0] == 0,
cs[0] == 0, ct[0] == 0}

sol = DSolve[odes, {ca[t], cr[t], cs[t], ct[t]}, t][[1]] // Simplify

With[{expr = {ca[t], cr[t], cs[t], ct[t]} /. sol},
Manipulate[Plot[expr, {t, 0, 10}], {{ca0, 0.2}, .1, 1}, {{k1, 0.2}, .1,
1}, {{k2, 2}, .1, 3}, {{k3, 0.2}, .1, 1}]]


or

With[{expr = {ca[t], cr[t], cs[t], ct[t]} /. sol},
Manipulate[Plot[expr, {t, 0, 10}], {ca0, .1, 1}, {k1, 0, 1}, {k2, 2, 3}, {k3, 0, 1}]]

• Thank you so much, your code was spot on. I appreciate the help. – john smith Oct 8 '17 at 13:19