| Author |
Comment/Response |
jf
|
09/09/11 09:43am
You can use Chop after the fact,
In[1]:= Integrate[(0.5*(Sin[s/R])^3 - Sin[s/R]*(Cos[s/R])^2)/R^2, {s,
0, s}]
Out[1]= (2.77556*10^-17 - 0.5 Cos[s/R] + 1.66533*10^-16 Cos[s/R]^2 +
0.5 Cos[s/R]^3)/R
In[2]:= Chop[%]
Out[2]= (-0.5 Cos[s/R] + 0.5 Cos[s/R]^3)/R
Or make the 0.5 an exact number,
In[3]:= Integrate[((1/2)*(Sin[s/R])^3 - Sin[s/R]*(Cos[s/R])^2)/R^2, {s, 0, s}]
Out[3]= -((Sin[s/R] Sin[(2 s)/R])/(4 R))
The two results are equivalent.
In[4]:= FullSimplify[ % - %%, Element[{R, s}, Reals]]
Out[4]= ((0. + 0. I) - (2.22045*10^-16 + 0. I) Cos[s/R] - (2.77556*10^-17 + 0. I) Cos[(3 s)/R])/R
In[5]:= Chop[%]
Out[5]= 0
Floating-point approximate numbers are difficult for Integrate and Solve. This is a Mathematics issue, not Mathematica.
URL: , |
|