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, 16 Jan 2019 09:16:32 +0100Wrong solution/output for differential equationhttps://ask.sagemath.org/question/45046/wrong-solutionoutput-for-differential-equation/As the user rburing advised in the thread
https://ask.sagemath.org/question/44995/combine-plots-with-built-in-maxima-trajectory-in-sage-available/
I'm opening this one now.
When running the following code, one obtains a wrong output:
y=function('y')(x)
desolve(diff(y)==4*y/x+x*sqrt(y),y,ics=[1,1]).factor()
The output is `1/4*x^4*(log(x) - 2)^2` instead of `1/4*x^4*(log(x) + 2)^2`. Mathematica however outputs both (by running `DSolve[{D[y[x], x] == 4*y[x]/x + x*Sqrt[y[x]], y[1] == 1}, y[x], x]`).Mon, 14 Jan 2019 17:54:14 +0100https://ask.sagemath.org/question/45046/wrong-solutionoutput-for-differential-equation/Comment by Emmanuel Charpentier for <p>As the user rburing advised in the thread
<a href="https://ask.sagemath.org/question/44995/combine-plots-with-built-in-maxima-trajectory-in-sage-available/">https://ask.sagemath.org/question/449...</a>
I'm opening this one now.</p>
<p>When running the following code, one obtains a wrong output:</p>
<pre><code>y=function('y')(x)
desolve(diff(y)==4*y/x+x*sqrt(y),y,ics=[1,1]).factor()
</code></pre>
<p>The output is <code>1/4*x^4*(log(x) - 2)^2</code> instead of <code>1/4*x^4*(log(x) + 2)^2</code>. Mathematica however outputs both (by running <code>DSolve[{D[y[x], x] == 4*y[x]/x + x*Sqrt[y[x]], y[1] == 1}, y[x], x]</code>).</p>
https://ask.sagemath.org/question/45046/wrong-solutionoutput-for-differential-equation/?comment=45049#post-id-450491. The problem is specific to `maxima` :
- `sympy` has another, distinct, failure.
- `fricas` fails entirely.
- `giac` gives an acceptable answer.
2. You should follow the steps suggested in [the documentation](http://doc.sagemath.org/html/en/developer/trac.html#reporting-bugs), possibly also reporting this bug against `maxima`.Tue, 15 Jan 2019 08:42:01 +0100https://ask.sagemath.org/question/45046/wrong-solutionoutput-for-differential-equation/?comment=45049#post-id-45049Comment by Thrash for <p>As the user rburing advised in the thread
<a href="https://ask.sagemath.org/question/44995/combine-plots-with-built-in-maxima-trajectory-in-sage-available/">https://ask.sagemath.org/question/449...</a>
I'm opening this one now.</p>
<p>When running the following code, one obtains a wrong output:</p>
<pre><code>y=function('y')(x)
desolve(diff(y)==4*y/x+x*sqrt(y),y,ics=[1,1]).factor()
</code></pre>
<p>The output is <code>1/4*x^4*(log(x) - 2)^2</code> instead of <code>1/4*x^4*(log(x) + 2)^2</code>. Mathematica however outputs both (by running <code>DSolve[{D[y[x], x] == 4*y[x]/x + x*Sqrt[y[x]], y[1] == 1}, y[x], x]</code>).</p>
https://ask.sagemath.org/question/45046/wrong-solutionoutput-for-differential-equation/?comment=45060#post-id-45060How do you "access" those answers? For example, `desolve(diff(y)==4*y/x+x*sqrt(y),y,ics=[1,1],algorithm="giac")` gives `ValueError: unknown algorithm giac`.Tue, 15 Jan 2019 21:54:02 +0100https://ask.sagemath.org/question/45046/wrong-solutionoutput-for-differential-equation/?comment=45060#post-id-45060Comment by Emmanuel Charpentier for <p>As the user rburing advised in the thread
<a href="https://ask.sagemath.org/question/44995/combine-plots-with-built-in-maxima-trajectory-in-sage-available/">https://ask.sagemath.org/question/449...</a>
I'm opening this one now.</p>
<p>When running the following code, one obtains a wrong output:</p>
<pre><code>y=function('y')(x)
desolve(diff(y)==4*y/x+x*sqrt(y),y,ics=[1,1]).factor()
</code></pre>
<p>The output is <code>1/4*x^4*(log(x) - 2)^2</code> instead of <code>1/4*x^4*(log(x) + 2)^2</code>. Mathematica however outputs both (by running <code>DSolve[{D[y[x], x] == 4*y[x]/x + x*Sqrt[y[x]], y[1] == 1}, y[x], x]</code>).</p>
https://ask.sagemath.org/question/45046/wrong-solutionoutput-for-differential-equation/?comment=45067#post-id-45067`giac("desolve([y'=4*y/x+x*sqrt(y),y(1)=1],y)").sage()` should give you `[1/4*(ln(x) + 2)^2*e^(4*ln(x))]`.Wed, 16 Jan 2019 09:16:32 +0100https://ask.sagemath.org/question/45046/wrong-solutionoutput-for-differential-equation/?comment=45067#post-id-45067