On Wed, 2 Sep 2009, Mikie wrote:

>
> Here is a proc(Mupad) I wrote for showing the steps in completing the
> square for a quad
> ----------------------------------------------------
> //Completing the Square Method of solving quadratic equation
> quad:= proc(co1,co2,co3)
>    local a,b,c,eq1,q1,Lcoef,half2,eq2,eq3,op1,op2,op3,
>        eq1a,eq1b,eq1c,eq4,eq5,eq6,r1,sol1,sol2;
> begin;
>    eq1:=co1*x^2+co2*x+co3=0;
>    eq2:=(eq1/co1);
>    q1:=[coeff(lhs(eq2))];
>    Lcoef:=q1[2];
>    op1:= op(lhs(eq2)); op2:=op(op1,3);
>    eq1a := subs(R1 + R2 = R3, R1=op(op1,1),
>          R2 =op(op1,2),R3 = -op2, Unsimplified);
>    half2:=(Lcoef/2)^2;
>    a := lhs(eq1a); b:=rhs(eq1a);
>    eq1b:= subs(R4 + R5 + R6 = R7 + R8, R4 =op(a,1),
>           R5 = op(a,2), R6 = half2, R7=b,R8 = half2,Unsimplified);
>    eq3:=eq2-q1[3];
>    eq4:=eq3+half2;
>    eq5:= (x+Lcoef/2)^2=rhs(eq4);
>    eq6:= x+Lcoef/2=sqrt(rhs(eq5));
>    eq6a:= x+Lcoef/2=-sqrt(rhs(eq5));
>    sol1:=eq6-Lcoef/2;sol2:=x=rhs(-eq6-Lcoef/2);
> ----------------------------------
> I need rhs, lhs, op, coef, subs, etc.  Are any of these functions in
> Sage or Maxima?
> Thanx


I bet they all are, but to know you'd have to find out what they mean.

- Robert


--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to