First time here? Check out the FAQ!

Ask Your Question
1

How do i display a derivative using view()

asked 9 years ago

gsonnenf gravatar image

I can currently display the form of an integral in latex using:

f(x) = x + x^2
view( integral(f(x),x, hold=True) ) #displays the form of the derivative

But i can't figure out how to do it for a derivative:

f(x) = x + x^2
view( derivative(f(x),x, hold=True) ) #fails
view( derivative(f(x),x) ) # takes derivative then displays answer instead of the problem

Is their any easy way to do this? If not, whats the recommended way to fake it (inline latex etc)?

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
1

answered 9 years ago

tmonteil gravatar image

updated 9 years ago

As you can see, the problem is not about viewing the formula in LaTeX/pdf, but about telling Sage not to compute the derivative. Indeed , it seems that the derivative method does not support a hold argument (yet).

sage: f(x) = x + x^2
sage: derivative(f(x),x)
2*x + 1
sage: derivative(f(x),x, hold=True)
TypeError: derivative() got an unexpected keyword argument 'hold'
Preview: (hide)
link

Comments

1

Apparently the long-delayed http://trac.sagemath.org/ticket/6756 would implement this, or at least should implement it but maybe hasn't yet...

kcrisman gravatar imagekcrisman ( 9 years ago )

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 9 years ago

Seen: 875 times

Last updated: Oct 02 '15