Ask Your Question
0

Why is diff(conjugate(x),x) unevaluated?

asked 2014-09-03 03:25:09 +0100

Or, can we differentiate holomorphic functions only?

Wirtinger defined two derivations in complex analysis for which we have: diff(x,conjugate(x)) = 0 and diff(conjugate(x),x) = 0.

http://en.wikipedia.org/wiki/Wirtinge...

Wirtinger calculus has important applications in optimization and has been extended to quaternion functions.

Is there any situation in which leaving diff(conjugate(x),x) unevaluated is an advantage?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2014-09-03 12:08:26 +0100

tmonteil gravatar image

updated 2014-09-03 13:17:57 +0100

I am not sure this will answer your question, but perhaps could you use two variables, though is is a bit tedious:

sage: var('x y')
(x, y)
sage: conj(x,y) = (x,-y)
sage: diff(conj)
[ (x, y) |--> 1  (x, y) |--> 0]
[ (x, y) |--> 0 (x, y) |--> -1]

Then you can define i, d and dbar as follows:

sage: i(x,y) = (-y,x)
sage: d = lambda f : 1/2*diff(f,x)-1/2*i(*diff(f,y))
sage: dbar = lambda f : (1/2*diff(f,x)+ 1/2*i(*diff(f,y)))

sage: d(conj)
(x, y) |--> (0, 0)
sage: dbar(conj)
(x, y) |--> (1, 0)

Let us check that sin is holomorphic:

sage: mysin(x,y) = (real(sin(x+I*y)),imag(sin(x+I*y)))
sage: dbar(mysin)
(x, y) |--> (1/2*sin(-imag_part(y) + real_part(x))*sinh(imag_part(x) + real_part(y))*D[0](imag_part)(x) - 1/2*sin(-imag_part(y) + real_part(x))*sinh(imag_part(x) + real_part(y))*D[0](imag_part)(y) + 1/2*cos(-imag_part(y) + real_part(x))*cosh(imag_part(x) + real_part(y))*D[0](real_part)(x) - 1/2*cos(-imag_part(y) + real_part(x))*cosh(imag_part(x) + real_part(y))*D[0](real_part)(y), 1/2*cos(-imag_part(y) + real_part(x))*cosh(imag_part(x) + real_part(y))*D[0](imag_part)(x) - 1/2*cos(-imag_part(y) + real_part(x))*cosh(imag_part(x) + real_part(y))*D[0](imag_part)(y) - 1/2*sin(-imag_part(y) + real_part(x))*sinh(imag_part(x) + real_part(y))*D[0](real_part)(x) + 1/2*sin(-imag_part(y) + real_part(x))*sinh(imag_part(x) + real_part(y))*D[0](real_part)(y))
sage: dbar(mysin) == (0,0)
False

Hmm, not enough, we have to simplify the expressions first:

sage: dbar(mysin)[0].full_simplify()
(x, y) |--> 0
sage: dbar(mysin)[1].full_simplify()
(x, y) |--> 0

If we try with a non-holomorphic one:

sage: f(x,y) = (x+y, cos(x-y))
sage: dbar(f)[0].full_simplify()
(x, y) |--> -1/2*cos(y)*sin(x) + 1/2*cos(x)*sin(y) + 1/2
sage: dbar(f)[1].full_simplify()
(x, y) |--> -1/2*cos(y)*sin(x) + 1/2*cos(x)*sin(y) + 1/2

Not bad.

But HEY, x and y are not assumed to be real, so i should not get 0 here. There is an assumption mechanism that tells Sage that x and y are real, but we did not use it here. Well, how to say:

sage: real_part(x).full_simplify()
x
sage: imag_part(x).full_simplify()
0

This is indeed a bug of the ugly Symbolic Ring, which we turned into a feature ! I let you define d and dbar to include full_simplify in them.

edit flag offensive delete link more

Comments

Thanks. This is cute, but as you say does not really answer the question. I am thinking of a way to make diff equivalent to your d operator, then dbar can be implemented simply by substituting a dummy variable for conjugate(x).

Bill Page _ again gravatar imageBill Page _ again ( 2014-09-03 15:29:10 +0100 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2014-09-03 03:25:09 +0100

Seen: 544 times

Last updated: Sep 03 '14