#6479: desolve for 2nd order ODE with initial condition gives wrong answer
-----------------------+----------------------------------------------------
Reporter: gmhossain | Owner: burcin
Type: defect | Status: new
Priority: major | Milestone:
Component: calculus | Keywords:
Reviewer: | Author:
Merged: |
-----------------------+----------------------------------------------------
Comment(by wdj):
I'm not sure if this is a duplicate or not but Robert Bradshaw definitely
knows about this bug. (I wrote a crappy version of the original solver,
Robert wrote the new and improved one. However, Marshall Hampton and I
spend several hours at SD15 trying to figure out how to patch this bug and
couldn't.) BTW, it is actually documented to behave this way if you read
the docstrings carefully.
Here is, at Robert Bradshaw's request, a *maxima* session solving a 2nd
order ODE with 2 initial conditions and a 2nd order ODE with 2 boundary
conditions:
{{{
sage: maxima.eval("de:'diff(y,x,2) + y*'diff(y,x)^3 = 0")
"'diff(y,x,2)+y*('diff(y,x,1))^3=0"
sage: maxima.eval("ode2(de,y,x)")
'(y^3+6*%k1*y)/6=x+%k2'
sage: maxima.eval("soln:ode2(de,y,x)")
'(y^3+6*%k1*y)/6=x+%k2'
sage: maxima.eval("bc2(soln,x=0,y=1,x=1,y=3)")
'(y^3-10*y)/6=x-3/2'
sage: maxima.eval("de:'diff(y,x,2) + 4*y = 0")
"'diff(y,x,2)+4*y=0"
sage: maxima.eval("soln:ode2(de,y,x)")
'y=%k1*sin(2*x)+%k2*cos(2*x)'
sage: maxima.eval("bc2(soln,x=0,y=1,x=1,y=3)")
'y=cos(2*x)-(cos(2)-3)*sin(2*x)/sin(2)'
sage: maxima.eval("ic2(soln,x=0,y=1,'diff(y,x)=3)")
'y=3*sin(2*x)/2+cos(2*x)'
}}}
Hope this helps.
An additional problem is that the syntax for desolve and desolve_laplace
are different. Perhaps this could be fixed at the same time?
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/6479#comment:1>
Sage <http://sagemath.org/>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en
-~----------~----~----~----~------~----~------~--~---