2
$\begingroup$

I want to plot some functions and define some variables as constants, apparently the variables are not being recognized as constants. I'm kinda new to coding so this is very difficult to me. this is my code.

Ca = Ca0 E^(- \[Xi] t), t, Constants -> {Ca0, \[Xi]};

Cb = Ca0 (\[Xi]/(\[Eta] - \[Xi])) ( 
   E^(-\[Xi] t) - E^(-\[Eta] t)), t, Constants -> {Ca0, \[Xi], \[Eta]};
Cp = Ca0  (1 + 
    1/(\[Eta] - \[Xi]) (-\[Eta] E^(-\[Xi]  t) + \[Xi] E^(-\[Eta] \
t))), t, Constants -> {Ca0, \[Xi], \[Eta]};
Plot[{Ca, Cb, Cp}, {t, 0, 10}]
$\endgroup$

1 Answer 1

2
$\begingroup$

You must establish a value, or at least a range of values, for the constants

Ca = Ca0 E^(-\[Xi] t);
Cb = Ca0 (\[Xi]/(\[Eta] - \[Xi])) (E^(-\[Xi] t) - E^(-\[Eta] t));
Cp = Ca0 (1 + 
 1/(\[Eta] - \[Xi]) (-\[Eta] E^(-\[Xi] t) + \[Xi] E^(-\[Eta] t)));

Plot[{Ca, Cb, Cp} /. {Ca0 -> 1, \[Xi] -> 1, \[Eta] -> 2}, {t, 0, 10}]

Manipulate[
Plot[{Ca, Cb, 
Cp} /. {Ca0 -> Subscript[Ca0, 2], \[Xi] -> 
 Subscript[\[Xi], 2], \[Eta] -> Subscript[\[Eta], 2]}, {t, 0, 
10}], {{Subscript[Ca0, 2], 2}, 0, 10}, {{Subscript[\[Xi], 2], 1}, 
0, 10}, {{Subscript[\[Eta], 2], 2}, 0, 10}]
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.