Solve Any Motion Physics Problem (Equations Supplied) Physics Challenge

This program should be able to solve for ANY two of the following variables the user wants to solve.


s (displacement) 
v (velocity)
u (initial velocity) 
a (acceleration)
t (time)


At start the user must choose two variables they want to solve for and what variables they can supply. You are limited to using the following equations.

Equations Permitted



(http://en.wikipedia.org/wiki/Equations_of_motion)

The entrant with the least amount of code and posts the quickest will win.

Rules


This is code-golf. The shortest code wins.
Your program must terminate in reasonable time for all reasonable inputs.
You are allowed to transform the equations algebraically if need be 
The program must be able to interpret a variable of which the user cannot supply (See Example 2)


Input Example

The program will start and ask which variable the user will like to calculate:
(s, v, u, a, t) - the user selects this via a char type or string.
It then supplies all values for the other unknowns and the program will solve for the variables.

Example 1:

*What would you like to calculate? (s, v, u, a, t)*
Input: a, u     // This could also be s,v s,u, s,a v,u (ANY COMBINATION)

*Enter value for s:*
Input: 7        // The input will always be random

*Enter value for v:*
Input: 5

// Repeat for others

//program calculates

Var a = answer
Var u = answer


Example 2:

*What would you like to calculate? (s, v, u, a, t)*
Input: a, t

*Enter value for u:*
Input: 5

*Enter value for s:*
Input: UNKNOWN

*Enter value for v:*
Input: 7

*The answers for a and t are 464 and 742*


Edit

I think everyone here is overcomplicating the question. It simply asks to solve any 2 variables from the list of (s, v, u, a, t) and solve them using the equations. As the programmer you must be able to allow values to be taken for the variables that are not being solved. I will clarify that the program must be able to solve for any variable supplied by the user on startup. I also removed the somewhat correct equation s=v/t because people are becoming confused by it.
Maple, 41 chars

s:=i-&gt;solve({v=u+a*t,s=(u+v)*t/2,op(i)}):


(Formulas used: #1 and #3.  These are sufficient to let Maple derive the rest.)

This defines a function s that takes in a set of initial conditions and solves the equations of motion for those initial values.  For example, the command:

&gt; s({ u = 1, v = 2, t = 3 });


outputs:

                          {a = 1/3, s = 9/2, t = 3, u = 1, v = 2}




Notes:

You generally need to specify three initial values for a unique solution; if you don't provide enough, Maple will try to give you a partial solution:

&gt; s({ u = 1, v = 2 });

                                        3 t
                          {a = 1/t, s = ---, t = t, u = 1, v = 2}
                                         2


(Yes, that's an ASCII art fraction there.  Even in text mode, Maple tries to typeset your math nicely.)

No solution is return for overspecified or otherwise unsolvable inputs; for example, s({ u = 1, v = 2, t = 0 }); outputs nothing.

If multiple solutions exist, Maple will generally try to return all of them:

&gt; s({ u = 1, s = 0, a = -1 });

                          {a = -1, s = 0, t = 2, u = 1, v = -1},
                          {a = -1, s = 0, t = 0, u = 1, v = 1}


Sometimes, the output may contain RootOf() expressions, as in:

&gt; s({ u = 10, s = 1, a = -1 });
                                                         2
                {a = -1, s = 1, t = RootOf(2 - 20 _Z + _Z , label = _L3), u = 10,
                                               2
                 v = 10 - RootOf(2 - 20 _Z + _Z , label = _L3)}


As far as Maple's concerned, this is a perfectly good solution, but if you want to turn it into something readable for us mere humans, use allvalues():

&gt; allvalues(s({ u = 10, s = 1, a = -1 }));   
                                            1/2                 1/2
                {a = -1, s = 1, t = 10 - 7 2   , u = 10, v = 7 2   },
                                            1/2                  1/2
                {a = -1, s = 1, t = 10 + 7 2   , u = 10, v = -7 2   }


Alternatively, you can specify the initial conditions as floating-point values, e.g. u = 10.0, which will cause Maple to return purely numerical solutions instead:

&gt; s({ u = 10.0, s = 1, a = -1 });

                {a = -1., s = 1., t = 0.1005050634, u = 10., v = 9.899494937},
                {a = -1., s = 1., t = 19.89949494, u = 10., v = -9.899494937}


Finally, note that, since Maple is a computer algebra system, it allows you to specify arbitrary equations in the input.  For example, if we didn't care about the specific initial velocity, but only about the change in velocity, we could just specify e.g. v = u + 1 and get the partial solution:

&gt; s({ v = u + 1 });

                {a = 1/t, s = t v - 1/2 t, t = t, u = v - 1, v = v}


We can even extend the physics model if we want, as in:

&gt; s({ f = m * a, u = 0, f = 1, m = 10, t = 5 });

                {a = 1/10, f = 1, m = 10, s = 5/4, t = 5, u = 0, v = 1/2}