janhardo

700 Reputation

12 Badges

11 years, 66 days

MaplePrimes Activity


These are replies submitted by janhardo

@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 .. ?

@acer 

Thanks

Strange with these two complex expressions  , Is this also the case in real calculus ?

@vv 

Thanks 
I do see two different answers for the same equation ?..a yes that is what @acer mentioned
Its one equation without a fraction in it and one equation has a fraction in it
----------------------------------------------------------------------------

@janhardo You should use the symbolic option only in the rare cases when you don't care about the branch of the log.
Check here e.g. z=-1, a=-1. ( typo a must be b) 
------------------------------------------------------------------------------------
Johann Bernoulli  [1702] deduced this connection between logarithms and inverse trigonometric functions (see post picture)  and the book ( Cauchy and the creation of complex function theory) named also that : subtitutions were used without any qualms ( so johann Bernouilli made a substituton for a complex number in the integral without knowing yet what he was exactly doing )

I am in the same position..

A examination of the complex plot ln(z) must reveal this difference in outcome for the two expressions?

First 41 42 43 44 45 46 47 Last Page 43 of 75