On 21 November 2014 at 20:18, Ondřej Čertík <ondrej.cer...@gmail.com> wrote:
>
> I am still confused about one thing: is this issue is already
> present in FriCAS before your changes? Because you can
> already use conjugate, sin, +, *, ..., even without defining the
> derivative for abs(x). I fail to see how defining the abs(x).diff(x)
> in the way you did it  can introduce issues that weren't present
> in the first place.
>

FriCAS currently does not implement a symbolic 'conjugate' operator.
The issue concerns whether adding 'conjugate' is a good idea and only
secondly how to differentiate it.

> -----
>
> I have finished the writeup, it starts here (you might want to refresh
> your browser to see the latest changes):
>
> http://www.theoretical-physics.net/dev/math/complex.html#complex-conjugate
>
> and it was implemented with these two PRs:
>
> https://github.com/certik/theoretical-physics/pull/39
> https://github.com/certik/theoretical-physics/pull/40
>

Thanks.

> I must say one thing that I like about the "theta" is that it tells
> you immediately if the function is analytic or not (if theta is
> present it is not, if it is not present, then the expression does not
> depend on theta, and thus is analytic). For example, for log(z),
> the theta cancels, and so the result 1/z is analytic.
>

Still looks ugly to me.

> I found a bug in these results from FriCAS:
>
>> (4) -> D(abs(f(x)),x)
>>
>>              , _      _  ,
>>         f(x)f (x) + f(x)f (x)
>>
>>    (4)  ---------------------
>>               2abs(f(x))
>>                                                     Type:
>> Expression(Integer)
>> (5) -> D(abs(log(x)),x)
>>
>>         _    _
>>         xlog(x) + x log(x)
>>    (5)  ------------------
>>             _
>>           2xxabs(log(x))
>>                                                     Type:
>> Expression(Integer)
>
> The bar must be over the whole f(x) as well as log(x), because
> conjugate(log(x)) is only equal log(conjugate(x)) if x is not
> negative real number.

In FriCAS with my patch functions defined by

  f := operator 'f

are currently assume to be holomorphic and log is holomorphic by definition so

conjugate(log(x)) = log(conjugate(x))

Perhaps you are considering the wrong branch.

> See the example here:
> http://www.theoretical-physics.net/dev/math/complex.html#id1 where I
> have it explicitly worked out. You can also check that easily in
> Python:
>
> In [1]: from cmath import log
>
> In [2]: x = -1+1j
>
> In [3]: log(x).conjugate()
> Out[3]: (0.34657359027997264-2.356194490192345j)
>
> In [4]: log(x.conjugate())
> Out[4]: (0.34657359027997264-2.356194490192345j)
>
> In [5]: x = -1
>
> In [6]: log(x).conjugate()
> Out[6]: -3.141592653589793j
>
> In [7]: log(x.conjugate())
> Out[7]: 3.141592653589793j
>
> In [8]: log(x.conjugate()) - 2*pi*1j
> Out[8]: -3.141592653589793j
>
>
> Where [3] and [4] are equal, but [6] and [7] are not (you need to
> subtract 2*pi*i from [7], as in [8], in order to recover [6],
> consistent with the formula in the writeup).
>

Complex 'log' is a multi-valued like 'sqrt' so you need to consider
more than one branch.

Bill.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to