Question: Express the solution of the system of equations in terms of the desired parameters

Hi everyone! I solve this NLP and I wanna get the solution in terms of the desired parameters h1, h2, Could you tell me how to correct the code? 
 

solve({v1^2 = 2*g*(h-h1), (1/2)*g*t^2 = h2, v1*t+(1/2)*g*t^2 = h1}, h, parametric = full, parameters = {h1, h2})

piecewise(g*t^2-2*h2 = 0, piecewise(g*t^2+2*t*v1-2*h1 = 0, [{h = (1/2)*(g^2*t^2+2*g*t*v1+v1^2)/g}], g*t^2+2*t*v1-2*h1 <> 0, []), g*t^2+2*t*v1-2*h1 = 0, piecewise(g*t^2-2*h2 = 0, [{h = (1/2)*(g^2*t^2+2*g*t*v1+v1^2)/g}], g*t^2-2*h2 <> 0, []), And(g*t^2-2*h2 <> 0, g*t^2+2*t*v1-2*h1 <> 0), [])

(1)

NULL


 

Download Expression_of_NLP_with_desired_parameters.mw

Please Wait...