Taylor expansion issues



Am Sonntag, den 22.08.2010, 13:52 +0200 schrieb Dieter Kaiser:
> Am Sonntag, den 22.08.2010, 12:46 +0200 schrieb Sergio Callegari:
> > Hi,
> > 
> > I define the following
> > 
> > f(psi,beta):=%e^(beta*(asin((2*psi)/%pi)-atan2(1,beta)+%pi/2))*cos(asin((2*psi)/%pi)-atan2(1,beta))
> > 
> > and I have issues in getting the taylor series around zero, while 
> > considering beta a constant.
> > 
> > for instance
> > 
> > taylor(f(psi,beta),psi,0,0);
> > 
> > returns
> > 
> > (%o69)/T/ 
> > (sqrt(beta^2+1)*(beta+%i)^(%i*beta)*%e^((%pi*beta)/2)*beta)/((beta^2+1)^((%i*beta)/2)*beta^2+(beta^2+1)^((%i*beta)/2))+...
> > 
> > where the imaginary unit is somehow weird.
> > 
> > Any clue?
> 
> A workaround is not to use the names "psi" and "beta". Both names
> represent Maxima functions. The symbols might have special properties.
> 
> I get the following
> 
> (%i45) f(psi,beta):=%e^(beta*(asin((2*psi)/%pi)-atan2(1,beta)+%
> pi/2))*cos(asin((2*psi)/%pi)-atan2(1,beta));
> (%o45) f(psi,beta):=%e^(beta*(asin(2*psi/%pi)-atan2(1,beta)+%pi/2))
>          *cos(asin(2*psi/%pi)-atan2(1,beta))
> 
> Here I use the variables x and y and not psi and beta. I have not
> checked the result:
> 
> (%i46) taylor(f(x,y),psi,0,0);
> (%o46) +cos(asin(2*x/%pi)-atan2(1,y))*%e^((asin(2*x/%pi)-atan2(1,y)+%
> pi/2)*y)
> 
> Nevertheless it is interesting to look at what point the imaginary unit
> is introduced in the result.

Sorry, my last posting is nonsense.

Of course we have the imaginary unit in the result when we change the
names of the variables too.

(%i59) taylor(f(x,y),x,0,0);
(%o59) +sqrt(y^2+1)*(y+%i)^(%i*y)*%e^(%pi*y/2)*y
        /((y^2+1)^(%i*y/2)*y^2+(y^2+1)^(%i*y/2))

Dieter Kaiser