I believe Sage simply calls Maxima for the solution. Since you
obviously know the
most about the problem, perhaps the easiest thing to do would be to determine
that it is Sage and not Maxima that is at fault. Perhaps you could see if
the solution is obtained in Maxima? (On the command line of Sage, you
can simply type "maxima_colsole()"; in the notebook I believe there is
a drop down
menu for maxima mode.)


On Feb 18, 2008 3:14 PM, Ben Goodrich <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> 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.
>
> The example (for anyone interested) is from
>
> http://scholar.google.com/scholar?num=100&hl=en&lr=&q=allintitle%3A%22Uniqueness+does+not+imply+identification%22&btnG=Search
>
> and involves a system of 10 equations and 10 unknowns. But some of the
> equations are redundant, and there are multiple solutions. I was
> expecting SAGE to give me a symbolic solution where at least one
> unknown was expressed in terms of another unknown, but instead it says
> empty set. If there were a unique solution, I would want SAGE to
> express lambda_** and Theta2_** in terms of Sigma_**
>
> Here is the input that causes [] to be outputted:
>
> # Define variables
> lambda_11, lambda_21, lambda_31, lambda_41, lambda_12, lambda_22,
> lambda_32, lambda_42, Phi_11, Phi_21, Phi_22, 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 =
> var('lambda_11 lambda_21 lambda_31 lambda_41 lambda_12 lambda_22
> lambda_32 lambda_42 Phi_11 Phi_21 Phi_22 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')
>
> # Specify constraints
> lambda_12 = 0/1
> lambda_31 = 0/1
> lambda_41 = 0/1
> Phi_11 = 1/1
> Phi_22 = 1/1
>
> # Write out 10 equations from the matrix algebra
> eq1 = Sigma_11 == ( (lambda_11 * Phi_11 + lambda_12 * Phi_21) *
> lambda_11 + (lambda_11 * Phi_21 + lambda_12 * Phi_22) * lambda_12 ) +
> Theta2_11
>
> eq2 = Sigma_21 == ( (lambda_21 * Phi_11 + lambda_22 * Phi_21) *
> lambda_11 + (lambda_21 * Phi_21 + lambda_22 * Phi_22) * lambda_12 )
>
> eq3 = Sigma_31 == ( (lambda_31 * Phi_11 + lambda_32 * Phi_21) *
> lambda_11 + (lambda_31 * Phi_21 + lambda_32 * Phi_22) * lambda_12 )
>
> eq4 = Sigma_41 == ( (lambda_41 * Phi_11 + lambda_42 * Phi_21) *
> lambda_11 + (lambda_41 * Phi_21 + lambda_42 * Phi_22) * lambda_12 )
>
> eq5 = Sigma_22 == ( (lambda_21 * Phi_11 + lambda_22 * Phi_21) *
> lambda_21 + (lambda_21 * Phi_21 + lambda_22 * Phi_22) * lambda_22 ) +
> Theta2_22
>
> eq6 = Sigma_32 == ( (lambda_31 * Phi_11 + lambda_32 * Phi_21) *
> lambda_21 + (lambda_31 * Phi_21 + lambda_32 * Phi_22) * lambda_22 )
>
> eq7 = Sigma_42 == ( (lambda_41 * Phi_11 + lambda_42 * Phi_21) *
> lambda_21 + (lambda_41 * Phi_21 + lambda_42 * Phi_22) * lambda_22 )
>
> eq8 = Sigma_33 == ( (lambda_31 * Phi_11 + lambda_32 * Phi_21) *
> lambda_31 + (lambda_31 * Phi_21 + lambda_32 * Phi_22) * lambda_32 ) +
> Theta2_33
>
> eq9 = Sigma_43 == ( (lambda_41 * Phi_11 + lambda_42 * Phi_21) *
> lambda_31 + (lambda_41 * Phi_21 + lambda_42 * Phi_22) * lambda_32 )
>
> eq10 = Sigma_44 == ( (lambda_41 * Phi_11 + lambda_42 * Phi_21) *
> lambda_41 + (lambda_41 * Phi_21 + lambda_42 * Phi_22) * lambda_42 ) +
> Theta2_44
>
> # Try to solve for 10 unknowns
> 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)
>
> solutions # empty set
>
>
> But if you fill in the values from a known solution, then eq1 through
> eq10 all evaluate to True
>
> # Solution from Table 1 in paper
> lambda_11 = 1/2
> lambda_21 = 1/1
> lambda_22 = 1/5
> lambda_32 = 2/1
> lambda_42 = 3/2
>
> Phi_21 = 4/5
>
> Theta2_11 = 1/1
> Theta2_22 = 1/2
> Theta2_33 = 3/2
> Theta2_44 = 2/1
>
> Sigma_11 = 5/4
> Sigma_21 = 58/100
> Sigma_31 = 4/5
> Sigma_41 = 3/5
> Sigma_22 = 186/100
> Sigma_32 = 2/1
> Sigma_42 = 3/2
> Sigma_33 = 55/10
> Sigma_43 = 3/1
> Sigma_44 = 425/100
>
> print(eq1); print(eq2); print(eq3); print(eq4); print(eq5);
> print(eq6); print(eq7); print(eq8); print(eq9); print(eq10) # all True
>
> Thus, I do not understand why SAGE says there is no solution to this
> system of equations. What should I be doing differently?
>
> Thanks in advance,
> 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