# Question:Issues related to approximation and trigonometric

## Question:Issues related to approximation and trigonometric

Maple

Hi,

I have an expression (functionx) that I want to convert it to a series of x with different powers. My only issue is that I cannot accept negative powers. For example, If I had functionx = cos(x) I want to convert it to 1 - 1/2*x^2 + 1/24*x^4, which can be done with a Taylor expansion.

Here the functionx is a bit complicated if I use Tylor expansion that means I only consider the approximation for a small range of x. Is there any other approximation I could use to convert functionx to a new function that has x to the power of positive values?

```restart;
functionx:=(0.007334702136*x + 2.418028262*10^231*x^57 + 1.182475218*10^223*x^55 + 5.780663993*10^214*x^53 + 2.824838912*10^206*x^51 + 6.735888408*10^189*x^47 + 1.379783148*10^198*x^49 + 3.286285701*10^181*x^45 + 7.803772225*10^164*x^41 + 1.602116861*10^173*x^43 + 1.845464073*10^148*x^37 + 3.797245890*10^156*x^39 + 4.338988887*10^131*x^33 + 8.956080140*10^139*x^35 + 2.097852265*10^123*x^31 + 4.865844768*10^106*x^27 + 1.011819388*10^115*x^29 + 2.331704338*10^98*x^25 + 1.112530729*10^90*x^23 + 2.489476842*10^73*x^19 + 5.280116219*10^81*x^21 + 5.385068408*10^56*x^15 + 1.164024492*10^65*x^17 + 4.797076312*10^31*x^9 + 1.099976521*10^40*x^11 + 2.456776729*10^48*x^13 + 7.927675416*10^14*x^5 + 2.012154161*10^23*x^7 + 2.781719840*10^6*x^3)/(0.003667351068*x^2 + 695429.9599*x^4 + 4.737736934*10^(-11) + 4.169014245*10^229*x^58 + 1.070493332*10^213*x^54 + 2.111562890*10^221*x^56 + 5.432382523*10^204*x^52 + 1.403310085*10^188*x^48 + 2.759566295*10^196*x^50 + 7.144099350*10^179*x^46 + 1.858041006*10^163*x^42 + 3.641174684*10^171*x^44 + 9.493114726*10^154*x^40 + 4.856484403*10^146*x^38 + 1.276173202*10^130*x^34 + 2.487800039*10^138*x^36 + 6.555788327*10^121*x^32 + 3.372731292*10^113*x^30 + 1.737801703*10^105*x^28 + 8.968093608*10^96*x^26 + 4.635544704*10^88*x^24 + 1.244738421*10^72*x^20 + 2.400052827*10^80*x^22 + 9.166471012*10^38*x^12 + 1.754840521*10^47*x^14 + 3.365667755*10^55*x^16 + 6.466802735*10^63*x^18 + 1.321279236*10^14*x^6 + 2.515192701*10^22*x^8 + 4.797076312*10^30*x^10)^2:
plot(functionx, x=-0.001..0.001):
```

The reason that I look for an expression for functionx is:

I need to replace x with a series of sin and cos functions and then find specific coefficients that have that sin or cos. In the current form Maple cannot find the coefficients of sin and cos.

I hope it is clear. I have attached the main code.Expansion.mw

Regards,

Baharm31

﻿