# How do i display a derivative using view() edit

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 03:44:51 -0600 )edit
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.2281162440776825, "perplexity": 4161.239686847974}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 20, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2020-50/segments/1606141692985.63/warc/CC-MAIN-20201202052413-20201202082413-00175.warc.gz"}