Are there any solutions out there that can take a wide variety of equations with variables, like the one below, and transpose or isolate variables to other sides of the equation automatically?

For example, imagine having to transpose the variable "g" (gravity) to be by itself on the left of the equation, I'm just looking for a program or online tool to do this automatically.

Perhaps Wolfram Alpha or Mathematica can do this?

Note to SE people: I tried to use the tag "transposition" but it wasn't available, couldn't think of any other tags.

equation for initial velocity of a projectile

UPDATE: It appears that Wolfram Alpha has a Solve command for this (thanks Lord_Farin), even though many math books, math teachers, and math websites refer to this practice as "changing the subject of a formula" and "transposing" it seems to be the same thing as "solving for a variable."

The only issue now is that Wolfram Alpha gives funky results, for example if you punch in this: original equation you get a very odd answer from Wolfram Alpha. If you change the x2-x1 and y2-y1 stuff to just "x" and "y" (I tried using delta symbol to represent "change in x or y" but it was still a weird answer) you get a clean answer like this. Does anyone know why this happens or how to better write equations for Wolfram Alpha?

  • $\begingroup$ You mean to solve for $g$? Mathematica has the Solve command for this. $\endgroup$ – Lord_Farin Apr 13 '13 at 10:29
  • $\begingroup$ reference.wolfram.com/mathematica/ref/Transpose.html this link is about transposition in wolfram but I though it's nothing like you want. $\endgroup$ – Lrrr Apr 13 '13 at 10:34
  • $\begingroup$ I've responded to you in an edit of my original post, Lord_Farin, thank you $\endgroup$ – Luke Allen Apr 13 '13 at 10:52
  • $\begingroup$ There's nothing odd in that result, it's equivalent. You'd just need to simplify it (Simplify or FullSimplify in Mathematica) $\endgroup$ – Ruslan Apr 13 '13 at 11:38

Wolfram Alpha, while convenient, is a somewhat brittle tool, which tends to misunderstand what you are trying to do when the task isn't straight out of calculus book.

Here is what you could do with Sage Notebook, which is also web-based and also free.

var('v0, g, x1, x2, y1, y2, theta')
solve(v0==sqrt((g/2)*(x2-x1)^2/(cos(theta)^2*(y2-y1)+tan(theta)*(x2-x1))), g)

That's it. Actually, I put latex() around the solve command to get a code I could copy-paste here:

$$g = -\frac{2 \, {\left(v_{0}^{2} y_{1} \cos\left(\theta\right)^{2} - v_{0}^{2} y_{2} \cos\left(\theta\right)^{2} + v_{0}^{2} x_{1} \tan\left(\theta\right) - v_{0}^{2} x_{2} \tan\left(\theta\right)\right)}}{x_{1}^{2} - 2 \, x_{1} x_{2} + x_{2}^{2}}$$


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.