On 4 Apr 2008, at 09:57, David Forehand wrote:
> Hi All,
>
> My first posting here, so please forgive me if I am being a bit
> stupid.
>
> I'm entering the following input:
>
> D[f[t0, t1], t0, t1] /. {f -> ((#1^2)*Conjugate[a[#2]] &)}
>
> and Mathematica gives the following output:
>
> 2 t0 a'[t1] Conjugate'[a[t1]]
>
> I would have expected:
>
> 2 t0 Conjugate[a'[t1]]
>
> i.e. the derivative of a conjugate is the conjugate of the derivative.
>
> Any idea how a force Mathematica to give the result I am expecting?
> In the above, I am assuming the variables "t0" and "t1" are real and
> the variable "a" is complex, although I have not explicitly told
> Mathematica this.
>
> Thanks Very Much in advance,
>
> David
>
Mathematica always assumes that the derivative is computed in the
complex plane and it automatically applies the chain rule. It
certianly would be wrong to assume that the derivative commutes with
conjugation, as that is not true in general in the complex plane, so
if Mathematica did not automatically apply the chain rule it would
have to return your input unevaluated. One way to avoing your problem
is to write your function a[x] explicitly as a sum of its real and
imaginary parts, say c[x] and d[x]. First make a list of replacement
rules for getting the output back in terms of a[x]:
rules = {c[x_] :> Re[a[x]], d[x_] :> Im[a[x]],
Derivative[n_][c][x_] :> Re[Derivative[n][a][x]],
Derivative[n_][d][x_] :> Im[Derivative[n][a][x]]};
Now, we differentiate usign c[x]+I d[x] in place of a[x], apply rules
and FullSimplify:
FullSimplify[D[f[t0, t1], t0, t1] /.
{f -> (#1^2*(c[#2] - I*d[#2]) & )} /. rules]
2*t0*Conjugate[Derivative[1][a][t1]]
Andrzej Kozlowski