ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Wed, 03 Nov 2010 16:35:56 +0100Sample question: How do I compute symbolic integrals like $\int{sin(x) tan(x)} dx$https://ask.sagemath.org/question/7569/sample-question-how-do-i-compute-symbolic-integrals-like-intsinx-tanx-dx/(Sample question) How do I compute the integral of $sin(x) tan(x)$ in Sage?Wed, 18 Aug 2010 19:35:19 +0200https://ask.sagemath.org/question/7569/sample-question-how-do-i-compute-symbolic-integrals-like-intsinx-tanx-dx/Answer by cswiercz for <p>(Sample question) How do I compute the integral of $sin(x) tan(x)$ in Sage?</p>
https://ask.sagemath.org/question/7569/sample-question-how-do-i-compute-symbolic-integrals-like-intsinx-tanx-dx/?answer=11371#post-id-11371In addition, symbolic functions have an **integrate** method. For example, given the function $f(x) = \sin(x)\tan(x)$,
sage: var('x')
sage: f = sin(x)*tan(x)
its symbolic integral is calculated like so:
sage: f.integrate(x)
-1/2*log(sin(x) - 1) + 1/2*log(sin(x) + 1) - sin(x)
Be sure to provide the variable you wish to integrate with respect to as an argument to **integrate**.
Wed, 18 Aug 2010 19:50:37 +0200https://ask.sagemath.org/question/7569/sample-question-how-do-i-compute-symbolic-integrals-like-intsinx-tanx-dx/?answer=11371#post-id-11371Answer by Mike Hansen for <p>(Sample question) How do I compute the integral of $sin(x) tan(x)$ in Sage?</p>
https://ask.sagemath.org/question/7569/sample-question-how-do-i-compute-symbolic-integrals-like-intsinx-tanx-dx/?answer=11369#post-id-11369You can integrate sin(x)*tan(x) in Sage by using the **integrate** command:
sage: integrate(sin(x)*tan(x), x)
-1/2*log(sin(x) - 1) + 1/2*log(sin(x) + 1) - sin(x)
You can find some more examples in the [tutorial][1].
[1]: http://sagemath.org/doc/tutorial/tour_algebra.html#differentiation-integration-etcWed, 18 Aug 2010 19:41:34 +0200https://ask.sagemath.org/question/7569/sample-question-how-do-i-compute-symbolic-integrals-like-intsinx-tanx-dx/?answer=11369#post-id-11369Comment by schilly for <p>You can integrate sin(x)*tan(x) in Sage by using the <strong>integrate</strong> command:</p>
<pre><code>sage: integrate(sin(x)*tan(x), x)
-1/2*log(sin(x) - 1) + 1/2*log(sin(x) + 1) - sin(x)
</code></pre>
<p>You can find some more examples in the <a href="http://sagemath.org/doc/tutorial/tour_algebra.html#differentiation-integration-etc">tutorial</a>.</p>
https://ask.sagemath.org/question/7569/sample-question-how-do-i-compute-symbolic-integrals-like-intsinx-tanx-dx/?comment=23105#post-id-23105Thankx for the link to the tutorial ;)Wed, 18 Aug 2010 19:43:06 +0200https://ask.sagemath.org/question/7569/sample-question-how-do-i-compute-symbolic-integrals-like-intsinx-tanx-dx/?comment=23105#post-id-23105Answer by Dima for <p>(Sample question) How do I compute the integral of $sin(x) tan(x)$ in Sage?</p>
https://ask.sagemath.org/question/7569/sample-question-how-do-i-compute-symbolic-integrals-like-intsinx-tanx-dx/?answer=11368#post-id-11368Sample answer: does TeX work, I wonder...
$\int_0^{\infty} e^{-t^2} dt$Wed, 18 Aug 2010 19:40:10 +0200https://ask.sagemath.org/question/7569/sample-question-how-do-i-compute-symbolic-integrals-like-intsinx-tanx-dx/?answer=11368#post-id-11368Comment by Evgeny for <p>Sample answer: does TeX work, I wonder...
$\int_0^{\infty} e^{-t^2} dt$</p>
https://ask.sagemath.org/question/7569/sample-question-how-do-i-compute-symbolic-integrals-like-intsinx-tanx-dx/?comment=22576#post-id-22576single $ is used for inline tex, double for block-style.Wed, 13 Oct 2010 21:35:31 +0200https://ask.sagemath.org/question/7569/sample-question-how-do-i-compute-symbolic-integrals-like-intsinx-tanx-dx/?comment=22576#post-id-22576Comment by William Stein for <p>Sample answer: does TeX work, I wonder...
$\int_0^{\infty} e^{-t^2} dt$</p>
https://ask.sagemath.org/question/7569/sample-question-how-do-i-compute-symbolic-integrals-like-intsinx-tanx-dx/?comment=23104#post-id-23104No jsmath yet. We need to add it like on mathoverflow.net.Wed, 18 Aug 2010 19:48:10 +0200https://ask.sagemath.org/question/7569/sample-question-how-do-i-compute-symbolic-integrals-like-intsinx-tanx-dx/?comment=23104#post-id-23104Comment by schilly for <p>Sample answer: does TeX work, I wonder...
$\int_0^{\infty} e^{-t^2} dt$</p>
https://ask.sagemath.org/question/7569/sample-question-how-do-i-compute-symbolic-integrals-like-intsinx-tanx-dx/?comment=23103#post-id-23103well, if it is mathjax by default, formulas are inside \( \) or $$ $$. just a single $ is a bad idea ^^Wed, 18 Aug 2010 19:53:23 +0200https://ask.sagemath.org/question/7569/sample-question-how-do-i-compute-symbolic-integrals-like-intsinx-tanx-dx/?comment=23103#post-id-23103Answer by Patrick2000 for <p>(Sample question) How do I compute the integral of $sin(x) tan(x)$ in Sage?</p>
https://ask.sagemath.org/question/7569/sample-question-how-do-i-compute-symbolic-integrals-like-intsinx-tanx-dx/?answer=11765#post-id-11765$\sum 2$
great
:-) like that !!
can you get (integrate) this (live-preview) functionality into the sage notebook text editor (tiny-mce) somehow ?
i'd like to see the formula there while typing
if i double-click directly on a formula tinymce opens plus a box with latex source code. but only the first time. how about the box popping up each time i place the cursor into a latex formula and then showing the typeset math. at the moment i don't see the use of the box ...
thanks for sage ... am loving it!!!
regards
Patrick
---
I guess, I am asking in the wrong place - (maybe "mis-")using this forum as a scratch pad - but the suggestion I'm making is somehow connected with this ... (I reached here from a [blog bost](http://sagemath.blogspot.com/2010/08/overflow.html)).
So to be a bit more precise:
I am actually talking about the [sage notebook](http://www.sagenb.org/). I am wondering what [this light grey window](http://oi54.tinypic.com/jjo5fl.jpg) is really good for and suggesting an way to make use of it.Tue, 02 Nov 2010 18:37:32 +0100https://ask.sagemath.org/question/7569/sample-question-how-do-i-compute-symbolic-integrals-like-intsinx-tanx-dx/?answer=11765#post-id-11765Comment by Patrick2000 for <p>$\sum 2$
great</p>
<p>:-) like that !!</p>
<p>can you get (integrate) this (live-preview) functionality into the sage notebook text editor (tiny-mce) somehow ?</p>
<p>i'd like to see the formula there while typing</p>
<p>if i double-click directly on a formula tinymce opens plus a box with latex source code. but only the first time. how about the box popping up each time i place the cursor into a latex formula and then showing the typeset math. at the moment i don't see the use of the box ...</p>
<p>thanks for sage ... am loving it!!!</p>
<p>regards</p>
<p>Patrick</p>
<hr/>
<p>I guess, I am asking in the wrong place - (maybe "mis-")using this forum as a scratch pad - but the suggestion I'm making is somehow connected with this ... (I reached here from a <a href="http://sagemath.blogspot.com/2010/08/overflow.html">blog bost</a>).</p>
<p>So to be a bit more precise:</p>
<p>I am actually talking about the <a href="http://www.sagenb.org/">sage notebook</a>. I am wondering what <a href="http://oi54.tinypic.com/jjo5fl.jpg">this light grey window</a> is really good for and suggesting an way to make use of it.</p>
https://ask.sagemath.org/question/7569/sample-question-how-do-i-compute-symbolic-integrals-like-intsinx-tanx-dx/?comment=22522#post-id-22522Ehr - no - although that's also a real nice functionality i didn't know of (fancy menu shades! (but menu initially hidden under firefox default menu (ubuntu 10.04 - 64bit : http://oi56.tinypic.com/1hef4p.jpg)))Wed, 03 Nov 2010 16:35:56 +0100https://ask.sagemath.org/question/7569/sample-question-how-do-i-compute-symbolic-integrals-like-intsinx-tanx-dx/?comment=22522#post-id-22522Comment by Evgeny for <p>$\sum 2$
great</p>
<p>:-) like that !!</p>
<p>can you get (integrate) this (live-preview) functionality into the sage notebook text editor (tiny-mce) somehow ?</p>
<p>i'd like to see the formula there while typing</p>
<p>if i double-click directly on a formula tinymce opens plus a box with latex source code. but only the first time. how about the box popping up each time i place the cursor into a latex formula and then showing the typeset math. at the moment i don't see the use of the box ...</p>
<p>thanks for sage ... am loving it!!!</p>
<p>regards</p>
<p>Patrick</p>
<hr/>
<p>I guess, I am asking in the wrong place - (maybe "mis-")using this forum as a scratch pad - but the suggestion I'm making is somehow connected with this ... (I reached here from a <a href="http://sagemath.blogspot.com/2010/08/overflow.html">blog bost</a>).</p>
<p>So to be a bit more precise:</p>
<p>I am actually talking about the <a href="http://www.sagenb.org/">sage notebook</a>. I am wondering what <a href="http://oi54.tinypic.com/jjo5fl.jpg">this light grey window</a> is really good for and suggesting an way to make use of it.</p>
https://ask.sagemath.org/question/7569/sample-question-how-do-i-compute-symbolic-integrals-like-intsinx-tanx-dx/?comment=22524#post-id-22524do you mean - how to access latex source for the equation here in this forum? Mouse over the formula and right-click. Then select "Show source".Tue, 02 Nov 2010 18:45:36 +0100https://ask.sagemath.org/question/7569/sample-question-how-do-i-compute-symbolic-integrals-like-intsinx-tanx-dx/?comment=22524#post-id-22524Answer by schilly for <p>(Sample question) How do I compute the integral of $sin(x) tan(x)$ in Sage?</p>
https://ask.sagemath.org/question/7569/sample-question-how-do-i-compute-symbolic-integrals-like-intsinx-tanx-dx/?answer=11370#post-id-11370First, make sure that you variable "x" is defined to be a symbolic variable:
sage: var('x')
then you can use the integrate command:
sage: integrate(sin(x)*tan(x), x)
-1/2*log(sin(x) - 1) + 1/2*log(sin(x) + 1) - sin(x)
Wed, 18 Aug 2010 19:42:22 +0200https://ask.sagemath.org/question/7569/sample-question-how-do-i-compute-symbolic-integrals-like-intsinx-tanx-dx/?answer=11370#post-id-11370