Loading [MathJax]/jax/output/HTML-CSS/jax.js
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

answered 12 years ago

Rolandb gravatar image

Use variables to solve the equation symbolically:

var('a','b','c','t')

S = solve([at^2 + bt + c], t)

print S

[t == -1/2(b + sqrt(-4ac + b^2))/a,t == -1/2(b - sqrt(-4ac + b^2))/a]

Then define g:

g(a,b,c,t)=S[0].rhs()

show(g)

(a,b,c,t)  b+4 ac+b22 a

That is how I would write it by hand.

Proof of concept:

g(-16,48,5)

1/4*sqrt(41) + 3/2

I hope it helps.