Previous Page Next Page Contents

conjugate -- complex conjugation

Introduction

conjugate(z) computes the conjugate Re(z) - I*Im(z) of a complex number z = Re(z) + I*Im(z).

Call(s)

conjugate(z)

Parameters

z - an arithmetical expression

Returns

an arithmetical expression.

Overloadable:

z

Side Effects

conjugate is sensitive to properties of identifiers set via assume.

Related Functions

abs, assume, Im, Re, rectform, sign

Details

Example 1

conjugate knows how to handle sums, products, the exponential function and the sine function:

>> conjugate((1 + I)*exp(2 - 3*I))
                           (1 - I) exp(2 + 3 I)
>> delete z: conjugate(z + 2*sin(3 - 5*I))
                       conjugate(z) + 2 sin(3 + 5 I)

Example 2

conjugate reacts to properties of identifiers:

>> delete x, y: assume(x, Type::Real):
   conjugate(x), conjugate(y)
                              x, conjugate(y)                               

Example 3

If the input contains a function that the system does not know, then a symbolic conjugate call is returned:

>> delete f, z: conjugate(f(z) + I)
                            conjugate(f(z)) - I

Now suppose that f is some user-defined mathematical function, and that conjugate(f(z)) = f(conjugate(z)) holds for all complex numbers z. To extend the functionality of conjugate to f, we embed it into a function environment and suitably define its "conjugate" slot:

>> f := funcenv(f):
   f::conjugate := u -> f(conjugate(u)):

Now, whenever conjugate is called with an argument of the form f(u), it calls f::conjugate(u), which in turn returns f(conjugate(u)):

>> conjugate(f(z) + I), conjugate(f(I))
                        f(conjugate(z)) - I, f(- I)

Background

Changes




Do you have questions or comments?


Copyright © SciFace Software GmbH & Co. KG 2000