janhardo

700 Reputation

12 Badges

11 years, 44 days

MaplePrimes Activity


These are replies submitted by janhardo

@vv 

Thanks

Unfortenaly  must first study this subject of branche(s) in order to get a idea about it 

@acer 

Thanks for searching to more easier commands.

Looking at both commands then is the combine command a much easier to use then the nested simplify command

But there was  third command used lost in the delete post what uses a e power  in his nested simplify command => no it is done by @acer

So three  rather simple ways to for transforming the expression: expr

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

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

combine(expr, symbolic);

 

> I*log(simplify(expand(exp(expr/I))));

a third ? ..no ln(exp(-I*expr))*I is done = expr

@acer
Thanks 

The most direct approach by you is something difficult to master for me, or with more explenation how it excactly all works.
For commercial use it cannot be short enough , because time is money
But for me it is only educational  use ,so when i get the same result with more easier command then i am also satisfied. 

Indeed i made mistake by over take the expression, it shows again how to be accurate is important.

@janhardo 

# You might examine these results, for your interest:
   restart;
expr := ln(1 + z*I/b) - ln(1 - z*I/b);
expr2 := normal(expr);
ans1 := combine(expr2, symbolic);
ans2 := evalindets(ans1, specfunc(ln),
                   u->ln(expand(sign(numer(op(u)))*numer(op(u)))
                         /expand(sign(numer(op(u)))*denom(op(u)))));
sort(ans2, order=plex(b,z));
restart;
foo := -(b + z*I)/(-b + z*I);
numer(foo);
sign(numer(foo));
sign(numer(foo))*numer(foo);
sign(numer(foo))*denom(foo);
expand(sign(numer(foo))*numer(foo))/expand(sign(numer(foo))*denom(foo));

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

 

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

 

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

 

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

 

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

 

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

 

-I*z-b

 

-1

 

b+I*z

 

b-I*z

 

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

(1)

 

the expr used here above seems to be   the same expression i used ? ,

I*ln(-z*I + b) - ln(z*I + b);# my expression

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

(2)

restart;

expr := I*ln(-z*I + b) - ln(z*I + b);
expr2 := normal(expr);
ans1 := combine(expr2, symbolic);
ans2 := evalindets(ans1, specfunc(ln),
                   u->ln(expand(sign(numer(op(u)))*numer(op(u)))
                         /expand(sign(numer(op(u)))*denom(op(u)))));
sort(ans2, order=plex(b,z));
restart;
foo := -(b + z*I)/(-b + z*I);
numer(foo);
sign(numer(foo));
sign(numer(foo))*numer(foo);
sign(numer(foo))*denom(foo);
expand(sign(numer(foo))*numer(foo))/expand(sign(numer(foo))*denom(foo));

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

 

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

 

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

 

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

 

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

 

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

 

-I*z-b

 

-1

 

b+I*z

 

b-I*z

 

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

(3)

 

 

But there was simpler approach by forummeber @nm 6139 : but his post is removed

 

 

 

 

Download post_acer_extra_na_verwijdering_nm_en_kitonum.mw

@janhardo 

Ok, i posted a double post ..it slipped in and the post of @nm 6131 and @kitonum are removed

The question was there was how to rearrange this  complex ln expression 

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

As you can see i did it by hand too, but don't know if it is right? :

I*ln(-z*I + b) - ln(z*I + b)= I*ln ((-z*I + b)/(z*I + b));      gives (16) see above 

