- #1
- 970
- 670
Velocity as a function of time, defined with units attached (Quantity feature of Mathematica):
When we printed above the value and integral, we got the correct results with proper units.
Now I'm trying to define another function:
How can I fix the above so it outputs 36 m ? Also, I would like to print say fnX[ 2000 ms ] and have it interpret the milliseconds correctly and output the correct value with correct units.
Code:
fnVq[t_ ]:= 2 m/s^2 * t
fnVq[5 s]
Integrate[fnVq[tt],{tt,0 s, 2000 ms}]
10m/s
4m
Now I'm trying to define another function:
Code:
fnX[tx_]:=Integrate[fnVq[tt ], {tt ,0 ,tx }]
fnX[6 ]
36m/(s)^2
How can I fix the above so it outputs 36 m ? Also, I would like to print say fnX[ 2000 ms ] and have it interpret the milliseconds correctly and output the correct value with correct units.