Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2008

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

Search the Archive

Re: Transforming a polynomial into a trigonometric format tia sal2

  • To: mathgroup at smc.vnet.net
  • Subject: [mg88331] Re: Transforming a polynomial into a trigonometric format tia sal2
  • From: Jean-Marc Gulliet <jeanmarc.gulliet at gmail.com>
  • Date: Fri, 2 May 2008 03:41:48 -0400 (EDT)
  • Organization: The Open University, Milton Keynes, UK
  • References: <fv42j9$5ui$1@smc.vnet.net> <fvbr1n$pgq$1@smc.vnet.net>

ratullochjk2 at gmail.com wrote:

> I'm sorry if I didn't explain myself better I hope this clarifies it
> better
> 
> when I test for x =3 x= 7 for equation:
> 21 - 10 x + x^2 I get zero for both answers
> 
> I used another math program using the ChebyshevT command and I
> got this
> 1/2 Cos[2 ArcCos[x]] + 43/2 - 10 x I tested with x=3 and x=7 and I
> also got zero for both
> 
> but when I do a TrigReduce
> 
> In[148] := 21 - 10 x + x^2 /. x -> Cos[y] // TrigReduce
> 
> I get
> 
> Out[149]:= 1/2 (43 - 20 Cos[x] + Cos[2 x])
> x=3 gives me 31.88
> x=7 gives me 14.0293
> 
> I would like to use the ChebyshevT in mathematica 6 because I prefer
> that software but I'm not sure
> how to get the 1/2 Cos[2 ArcCos[x]] + 43/2 - 10 x answer in
> mathematica 6
> 
> Am I doing something wrong with the TrigReduce function or leaving a
> part out why are the answers not even close?

[snip]

The function you obtain by the replacement rule x -> cos[y] (Note that 
whether TrigReduce is applied or not does not change the overall result) 
  is equivalent neither to the original polynomial nor to the Chebyshev 
polynomial.

Below, you can easily see that the graph of the original polynomial p[x] 
intersects the graph of the "approximation" tt[x] only in two points. 
Note that former is a quadratic whereas the latter is a sinusoid! So the 
transformation does not work.

In[1]:= p[x_] = 21 - 10 x + x^2
t[x_] = 1/2 Cos[2 ArcCos[x]] + 43/2 - 10 x // Simplify
tt[x_] = (21 - 10 x + x^2 /. x -> Cos[y] // TrigReduce) /. y -> x
Plot[{p[x], t[x], tt[x]}, {x, -10, 10}, PlotStyle -> {Red, Blue, Orange}]
FindRoot[p[x] == tt[x], {x, 1}]
FindRoot[p[x] == tt[x], {x, 10}]

Out[1]=
              2
21 - 10 x + x

Out[2]=
1
- (43 - 20 x + Cos[2 ArcCos[x]])
2

Out[3]=
1
- (43 - 20 Cos[x] + Cos[2 x])
2

Out[4]= [... plot deleted ...]

Out[5]= {x -> 0.739085}

Out[6]= {x -> 10.487}


Regards,
-- Jean-Marc



  • Prev by Date: Re: partial differential equation of diffusion
  • Next by Date: Re: Re: Transforming a polynomial into a trigonometric format tia sal2
  • Previous by thread: Re: Re: Transforming a polynomial into a trigonometric format tia sal2
  • Next by thread: Re: Coordinate readout from Graphics3D?