If i remember the answer from nm 6131 it was like this :
expr : = I*ln(-z*I + b) - ln(z*I + b); 
I*simplify(log(exp(1)*(expr)) ;   ?        (in general : ln x^a = a*ln x)  or  take ln^a             

Note: should be nice  to  have the answer of @nm 6131 and @kitonum back again

@Kitonum 

Thanks

Your calculation brings  me back to the direction of the start formula 

@nm 

Thanks

Seems that mathematica is more advanced then Maple? 
Well, i stay  with Maple, because learning again a new language for Mathematica is too much. 

Surprize, the manual derivation of the ln expression seems to be correct what i did by hand. (it is the same as your Maple calculation)
But your  code example shows me that i must practice with this ..

Not capable of not using advanced commands makes it neccesary to know the basic rules 
Its here : a power of a logarithm with base e : 


  ln x^n =  n.ln x 

The answer of @acer is almost the same as in the picture 
Now i tried it doing also, but with easier commands... how far do i come to the wanted answer? 

restart;with(plots): # made by @acer

A := Int(1/(b^2 + zz^2), zz = 0 .. z);

Int(1/(b^2+zz^2), zz = 0 .. z)

(1)

value(A);

arctan(z/b)/b

(2)

convert(value(A),ln);

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

(3)

combine(expand(I*convert(value(A),ln)), symbolic)/I;

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

(4)

 

A little manipulation can grind the above into a form with the target leading sign, etc.

 

evalindets(%, specfunc(ln),
           u->ln(expand(sign(numer(op(u)))*numer(op(u)))
                 /expand(sign(numer(op(u)))*denom(op(u)))));

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

(5)

ans := sort(%, order=plex(b,z));

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

(6)

simplify( combine( convert( value(A) - ans, ln ), symbolic) );

0

(7)

 

 

 

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):

 

 

================================ made by  @janhardo

 

I started also trying to get  on the wanted formula

restart;

A := Int(1/(b^2 + z^2), z = 0 .. z);

Int(1/(b^2+z^2), z = 0 .. z)

(8)

value(A);

arctan(z/b)/b

(9)

A1:=convert(value(A),ln);

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

(10)

A2:=expand(A1):%=combine(%);

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

(11)

A3:=simplify(A2,symbolic);

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

(12)

A4:=denom(A3);

2*b

(13)

A5:=numer(A3);

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

(14)

 

 THIS  IS DID BY HAND : (not knowing if possible, this is forum question ) ..i am trying to get a wanted  expression

 

I*ln(-z*I + b) - ln(z*I + b)= I*ln ((-z*I + b)/(z*I + b));# see forum question

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

(15)

 

 

And so on.. If some  of the high level commands are advanced, then a step back

 


 

Download handmatig_betrekking_logaritmisch_en_goniometrisch_forum_nm_6131.mw

@Carl Love 

Thanks

It is clear that after reading your step by step explanation i ever never could deduct this by meself, the working of combination of commands.
For instance could not give meaning to [Re,Im](J1) and the nested simplify command.
Very helpful to try understand the whole picture better with all details involved.

@Carl Love Thanks

It seems that the base-10 logarithm is not the logarithm be found in higher level mathematics..
A ln logarithm use is widespread,why is that, i can't give the answer .
The number e is popping up everwhere in math.

The derative value of e^x is e^x value for x
Also the e^x function can never be 0 
Its a remarkable  number e

@acer  Thanks

restart;with(plots):

A := Int(1/(b^2 + zz^2), zz = 0 .. z);

Int(1/(b^2+zz^2), zz = 0 .. z)

(1)

value(A);

arctan(z/b)/b

(2)

convert(value(A),ln);

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

(3)

combine(expand(I*convert(value(A),ln)), symbolic)/I;

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

(4)

 

A little manipulation can grind the above into a form with the target leading sign, etc.

 

evalindets(%, specfunc(ln),
           u->ln(expand(sign(numer(op(u)))*numer(op(u)))
                 /expand(sign(numer(op(u)))*denom(op(u)))));

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

(5)

ans := sort(%, order=plex(b,z));

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

(6)

simplify( combine( convert( value(A) - ans, ln ), symbolic) );

0

(7)

 

 

 

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);

 

restart;

A := Int(1/(b^2 + z^2), z = 0 .. z);

Int(1/(b^2+z^2), z = 0 .. z)

(8)

value(A);

arctan(z/b)/b

(9)

A1:=convert(value(A),ln);

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

(10)

A2:=expand(A1):%=combine(%);

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

(11)

A3:=simplify(A2,symbolic);

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

(12)

A4:=denom(A3);

2*b

(13)

A5:=numer(A3);

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

(14)

simplify(A5,symbolic);

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

(15)

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

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

(16)

 

 

And so on.. If some  of the high level commands are advanced, then a step back
If i can make (16)  from 
I*ln(-z*I + b) - ln(z*I + b)
a fraction?

 

Download handmatig_betrekking_logaritmisch_en_goniometrisch.mw

@acer

Thanks

