janhardo

695 Reputation

12 Badges

11 years, 38 days

MaplePrimes Activity


These are replies submitted by janhardo

@Axel Vogt 

Thanks

I do have a lot of lecture notes about complex analysis and the collection is growing
I studied first the classical example of a two valued function : the logarithmic function
Got a first idea about a branch point and cut from this ln(z) .

Then i went to the arctan (z) function to look at this with the FunctionAdvisor(arctan)
For me important when has een complex function a branch point, if so then it is a multivalued function i think, but not sure about it
Studying the "branch" information Maple gives from arctan(z) is complicated to understand for now, so you need the theoretical background from some books 

restart;

with(plots):

ans := -I*1/2*ln((b + z*I)/(b - z*I))/b;

-((1/2)*I)*ln((b+I*z)/(b-I*z))/b

(1)

 plot3d([Re,Im](arctan(z/b)/b-ans),b=-4..4,z=-4..4,
       color=[red,blue],grid=[100,100],view=-1e-14..1e-14);

 

ans := -I/2*ln((1 + 1*I)/(1 - 1*I))/1; #take 1, for all variables

(1/4)*Pi

(2)

# arctan(z/b)/b-ans = arctan(1/1)/1-ans

FunctionAdvisor(arctan(Pi/4));

 

?FunctionAdvisor

FunctionAdvisor(branch_points, arctan(Pi/4));FunctionAdvisor(branch_cuts, arctan(Pi/4));

[arctan((1/4)*Pi), `in`((1/4)*Pi, [-I, I])]

 

[arctan((1/4)*Pi), "No branch cuts"]

(3)

ans := -I*1/2*ln((b + z*I)/(b - z*I))/b;

-((1/2)*I)*ln((b+z*I)/(b-z*I))/b

(4)

plot3d(arctan(Pi/4));# try getting a complex plot, so Pi/4 must be a complex number  

 

 

I must try to plot th ecomplexfunction with the right notation RE AND Im om axes and make a closer look tot the function for spotting branch cuts ( vertical lines).
Can do a lot with plot options

 plot3d([Re,Im](arctan(z/b)/b-ans),b=-4..4,z=-4..4,
       color=[red,blue],grid=[100,100],view=-1e-14..1e-14);

 

 

Download branch_onderzoek_berekende_complexe_integraal.mw

@Carl Love 

Thanks

Getting a "bookform" expression as last step ( because Maple has give his latest answer and is this is not the bookform) is be done by hand.

?op

restart;

expr1:= -I/2*ln((b + z*I)/(b - z*I))/b;
 

-((1/2)*I)*ln((b+I*z)/(b-I*z))/b

(1)

-I*ln((b+I*z)/(b-I*z))/(2*b)

 (bookform)

-((1/2)*I)*ln((b+I*z)/(b-I*z))/b

(2)

expr2:= -I/(2*b)*ln((b + z*I)/(b - z*I));# convert from 2d input

-((1/2)*I)*ln((b+I*z)/(b-I*z))/b

(3)

%-%;

0

(4)

 

(-I/2*ln((b + z*I)/(b - z*I))/b) - (-I/(2*b)*ln((b + z*I)/(b - z*I)));

0

(5)

 

In 2D input  i transformed expr1 by hand , checked this if it is correct by subtracting expr1 - expr2

Download post-Double_back_quotes_for_hard_parentheses.mw

@Axel Vogt 

Thanks

