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.Fri, 24 May 2013 06:11:45 +0200Using solve() to find an unknown which is a limit of integration?https://ask.sagemath.org/question/10137/using-solve-to-find-an-unknown-which-is-a-limit-of-integration/Is it possible to use the `solve()` function to find an unknown which is a limit of integration? A trivial example would be,
$$
\int_0^{x^\prime} mx+c \quad dx = 10
$$
where $x^{\prime}$ is the unknown ($m$ and $c$ are both known).Fri, 24 May 2013 05:28:24 +0200https://ask.sagemath.org/question/10137/using-solve-to-find-an-unknown-which-is-a-limit-of-integration/Answer by tmonteil for <p>Is it possible to use the <code>solve()</code> function to find an unknown which is a limit of integration? A trivial example would be,</p>
<p>$$
\int_0^{x^\prime} mx+c \quad dx = 10
$$</p>
<p>where $x^{\prime}$ is the unknown ($m$ and $c$ are both known).</p>
https://ask.sagemath.org/question/10137/using-solve-to-find-an-unknown-which-is-a-limit-of-integration/?answer=14965#post-id-14965For such an easy example, Sage is able to do it in the following way:
sage: var('x,c,m,t')
(x, c, m, t)
sage: f(x) = m*x + c
sage: solve([f.integral(x,0,t) == 0], t)
[t == -2*c/m, t == 0]
sage: solve([f.integral(x,0,t) == 10], t)
[t == -(c + sqrt(c^2 + 20*m))/m, t == -(c - sqrt(c^2 + 20*m))/m]Fri, 24 May 2013 06:11:45 +0200https://ask.sagemath.org/question/10137/using-solve-to-find-an-unknown-which-is-a-limit-of-integration/?answer=14965#post-id-14965