On Feb 18, 3:14 pm, Ben Goodrich <[EMAIL PROTECTED]> wrote:
> I maintain an R package, but there is one place where a symbolic
> solution is needed to verify a result. I would like to write an R
> function that prints proper SAGE input so that users can easily feed
> it to SAGE. However, I have not yet been able to get SAGE to produce
> the expected behavior for a relatively simple published example and
> have run out of ideas.

To (partially) answer my own question, it seems that it is necessary
to specify that the equations be solved for Sigma_** as well (but I
don't know why). E.g.

# Substitute this line
solutions = solve([eq1,eq2,eq3,eq4,eq5,eq6,eq7,eq8,eq9,eq10],
lambda_11, lambda_21, lambda_22, lambda_32, lambda_42, Phi_21,
Theta2_11, Theta2_22, Theta2_33, Theta2_44,
Sigma_11, Sigma_21, Sigma_31, Sigma_41, Sigma_22, Sigma_32, Sigma_42,
Sigma_33, Sigma_43, Sigma_44, solution_dict = True, explicit_solution
= True); solutions

which yields

[{Sigma_41: r31*r35*r36, Sigma_42: r32*r35*r36 + r33*r35, lambda_42:
r35, Theta2_22: r38, Phi_21: r36, Theta2_33: r39, Sigma_44: r40 +
r35^2,
Sigma_43: r34*r35, Sigma_22: r38 + 2*r32*r33*r36 + r33^2 + r32^2,
lambda_22: r33, lambda_21: r32, Sigma_21: r31*r33*r36 + r31*r32,
Sigma_31: r31*r34*r36, Sigma_33: r39 + r34^2, lambda_32: r34,
Sigma_32:
r32*r34*r36 + r33*r34, Theta2_44: r40, Theta2_11: r37, Sigma_11: r37 +
r31^2, lambda_11: r31}]

But is there a way to get SAGE to express the answer in terms of the
original variables instead of these terms involving r? Is this SAGE's
way of telling me (correctly) that there is no solution where
lambda_** and Theta2_** can be expressed solely in terms of Sigma_** ?

Thanks,
Ben
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-support@googlegroups.com
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to