I try to learn how to examine complex multi-valued function on branches, but  its limited to not so many complex functions in Maple (no,there are more..see branch_cuts in FunctionAdvisor.
I calculated a complex integral , this could be examined for branch points ? 

 plot3d([Re,Im](arctan(z/b)/b-ans),b=-4..4,z=-4..4,
       color=[red,blue],grid=[100,100],view=-1e-14..1e-14);

The most basic case of the multi valued function is  the f(z) = z^1/2  as inverse from f(z)= z^2 as i understand it now.

Another fact about real function opposite complex functions is for example
 e^x  <inverse>  ln x  are one to one functions (bijection) 
e^z   <inverse>  ln z  , e^z  is many to  1  and ln z is  1 to many ( multivalued )

FunctionAdvisor(branch_points, exp);
                  [exp(z), "No branch points"]

@janhardo 

At the moment there are these (multivalued) functions known to Maple for the presence of branches

arcsin
arccos
arctan
arccsc
arcsec
arccot
arcsinh
arccosh
arctanh
arccsch
arcsech
arccoth
ln
LambertW

@vv 
Thanks

There are some more Maple commands to get about handling of complex functions
Knowing more about a branch cut/point ..?

@janhardo 

Now how to use this TS module in other cases?

Here  example: "bookform"

TS:-Mn(2):
TS:-Mn(i):
TS(i/(2*b))*ln(``(b*i+z)/(b*i-z));

Those use of the double back quotes ` ` ...?

@Carl Love 

Thanks

Amazing coding you performed.
It did the job by showing the "bookform"

Is there a general use for your TS module programming , in case there is another calculation in the future made by me what has not a desired "bookform" answer. ?

Otherwise i do have to check this manually a result( imagine i use a computeralgebra program and  must check this answer if it is correct ?)
Its only a last step so  i think it can be that hard (as this integral example proves)

If there is a command possible in Maple in the future  what can split a expression   ?

@janhardo 

For transforming  expression (2) into the bookanswer form :

I could try to divide expression (2) by b for the fraction. 
I could bring the b under  -1/2ln..this is a splitting case of the fraction ( expression (2))

Doing(trying  )handmade transformation is problematic

expr:=-I/2*ln((b + z*I)/(b - z*I))/b;   =  

 denom(expr); =                          numer(expr); =                                          

So Maple does see 2b as denominator , while i consider b as denominator for manipulation for splitting the expr  fraction

Maple is making from expr a only one  fraction what is correct 

@Carl Love 
Thanks

I am curious if the evaluated expression in Maple from the  complex integral calculation can be used in your module code?

restart
:
TS:= module()
uses T= Typesetting;
local
    #Using Typesetting:-_Hold introduces unwanted parentheses. I get
    #around that by using attributes and my own Hold.
    Hold,
    ModuleApply:= e-> setattribute(T:-Typeset(e), Hold(e))
;
export
    #`macro` is needed because Typesetting:-Typeset declares its 1st
    #parameter uneval.
    Mn:= e-> (parse@sprintf)("macro(%a=%a)", ``||e, T:-mn(""||e)),
        
    Value:= e-> subsindets(
        subsindets(
            subs[eval](``= (()-> args), e), attributed,
            e->
            local p, A:= [attributes](e);
                `if`(membertype(specfunc(Hold), A, 'p'), op(A[p]), e)  
        ),
        specfunc({T:-mn, T:-mi}),
        N-> try parse(op(1,N)) catch: N end try
    )
;
end module
:

TS:-Mn(2):
TS(a/(`2`*d)) . ``(b/c);
TS:-Value(%);
lprint(%);

Parse:-ConvertTo1D, "invalid input %1", Typesetting:-mfrac(Typesetting:-mi("a"), Typesetting:-mrow(Typesetting:-mn("2"), Typesetting:-mo("&InvisibleTimes;"), Typesetting:-mi("d"))).``(b/c)

 

(1/2)*a/d.(b/c)

 

1/2*(a/d . (b/c))

 

 

What was the start of this all : the maple prime post: how to perform this complex subtition
https://www.mapleprimes.com/questions/233292-How-To-Perform-This-Complex-Substitution

 

There was een integration of complex integral and the end answer in Maple was not the same as in the book example  

 

 Maple answer was      

 

The bookanswer was :   

 

Maple was not able to do more simplifications in order to get the book answer and both answer are the same.

I  simplified the question by using

                                                  

Evaluated in Maple you get :                                                                  

((1/2)*a*(b/c))/d;

(1/2)*a*b/(c*d)

(1)

-I/2*ln((b + z*I)/(b - z*I))/b;

-((1/2)*I)*ln((b+I*z)/(b-I*z))/b

(2)

 

 If i use your module code it must be then possible  to transform answer( 2)  hereabove into the bookanswer ?

Download Post-how_get_a_wanted_expression-reactie_Carl_met_module_programmering.mw

Seems to be that the earlier posts reactions by @acer on my question are disappaerd, what is happened?

@acer 

Thanks

It seems not be possible with a direct command to evaluate(rewrite ) this expression in Maple into two fractions ?
Its easy  asked, but  in Maple ?

@acer 

Thanks

Looks to me  complicated with trial and error to use the InertForm and with this it seems to be possible to  construct from the expression the wanted expression.
I understand that after a evaluation of a expression you get a answer  -and you know a wanted another mathematical  representation of it- you can chance this with the InertForm command.
Can it not be done simpler,its only split a fraction for  b and c 

@acer 
Thanks 

The b/c factor as fraction must be preserved as seen as rightside  in the 2D input example.

i made the expression (expr) as a logical mathematical input with parentheses. ( as opposite as you did) 

expr: ( (1/2)*a*(b/c) )/ d; =  

From this outcome the b/c fraction must be preserved, so the fraction needs to be split. 
There is a parfrac command, but that is for one variable

@janhardo 
The complex function ln(z) is the classical example for a multi- valued function as it seems.
Branching .. ?

First 39 40 41 42 43 44 45 Last Page 41 of 73