1

I have the following function and I want to plot this from t=0 to t=10^4, but Maxima returns me an empty plot, I ploted same function with other software and I hadn't any problem

h(t):=N0*(n^4*(e^((1-n)*t)/n^2)/(1-n)^2-(n^2/(e^(t/n))));
N0:7*10^3;n:10^3;
plot2d(h(t),[t,0,1*10^4]);

2 Answers 2

2

In Maxima predefined constants start with a % (try ??% at the prompt to check which, or simply %e,numer or %phi,numer for a couple of examples)

Se replace e by %e:

h(t):=N0*(n^4*(%e^((1-n)*t)/n^2)/(1-n)^2-(n^2/(%e^(t/n))));

in this case it is also possible - and advisable? - to replace by exp():

h(t):=N0*(n^4*(exp((1-n)*t)/n^2)/(1-n)^2-(n^2/(exp(t/n))));

Both of these should work just the same.

(edit) You could also define e's value: e:2.718281828459045. That would be silly, but serves to point that to Maxima your e is simply a regular variable, just as much as n or N0, so it ended up assigned to an "empty" value, causing the "expression evaluates to non-numeric value" error.

Sign up to request clarification or add additional context in comments.

Comments

2

Also, instead of writing 1*10^4 write 1e4. It is easier and avoids having to use parenthesis; for instance, the inverse of that number is 1/1e4, while 1/1*10^4 does not give the inverse but the same original number.

Comments

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.