Jason Grout <[EMAIL PROTECTED]> writes:
> var("t")
> y=function('y',t)
> solve(diff(y,t,2)-2*diff(y,t)+diff(y,t)==3, y(t))
>
> to "solve" for y(t).
>
> Doesn't Axiom work this way?
Yes. (well, FriCAS is what I'm developing) Actually, one thing which is really
nice about FriCAS is that it's very consistent. (Of course, there are places
where this is not the case at all, but in general it's true) Possibly this is
due to the type model of SPAD/Aldor, which relieves the developer of a lot of
decisions. But I'd think that Sage could learn a lot with respect to that
point.
Martin
(1) -> y := operator 'y
(1) y
Type: BasicOperator
(2) -> eq := D(y t,t,2)-2*D(y t,t)+y t=3
,, ,
(2) y (t) - 2y (t) + y(t)= 3
Type: Equation(Expression(Integer))
(3) -> solve(eq, y, t)
t t
(3) [particular= 3,basis= [%e ,t %e ]]
Type: Union(Record(particular: Expression(Integer),basis:
List(Expression(Integer))),...)
(4) -> solve(eq, y, t=0, [1])
t
(4) - 2%e + 3
Type: Union(Expression(Integer),...)
(5) -> solve(eq, y, t=0, [1,3])
t
(5) (5t - 2)%e + 3
Type: Union(Expression(Integer),...)
(6) -> eval(lhs eq, y, %% 4, t)
Compiling function %E with type Expression(Integer) -> Expression(
Integer)
(6) 3
Type: Expression(Integer)
(7) -> eval(lhs eq, y, %% 5, t)
Compiling function %F with type Expression(Integer) -> Expression(
Integer)
(7) 3
Type: Expression(Integer)
--~--~---------~--~----~------------~-------~--~----~
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-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---