The following code shows an error in odeL_ic (package odes)
The last line, sol4, gives a wrong result:
load(odes)$
assume(g>0,m>0,sin(α)>0,ω>0)$
Eq:m*'diff(q,t,2)-ω^2*sin(α)^2*m*q=-cos(α)*g*m;
sol1:expand(trigsimp(ode2_ic(Eq,q,t,[0,q_0,v_0])));
sol2:expand(trigsimp(odeL_ic(Eq,q,t,[0,q_0,v_0])));
linsol:linsolve(Eq,'diff(q,t,2));
sol3:expand(trigsimp(ode2_ic(first(linsol),q,t,[0,q_0,v_0])));
sol4:expand(trigsimp(odeL_ic(first(linsol),q,t,[0,q_0,v_0])));
Daniel
For some reaseon the * is not showing, it should be:
Eq:m'diff(q,t,2)-ω^2sin(α)^2mq=-cos(α)gm;
Diff:
Hi Kris,
I understand from your email that you have the correct equation to duplicate this bug.
Thanks,
Daniel
Diff:--- old
+++ new
@@ -1,6 +1,7 @@
The following code shows an error in odeL_ic (package odes)
The last line, sol4, gives a wrong result:
+~~~
load(odes)$
assume(g>0,m>0,sin(α)>0,ω>0)$
Eq:m'diff(q,t,2)-ω^2sin(α)^2mq=-cos(α)gm;
@@ -9,5 +10,6 @@
linsol:linsolve(Eq,'diff(q,t,2));
sol3:expand(trigsimp(ode2_ic(first(linsol),q,t,[0,q_0,v_0])));
sol4:expand(trigsimp(odeL_ic(first(linsol),q,t,[0,q_0,v_0])));
+~~~
Daniel
Wrapping the code with tildes to fix formatting. By default, asterisks cause text to be italicized. [bugs:#3261] Wrong answer from odeL_icStatus: open
Group: None
Created: Sun Dec 11, 2016 11:10 PM UTC by Daniel Volinski
Last Updated: Sun Dec 11, 2016 11:13 PM UTC
Owner: nobodyThe following code shows an error in odeL_ic (package odes)
The last line, sol4, gives a wrong result:load(odes)$
assume(g>0,m>0,sin(α)>0,ω>0)$
Eq:m'diff(q,t,2)-ω^2sin(α)^2mq=-cos(α)gm;
sol1:expand(trigsimp(ode2_ic(Eq,q,t,[0,q_0,v_0])));
sol2:expand(trigsimp(odeL_ic(Eq,q,t,[0,q_0,v_0])));
linsol:linsolve(Eq,'diff(q,t,2));
sol3:expand(trigsimp(ode2_ic(first(linsol),q,t,[0,q_0,v_0])));
sol4:expand(trigsimp(odeL_ic(first(linsol),q,t,[0,q_0,v_0])));
DanielSent from sourceforge.net because you indicated interest in https://sourceforge.net/p/maxima/bugs/3261/To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/
Related
Bugs: #3261
Wrapping the code with tildes to fix formatting. By default, asterisks cause text to be italicized.
Functions odeL, odeL_ic solves differential equations Ly = f,
where L is linear differential operator with constant coefficients.
For example y'' + y = 1, y(0)=1, y'(0)=1
(%i1) load(odes)$
(%i2) eq:'diff(y,x,2)+y=1$
(%i3) eq1:'diff(y,x,2)=1-y$
correct:
(%i4) odeL(eq,y,x);
(%o4) y=C2sin(x)+C1cos(x)+1
(%i5) odeL_ic(eq,y,x,[0,1,1]);
(%o5) y=sin(x)+1
wrong:
(%i6) odeL_ic(eq1,y,x,[0,1,1]);
(%o6) y=x+1
(%i7) odeL(eq1,y,x);
(%o7) y=C2*x+C1+1
I want to fix it.
best
Aleksas D