4 views

Skip to first unread message

Feb 24, 2021, 3:24:46 AMFeb 24

to Numbas Users

Hello,

I treid this in a promt of a part (for clarity without variables e.g. for the minus sign):

$ f(x) = 3 \cdot e ^ \simplify[std]{-2*x+1} + \simplify[std]{-x^2} $

It yields to a display with "... +-x^2". With a plus followed by a minus sign.

So I tried

$ f(x) = \simplify[std]{3 * e ^ {-2*x+1} +{-x^2}} $

But this gives an mathematical error from the part with e^ .

Is there a way to display this formula naturally?

Thanks,

Helge

Feb 24, 2021, 4:37:23 AMFeb 24

to numbas...@googlegroups.com

Within \simplify, curly braces are used to substitute in variable values. Assuming you want to show the variable x, and it's not a question variable that you want to substitute, I think you should use parentheses, e.g.

$ f(x) = \simplify[std]{ 3*e^(-2x+1) + (-x^2) } $

--

You received this message because you are subscribed to the Google Groups "Numbas Users" group.

To unsubscribe from this group and stop receiving emails from it, send an email to numbas-users...@googlegroups.com.

To view this discussion on the web, visit https://groups.google.com/d/msgid/numbas-users/47092ed1-3a07-4302-8bd9-ae72f4fe906an%40googlegroups.com.

Feb 24, 2021, 6:42:00 AMFeb 24

to Numbas Users

Thank you! Now it works. My line is now with variables to substitute:

$ f(x) = \simplify[std,!otherNumbers,!noLeadingMinus]{{c}e^({b[1]}*x+{b[0]}) + {a[1]}x^{n[1]} + {a[0]}x^{n[0]}}$

It doesn't matter, but I wonder why the first example "e ^ \simplify[std]{-2*x+1}" is working.

Sincerely, Helge

Reply all

Reply to author

Forward

0 new messages

Search

Clear search

Close search

Google apps

Main menu