Example 07
Symbolic Integration, Differentiation, 
and Equation Solving

Copyright © 1993 by Bill Titus, Carleton College, 
Department of Physics and Astronomy, Northfield, MN  55057-4025
September 6, 1993

Topics and Skills

Problem

Step 1 - What do you think is the MMA command for integration?  Find out.

Step 2 - Try out  Integrate[]  by integrating the following functions:

1.  sin[x]  as an indefinite integral
2.  e-x  as an indefinite integral
3.  e-x  as a definite integral from  0  to  1
4.  e-x  as a definite integral from  0  to infinity
5.  sin[x] / x  as a definite integral from  0  to infinity

In 4 and 5, you can use the MMA constant  Infinity  as the upper limit.

Comment 2

Step 3 -  Not surprisingly, MMA has a command  D[]  which take the derivative of a function.  Find out about this command.

Step 4 - Apply what you found in Step 3 to determine the derivatives of  sin[x],  x3,  and  tanh[sin[z2]].

Step 5 - Complete the following code which uses the definite integral form of  Integrate[]  to create functions for the velocity and position of the ball discussed in the original problem as functions of  x[0],  v[0],  g,  and  t.

Clear[g, vo, xo, a, v, x, t, s]
a[t_, g_] = -g
v[xo_, vo_, t_, g_] =
    vo + 
x[xo_, vo_, t_, g_] =
    xo +

Step 6 - You now want to solve the equation  x[to] = 0  for the time  to  that the ball strikes the ground, and then use that time  to find  v[to].   The MMA command you want to use is, not surprisingly, Solve[].  Find out about this function.

Comment 6

Step 7 - Solve your position equation for  to  and name the output  soln.  Describe the form in which   soln  appears.

Comment 7

Step 8 - What MMA command do you think might simplify algebraic equations?  Find it, describe it, and apply it to  soln.

Comment 8

Step 9 - Find out about the postfix notation in Wolfram and use it to apply  Simplify[]  to your result in Step 7.

Comment 9

Step 10 - Now, as illustrated in the next cell, you can evaluate  v[to]  by using replacement rules.   Look over the code and then activate the cell.

v[xo, vo, to, g] /.
    {to -> (vo + Sqrt[vo^2 + 2*g*xo])/g}

Comment 10

Step 11 - Type in the following and describe what results.

Comment 11

Step 12 - Now find  v[to]  for the two values of  to  using  soln[[1]]  and  soln[[2]].  Simplify the results using postfix notation.

Step 13 - Try applying   soln   directly as a replacement rule in Step 10.  What do you find?

Comment 13

Step 14 - If you didn't want to use replacement rules, you could set   to = soln[[1,1,2]]  and then plug  to  directly into the velocity function.  Try this out.

Step 15 - Create a function that determines the final speed of the ball as a function of  vo,  xo,  and  g.  Then use it to plot the final speed as a function of  vo  when  xo  is  100  and  vo  goes from  -100  to  100.

Save Your Notebook