So your claim about my Maple result being "almost correct" except that I "is still there" is not right. 

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

I overlooked the  i  ..it is  in there  , you are right. ( comes that i am so used at the normal variables naming) 
I think you have checked that your answer with simplify if it was correct ?
Cannot recognize yet the book answer with your answer unfortanely if both are the same 

@vv 

Informative website for me getting more insight in the complex analysis

Complex Analysis (complex-analysis.com)

@acer

This answer you got has  minus sign and a I inside , but  the bookanswer has no  - and a I next to  ln  
It proves how you must be careful to type the right expression, but is all a little bit complicated to get this expression not in Maple input here as post 

 

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

@janhardo 

 

         
J:= Int(exp(t*x), x);
J1:= subs(t= alpha+beta*I, J);
evalc(J1);
value(%);
simplify(convert(diff(%, x), exp), {a+b*I= t});

Int(exp(t*x), x)

 

Int(exp((alpha+I*beta)*x), x)

 

Int(exp(x*alpha)*cos(x*beta), x)+I*(Int(exp(x*alpha)*sin(x*beta), x))

 

alpha*exp(x*alpha)*cos(x*beta)/(alpha^2+beta^2)+beta*exp(x*alpha)*sin(x*beta)/(alpha^2+beta^2)+I*(-beta*exp(x*alpha)*cos(x*beta)/(alpha^2+beta^2)+alpha*exp(x*alpha)*sin(x*beta)/(alpha^2+beta^2))

 

exp((alpha+I*beta)*x)

(1)

#==========================================

restart;         
J:= Int(exp(t*x), x);
J1:= subs((SUB:= t= alpha+beta*I), J);
J2:= evalc([Re,Im](J1));
J3:= J2 =~ simplify(value(J2));
print~(J3):
 
#reversion to original integrand:
simplify(
    convert(diff(evalc(Complex(rhs~(J3)[])), x), exp),
    {rhs=lhs}(SUB)
);

Int(exp(t*x), x)

 

Int(exp((alpha+I*beta)*x), x)

 

[Int(exp(x*alpha)*cos(x*beta), x), Int(exp(x*alpha)*sin(x*beta), x)]

 

[Int(exp(x*alpha)*cos(x*beta), x) = exp(x*alpha)*(beta*sin(x*beta)+cos(x*beta)*alpha)/(alpha^2+beta^2), Int(exp(x*alpha)*sin(x*beta), x) = exp(x*alpha)*(sin(x*beta)*alpha-beta*cos(x*beta))/(alpha^2+beta^2)]

 

Int(exp(x*alpha)*cos(x*beta), x) = exp(x*alpha)*(beta*sin(x*beta)+cos(x*beta)*alpha)/(alpha^2+beta^2)

 

Int(exp(x*alpha)*sin(x*beta), x) = exp(x*alpha)*(sin(x*beta)*alpha-beta*cos(x*beta))/(alpha^2+beta^2)

 

exp(t*x)

(2)

#================================================

 

The difference in code starts with  evalc and the use of  J,J1,J2 and J3 makes it easier to read

Its a difficult command : J2:= evalc([Re,Im](J1)); in order to get rid of the I symbol, and probably there is no need for?
I must study further this to see how it excactly works.

 

Can you explain in your own words how this second code works ?       

Download complex_integration-tom_apostel_example_-bernouille.mw

@acer 

Thanks

Your code is also a difficult one to understand quick , so perhaps you can explain this in your own words too for me to get a idea for me.

It was tricky, because this  expression written (see hereunder)i s not the same in Holland or America/England? 
Log and ln are the same in America ( and in the book example too probably) and not in Holland
Log and ln are different. A = -(int(1/t, t = 1 .. t))/(2*bi) and -(int(1/t, t = 1 .. t))/(2*bi) = log[10](t)/(2*bi) and log[10](t)/(2*bi) = log[10]((b*i+z)/(b*i-z))/(2*bi)

So log written in the formula must read as ln then.
Your answer is almost correct , its only the I (imaginairy unit) is still there

In a another example of calculating a complex integral is used to remove the I   ....see hereunder

J:= Int(exp(t*x), x);
J1:= subs((SUB:= t= alpha+beta*I), J);
J2:= evalc([Re,Im](J1));

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