MathGroup Archive 2000

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Problem with Integration

  • To: mathgroup at smc.vnet.net
  • Subject: [mg22518] Re: Problem with Integration
  • From: "Kevin J. McCann" <kevinmccann at home.com>
  • Date: Thu, 9 Mar 2000 03:24:10 -0500 (EST)
  • References: <8a53ai$dln@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

By using "1.0" rather than "1" in your function definition, you cause Mathematica to
go numeric rather than symbolic. Try:

U[f_]:=Integrate[Cos[(f*Pi)/(180*2) + alpha],{alpha,-(Pi/3), Pi/3}]

Now

U[60]
-(1/2)*(-1)^(5/6)*Sqrt[3]*(1 + (-1)^(1/3))

ugly

but

U[60]//Simplify
3/2

"Hans Friedrich Steffani" <hans.steffani at e-technik.tu-chemnitz.de> wrote in
message news:8a53ai$dln at smc.vnet.net...
> In[1]:= U[f_]:=1.0*Integrate[Cos[(f*Pi)/(180*2) + alpha],{alpha,-(Pi/3),
Pi/3}]
>
> In[2]:= U[60]
>
>                         -16
> Out[2]= 1.5 - 6.08617 10    I
>
> In[3]:= Integrate[Cos[(f*Pi)/(180*2) + alpha],{alpha, -(Pi/3), Pi/3}]
>
>                     f Pi
> Out[3]= Sqrt[3] Cos[----]
>                     360
>
> Cos[f Pi/360] should be real vor any real f. How can I avoid results
> like Out[2] (exepct using Chop[] or Re[])?
>
> Hans Friedrich Steffani
>
> PS:
> Thanks for the help with my other problems last week.
> h.f.s.
>
> --
> Hans Friedrich Steffani
> Institut fuer Elektrische Maschinen und Antriebe, TU Chemnitz
> mailto:hans.steffani at e-technik.tu-chemnitz.de
> http://www.tu-chemnitz.de/~hfst/
>



  • Prev by Date: Re: Graphing Functions
  • Next by Date: Matrices & Compile
  • Previous by thread: Re: Problem with Integration
  • Next by thread: Re: Problem with Integration