# How do i display a derivative using view()

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)?

edit retag close merge delete

Sort by ยป oldest newest most voted

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'

more

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...

( 2015-10-03 10:44:51 +0200 )edit

## Stats

Seen: 249 times

Last updated: Oct 02 '15