Re: real function argument
- To: mathgroup at smc.vnet.net
- Subject: [mg73427] Re: real function argument
- From: "dimitris" <dimmechan at yahoo.com>
- Date: Fri, 16 Feb 2007 00:59:15 -0500 (EST)
- References: <er1bq1$7ci$1@smc.vnet.net>
Use ComplexExpand
In[5]:=
Information@ComplexExpand
>From In[5]:=
"ComplexExpand[expr] expands expr assuming that all variables are
real. ComplexExpand[expr, {x1, x2, ... }] expands expr \
assuming that variables matching any of the xi are complex."
>From In[5]:=
Attributes[ComplexExpand] = {Protected, ReadProtected}
Options[ComplexExpand] = {TargetFunctions -> {Re, Im, Abs, Arg,
Conjugate, Sign}}
In[12]:=
f[x_] := Re[Cos[x] + I*Sin[x]]
In[13]:=
Derivative[1][f][x]
Out[13]=
(-Cos[x])*Derivative[1][Im][Sin[x]] - Sin[x]*Derivative[1][Re][Cos[x]]
In[14]:=
ComplexExpand[%]
Out[14]=
-Sin[x]
Dimitris
=CF/=C7 bar at ANTYSPAM.ap.krakow.pl =DD=E3=F1=E1=F8=E5:
> Hi,
> I have a problrm with defining real argument
>
> In: f[x_]:=Re[Cos[x]+I Sin[x]]
> f'[x]
>
> Out: -Cos[x] Im'[x]-Sin[x]Re'[x]
>
> In: FullSimplify[f'[x],Element[x,Reals]]
> gives the same out
>
> Any suggestions ?
>
> Regards, Olaf