Skip to content

Instantly share code, notes, and snippets.

@raydsameshima
Created September 15, 2021 18:54
Show Gist options
  • Save raydsameshima/5a5f40e30ad7d23460be5eaafba1bb40 to your computer and use it in GitHub Desktop.
Save raydsameshima/5a5f40e30ad7d23460be5eaafba1bb40 to your computer and use it in GitHub Desktop.
mt1_2
sage: t = var('t')
sage: r = 10*1000 - 400*t
sage: z = 300 + 110*t -10/2*t^2
sage: sol = solve( z, t)
sage: s = sol[1]
sage: z.subs(sol[1])
-5*(sqrt(181) + 11)^2 + 110*sqrt(181) + 1510
sage: expand(_)
0
sage: r.subs(sol[1])
-400*sqrt(181) + 5600
sage: n(_)
218.550381170516
sage: z = 300 + 111*t -10/2*t^2
sage: sol = solve( z, t)
sage: r.subs(sol[1])
-40*sqrt(18321) + 5560
sage: expand(_)
-40*sqrt(18321) + 5560
sage: n(_)
145.796457464866
sage:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment