janhardo

335 Reputation

8 Badges

11 years, 45 days

MaplePrimes Activity


These are replies submitted by janhardo

@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("⁢"), 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?

@acer Examing this function arctan as real and complex for his definition is to study

--------------------------------------------------------------------------------------

For real arguments x, y, the two-argument function arctan(y, x), computes the principal value of the argument of the complex number   x + yI , so 
          -Pi < arctan(y, x) and arctan(y, x) <= Pi

. This function is extended to complex arguments by the formula
      arctan(y, x) = -I*ln((x + y*I)/sqrt(x^2 + y^2))

--------------------------------------------------------

Numerical_evaluation_post_acer_verder_bekijken.mw

@vv 

---------------------------------------------

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

-------------------------------------

What is a?.. -> ln ( a+bI) , z= a+bI 

plot_compare_en_functionadvisorvoor_onderzoek_complexe_functies_.mw

@Carl Love 

Thanks

Indeed a extensive help page

In complex analysis, there are several classes of singularities. These include the isolated singularities, the nonisolated singularities and the branch points.

Branch points are generally the result of a multi-valued function, such as  or 

Multivariate functions are studied using Riemann surfaces. The formal definition of branching point even uses the concept of a Riemann surface.

Riemann surfaces can be thought of as deformed versions of the complex plane:

The main interest in Riemann surfaces is that holomorphic functions may be defined between them. Riemann surfaces are nowadays considered the natural setting for studying the global behavior of these functions, especially multi-valued functions such as the square root and other algebraic functions, or the logarithm.

When discussing functions of a complex variable it is often convenient to think of a cut in the complex plane.

The wiki can help : Holomorphic function - Wikipedia

Try to get a idea what this all abouts 

@Carl Love Thanks
I checked it and it "works"
I will give attention to plotcompare command.
Seems to me that it easier to study both plots side by side 

The plotcompare command can be used for one function to start with and see branchpoints/cuts?

@janhardo 

2d input

This 2d input is converted to maple to 1d input

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

Seems to be impossible in Maple to get this 2d input as answer, via 1d maple input like in my textbook ( the simplification done by @acer is correct (good job), but it is not in the wanted form)

Ok you can say why bother further about this, although its right?
Its so satifsying to see in Maple exact the same as in a textbook. 

5 6 7 8 9 10 11 Last Page 7 of 38