Does anyone know of an Open source Computer Algebra Library that can solve for the kinematic equations? [closed]

StackOverflow https://stackoverflow.com/questions/14168728

Question

I have been looking for an open source Computer Algebra library for a while that can solve for a system of equations such as the kinimatic equations. So I would somehow be able to input 3 of the 5 variables (Initial Velocity, Final Velocity, Acceleration, Distance, and Time), and specify a variable to solve for, and It would give me the answer. I think the problem I am having with finding something that can do this is that these equations are nonlinear. I was wondering if anyone knew something that could do this? I am just using kinematic equations as an example as if it can do this, it would be able to accomplish everything else that I need. I dont know if I am asking for too much, but I appreciate any answers!

Was it helpful?

Solution

The SAGE tool comprises a number of open source tools, including symbolic manipulation of functions, and linear algebra. Note that your challenge may be not in doing the algebra, which is not a difficult problem for a computer or mathematician to do, but in defining your problem. If you only input three variables, then you're looking to output a function, instead of a number. The question would be, how would you expect the computer to handle these myriad functions? To plot them, or simply present them to the user is simple, but if you want the computer to perform more useful work on them, you may need to more carefully define your problem. I think you may come to find that the algebra can be easily done on paper, and hardcoded into whatever software you write (after all, the kinematic equations have not changed for hundreds of years), whereas writing a software to generically manipulate and solve physics equations is quite a challenge.

If you're inclined to use Wolfram products, as another user mentioned, you may be interested in Mathematica, which provides far more functionality than Wolfram Alpha or SAGE, but is a commercial product. It can be interfaced through bindings to several other languages.

OTHER TIPS

I have used the site WolframAlpha.com to solve some of my complex inverse kinematics equations. The syntax at wolframalpha to solve for a variable goes like this:

solve for(varable1, variable2,...,variablex),equation1, equation2...

Where all variables are single letters.

For example, when solving the system for x and y, when the equations are:

d=cos(x)a+sin(y)b

h=sin(x)a-cos(y)b

would be formatted like this:

solve for(x,y), d=cos(x)a+sin(y)b , h=sin(x)a-cos(y)b

Wolfram alpha would then be able to solve for these variables. If you want runtime solving, then this post is not for you.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top