ASKSAGE: Sage Q&A Forum - Individual question feedhttp://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Thu, 13 Apr 2017 11:43:22 -0500How to solve an equation using SageMath?http://ask.sagemath.org/question/37276/how-to-solve-an-equation-using-sagemath/ I have just started using SageMath Cloud, based on a recommendation from a Stack Exchange user. I need to solve the following equation:
298082 = 250000(1 + r) + 25000(1 + r)^((365 - 258)/365)
...which simplifies to:
298082 = 250000(1 + r) + 25000(1 + r)^0.293150685
I go to SageMath Cloud and start a new project and start a new Sage Worksheet, and type the following:
x = var('x')
solve([298082 == (250000 * (1 + r)) + (25000 * (1 + r)^0.293150685)], r)
..and this gives the following:
[r == -1/10*(r + 1)^(11726006/39999927) + 24041/125000]
This is not an acceptable answer. How do I get it to solve the actual value, which is 0.089779615?Thu, 13 Apr 2017 08:29:26 -0500http://ask.sagemath.org/question/37276/how-to-solve-an-equation-using-sagemath/Answer by ndomes for <p>I have just started using SageMath Cloud, based on a recommendation from a Stack Exchange user. I need to solve the following equation:</p>
<p>298082 = 250000(1 + r) + 25000(1 + r)^((365 - 258)/365)</p>
<p>...which simplifies to:</p>
<p>298082 = 250000(1 + r) + 25000(1 + r)^0.293150685</p>
<p>I go to SageMath Cloud and start a new project and start a new Sage Worksheet, and type the following:</p>
<pre><code>x = var('x')
solve([298082 == (250000 * (1 + r)) + (25000 * (1 + r)^0.293150685)], r)
</code></pre>
<p>..and this gives the following:</p>
<pre><code>[r == -1/10*(r + 1)^(11726006/39999927) + 24041/125000]
</code></pre>
<p>This is not an acceptable answer. How do I get it to solve the actual value, which is 0.089779615?</p>
http://ask.sagemath.org/question/37276/how-to-solve-an-equation-using-sagemath/?answer=37280#post-id-37280Do you want a numerical solution?
find_root(298082 == (250000 * (1 + r)) + (25000 * (1 + r)^0.293150685),-1,1)
Thu, 13 Apr 2017 11:43:22 -0500http://ask.sagemath.org/question/37276/how-to-solve-an-equation-using-sagemath/?answer=37280#post-id-37280