Freddie Witherden <[email protected]> writes:

> Hello,
>
> I am attempting to solve a system of four, coupled, linear ordinary
> differential equations for which I know the initial starting
> conditions.  Unfortunately, I am unable to enter the system into
> FriCAS, with the initial conditions.  More generally, I can not seem
> to solve any linear system of ODEs w/initial conditions:
>
> y := operator 'y
> x := operator 'x
> eq1 := D(y t, t) = x(t)
> eq2 := D(x t, t) = -y(t)
> solve([eq1,eq2], [x,y], t=0,[x(0)=1,y(0)=0])
>>> There are 2 exposed and 1 unexposed library operations named solve
>      having 4 argument(s) but none was determined to be applicable.

Hm, strange enough it seems that this is not implemented.  Does the
following workaround help?

r := solve([eq1,eq2], [x,y], t)
solve(eval(matrix(r.basis), t=0), [1,0])

   (18)  [particular= [1,0],basis= []]

> Moving on I went ahead and tried to solve the system in Mathematica;
> it got nowhere.  Maxima, however, did give me a solution in terms of a
> moderately complicated inverse laplace transform (which it could not
> compute).  Luckily, both FriCAS and Mathematica were happy to solve
> it.  FriCAS, like Mathematica gave a solution which had ROOT objects
> and both %%A0 and %%A1:
>
> subst(inverseLaplace((R*g2849^3+(G*R+G)*g2849^2+(R^2+R
> +G^2)*g2849+2*G*R)/(10*(R*g2849^4+(G*R
> +G)*g2849^3+subst(inverseLaplace((R*g2849^3+(G*R+G)*g2849^2+(R^2+R
> +G^2)*g2849+2*G*R)/(10*(R*g2849^4+(G*R+G)*g2849^3+(2*R^2+2*R
> +G^2)*g2849^2+(3*G*R+G)*g2849+R^2+R)),g2849,t), [G=2,R=100])

there are some parens missing, could you please clean up?

> (The subst is done to clean up the equation somewhat, as I am only
> interested in a few particular values of R and G.)  My question is how
> can I expand and solve the roots; eliminating them and %%A0 and %%A1.
> Mathematica has a ToRadicals function (which successfully eliminates
> all such roots).  Once fully simplified the expression should be
> representable in terms of decaying exponentials and trigonometric
> functions.

you can get the defining polynomials using

    definingPolynomial %%C0

and solve it using

    radicalSolve(numer(definingPolynomial %%C0::FRAC POLY INT), '%%C0)

there should be a better way, but I'm not aware of it...

Martin

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" 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/fricas-devel?hl=en.

Reply via email to