No. The call is CSquare(2,3,4). Just trying to setup a random quad. Could this function be done with just Sage? I need coeficients, each term, sides of the equation, etc.
On Sep 2, 1:01 pm, William Stein <wst...@gmail.com> wrote: > On Wed, Sep 2, 2009 at 10:48 AM, kcrisman <kcris...@gmail.com> wrote: > > > On Sep 2, 1:32 pm, Mikie <thephantom6...@hotmail.com> wrote: > > > Here is my start using Sage and Maxima. > > > ------------------------------------------------ > > > def CSquare(co1,co2,co3): > > > eq1=co1*x^2+co2*x+co3 > > > eq3=eq1==0 > > > eq2=factor(eq1) > > > eq4=(1/co1)*eq2 > > > Cof1=maxima.args(eq4);Cof1a=Cof1[2]; > > > val2=real(((1/2)*(maxima.coeff(eq4,x,1)))) > > > val1=val2^2 > > > eq5=eq4+val1 > > > return eq3,eq2,eq4,eq5,val1 > > Why in the heck are you using Maxima at all? > > William > > > > > > > > -------------------------------------------------- > > > > The val1 does produce 9/16. This is good, but when I add it to the > > > lhs I get (here is my output) > > > ------------------------------------- > > > > 2*x^2 + 3*x + 4 == 0 > > > 2*(x^2 + 3*x/2 + 2) > > > x^2 + 3*x/2 + 2 > > > x^2 + 3*x/2 + sage261 + 2 > > > 9/16 > > > -------------------------------- > > > Why the "sage261"? > > > Looks like a Maxima or Sage session id. That can happen when Sage > > gives Maxima something it doesn't understand. Does your input include > > any functions? > > > - kcrisman > > -- > William Stein > Associate Professor of Mathematics > University of Washingtonhttp://wstein.org- Hide quoted text - > > - Show quoted text -- Hide quoted text - > > - Show quoted text - --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---