mmcdara

6558 Reputation

18 Badges

8 years, 99 days

MaplePrimes Activity


These are replies submitted by mmcdara

@salim-barzani 

This is my reply to this comment of yours

Please check what I did in the attached file and answer the red highlighted question inside.
Maybe I did some typo somewhere.

Check_and_Clarify.mw

@janhardo 

Stop nit-picking saying "Indeed eq8 is derived, but it is still not the same as in the paper "
Do you mean @salim-barzani is not clever enough to see that eq8 in the paper and in my file are the same?
Would you have preferred me to write something like this
 

Q1 := op(-1, numer(rhs(eq8))):
Q2 := -(rhs(eq8)/Q1):

EQ8 := eval( -1 * ``(Q2)*Q1);
EQ8 := eval( -1 * ``(Q2)*``(Q1), {psi(xi)=psi, varphi(xi)=varphi});  # modified order in Q1

-``(lambda/(lambda^2*sigma+mu^2))*(varphi(xi)^2-2*psi(xi)*mu+lambda)

 

-``(lambda/(lambda^2*sigma+mu^2))*``(-2*mu*psi+varphi^2+lambda)

(1)

 


 

Download For_dumb.mw

@salim-barzani 

It took me hours to figure out how to get eq8, but here it is.

Still, I think it's all a bit of art for art's sake, and a lot of wasted time. What do you want to do, check the contents of an old book equation by equation?

 

restart

kernelopts(version)

`Maple 2015.2, APPLE UNIVERSAL OSX, Dec 20 2015, Build ID 1097895`

(1)

#with(Physics):
with(PDEtools):
undeclare(prime):

`There is no more prime differentiation variable; all derivatives will be displayed as indexed functions`

(2)

eq5a := varphi(xi) =  diff(G(xi), xi)/G(xi);
eq5b := psi(xi) = 1/G(xi);

eq6 := diff(G(xi), xi$2) + lambda*G(xi) = mu

varphi(xi) = (diff(G(xi), xi))/G(xi)

 

psi(xi) = 1/G(xi)

 

diff(diff(G(xi), xi), xi)+lambda*G(xi) = mu

(3)

# equation 7a
# (contains a typo in the paper, should be mu*psi instead of mu*phi)

diff(eq5a, xi);
eval(%, isolate(eq6, diff(G(xi), xi$2)));
lhs(%) = expand(eval(rhs(%), isolate(eq5a, diff(G(xi), xi))));

eq7a := eval(%, isolate(eq5b, G(xi)));

diff(varphi(xi), xi) = (diff(diff(G(xi), xi), xi))/G(xi)-(diff(G(xi), xi))^2/G(xi)^2

 

diff(varphi(xi), xi) = (mu-lambda*G(xi))/G(xi)-(diff(G(xi), xi))^2/G(xi)^2

 

diff(varphi(xi), xi) = mu/G(xi)-lambda-varphi(xi)^2

 

diff(varphi(xi), xi) = psi(xi)*mu-lambda-varphi(xi)^2

(4)

# equation 7b
# (paper contains a typo in the paper, should be mu*psi instead of mu*phi)

diff(eq5b, xi);
eval(%, isolate(eq5a, diff(G(xi), xi)));


eq7b := eval(%, isolate(eq5b, G(xi)));

diff(psi(xi), xi) = -(diff(G(xi), xi))/G(xi)^2

 

diff(psi(xi), xi) = -varphi(xi)/G(xi)

 

diff(psi(xi), xi) = -psi(xi)*varphi(xi)

(5)

# equation "Case 1"
# (paper contains a typo: the general solution when lambda > 0 is a
# combination of trigonometric functions, not of hyperbolic ones)

dsolve(eq6) assuming lambda > 0:
eval(%, [_C1=A__2, _C2=A__1])

G(xi) = sin(lambda^(1/2)*xi)*A__1+cos(lambda^(1/2)*xi)*A__2+mu/lambda

(6)

# equation "Case 1" again
# Assuming the type is "lambda > 0" instead of "lambda < 0"

dsolve(eq6) assuming lambda < 0;
negsol  := rhs(convert(%, trig));
CS      := [C, S]:
replace := convert(indets(negsol, function), list) =~ CS:
negsol  := collect(eval(negsol, replace), CS):
A1A2    := solve({coeff(negsol, C)=A2, coeff(negsol, S)=A1}, [_C1, _C2]);

eq_case_1 := eval(eval(negsol, %[]), (rhs=lhs)~(replace));

G(xi) = exp((-lambda)^(1/2)*xi)*_C2+exp(-(-lambda)^(1/2)*xi)*_C1+mu/lambda

 

(cosh((-lambda)^(1/2)*xi)+sinh((-lambda)^(1/2)*xi))*_C2+(cosh((-lambda)^(1/2)*xi)-sinh((-lambda)^(1/2)*xi))*_C1+mu/lambda

 

[[_C1 = -(1/2)*A1+(1/2)*A2, _C2 = (1/2)*A1+(1/2)*A2]]

 

A2*cosh((-lambda)^(1/2)*xi)+A1*sinh((-lambda)^(1/2)*xi)+mu/lambda

(7)

# The main trick comes from integrating the veak form of eq6:

eq6*diff(G(xi), xi);

map~(((IntegrationTools:-Expand)@Int), %, xi);
value(%);
(lhs-rhs)(%)=K;

% *~ 2;

(diff(G(xi), xi))*(diff(diff(G(xi), xi), xi)+lambda*G(xi)) = (diff(G(xi), xi))*mu

 

Int((diff(G(xi), xi))*(diff(diff(G(xi), xi), xi)), xi)+lambda*(Int((diff(G(xi), xi))*G(xi), xi)) = mu*(Int(diff(G(xi), xi), xi))

 

(1/2)*(diff(G(xi), xi))^2+(1/2)*lambda*G(xi)^2 = mu*G(xi)

 

(1/2)*(diff(G(xi), xi))^2+(1/2)*lambda*G(xi)^2-mu*G(xi) = K

 

(diff(G(xi), xi))^2+lambda*G(xi)^2-2*mu*G(xi) = 2*K

(8)

eval((8), isolate(eq5a, diff(G(xi), xi)));

`Given that` := eq5b *~ G(xi);

`One gets` := eval(%%, mu=mu*lhs(`Given that`));

`Then` := factor(`One gets`);

`More simply` := eval(`Then`, K=K/2);
 

varphi(xi)^2*G(xi)^2+lambda*G(xi)^2-2*mu*G(xi) = 2*K

 

G(xi)*psi(xi) = 1

 

varphi(xi)^2*G(xi)^2+lambda*G(xi)^2-2*mu*G(xi)^2*psi(xi) = 2*K

 

G(xi)^2*(varphi(xi)^2-2*psi(xi)*mu+lambda) = 2*K

 

G(xi)^2*(varphi(xi)^2-2*psi(xi)*mu+lambda) = K

(9)

`On the other side` := eq5b^2;

`Thus` := subs(1/~isolate(`More simply`, G(xi)^2), eq5b^2);

psi(xi)^2 = 1/G(xi)^2

 

psi(xi)^2 = (varphi(xi)^2-2*psi(xi)*mu+lambda)/K

(10)

# Expression of K

Kexpr := K = simplify(eval(lhs((8)), G(xi)=eq_case_1));

eval(`Thus`, Kexpr);

K = -(A1^2*lambda^2-A2^2*lambda^2+mu^2)/lambda

 

psi(xi)^2 = -lambda*(varphi(xi)^2-2*psi(xi)*mu+lambda)/(A1^2*lambda^2-A2^2*lambda^2+mu^2)

(11)

# Finally, define sigma this way

sigma = A1^2 - A2^2;
eq8 := simplify(eval((11), isolate(%, A1^2)));

sigma = A1^2-A2^2

 

psi(xi)^2 = -lambda*(varphi(xi)^2-2*psi(xi)*mu+lambda)/(lambda^2*sigma+mu^2)

(12)

 


 

Download transformations_(complete).mw

Proceed the same way for case lambda > 0.

@minhthien2016 

and read carefully the definition in the reference you give: the dihedral angle is in the range 0..Pi/2 ... unless yoiu have another definition (see also here Wolfram)

The content of this comment has been deleted by the author: an updated and complete version can be found here

Reminder: The paper contains several typos mentioned in the attached new file.

@salim-barzani 
 

  1. Open the mw file I sent you within your Maple version.
  2. Execute it and save it.
  3. Sent a reply including YOUR mw file.
    (I can't do anything with your screen capture)
     

 

@salim-barzani 

My answer to this reply of yours


Add this at the end of my file
 

for neq in [9, 11] do
  eq := eq_||neq:
  EQ_||neq := lhs(eq) = add(op(1..-2, rhs(eq))) 
              + 
              ``(expand(eval(op(-1, rhs(eq)), G(eta) = 1))) 
              *
              ``(1/indets(rhs(eq), function)[])^2
end do:

neq   := 13:
eq    := eq_||neq:
EQ_||neq := lhs(eq) = op(1, rhs(eq))
            + 
            ``(expand(eval(op(-1, rhs(eq)), G(eta) = 1))) 
            *
            ``(1/indets(rhs(eq), function)[])^2:

print~([EQ_9, EQ_11, EQ_13]):

result:


Where is the problem ???

@salim-barzani 

If you want me to help you, first wait until you've received an answer to your question before sending several others.
I'm completely at a loss. 
 

@salim-barzani 

I use Maple 2015 and it's likely that one of the two commands

K := simplify(solve(aux, __K));

den := simplify(denom(K), {eq_8=G(eta)});  #which means: "simplilify wrt the rule {eq_8=G(eta)}

do not perform the same way in your Maple 2021 version.

Can you upload your file in order I can give a look at it?  Maybe I will be able to find a way tio fix this. 
If I'm not you will have to wait for someone who uses maple 2021 to help you.


By the way: Maybe you found it a little unclear why I introduced "constant" K?. Here is an attempt to explain this based on a toy example  Detailed_explanation.mw

@salim-barzani 

It's my pleasure

@Ronan 

I updated the mw file whose end was truncated for some unknown reason (I often observed this while using ImageTools with Maple 2015).
The file containing plot t should be locate in your current directory with name img.jpg.
This is what 

here := cat(currentdir(), "/img.jpg"):
plotsetup(jpeg, plotoutput = here)

do.


Note that 

convert(360, units, 'degree', 'rad') 
                              2 Pi    # Pi and not pi

# More precisely 
convert(360, units, 'degree', 'rad') * Unit('rad')  
                        2 Pi rad


 

restart

expr := 360*Unit('degree') / (1*Unit('rad')) / Pi^2;

360*Units:-Unit('arcdeg')/(Units:-Unit('rad')*Pi^2)

(1)

``(simplify(expr)) * Unit('rad')

``(2/Pi)*Units:-Unit('rad')

(2)

``(convert((2), units, 'rad', 'degree')) * Unit('degree')

``(360/Pi^2)*Units:-Unit('arcdeg')

(3)

expr := 360*Unit('degree') / (Pi*Unit('rad'))^2;

360*Units:-Unit('arcdeg')/(Pi^2*Units:-Unit('rad')^2)

(4)

simplify(expr)

2*Units:-Unit(1/('rad'))/Pi

(5)

 


 

Download Unit.mw

 


Since I haven't heard from you since I submitted a reply three days ago, I take it you weren't interested. I therefore destroyed its content. 

@AHSAN 

 

Responses to your reply titled re-check

point [2]
You wrote: 

Now, use the solution of u(y) into Eq. 2 and solve it  for T(y) against y with the help of Bcs given in Eq. 3.
Finally, use the solution of u(y) into Eq. 1 and solve for diff(p(x), x).
 

Equation de1 writes symbolically <A, u(y)> = p'(x) where A is some differential operator and <A, u(y)> denotes its action on u(y). Then p'(x) is obviously equal to <A, u(y)> which is a function of y alone;, let's say F(y).
Thus p(x) = w*F(y) + constant.
 

point [3]
I wrote

Your bc are given at 3 points (-1, 0, 1) which is not supported by Maple.
Either you formulate the problem differently by considering a 1st problem in [-1..0], a second in [0..+1] and interface continuity equations... or you remove on point, for instance 0:

 

You replied

Ans: I checked the BCs and found correct.
 

Your answer "I checked the BCs and found correct" makes no sense.
Maybe you didn't understand my comment: you cannot solve a 1D boundary value problem by setting boundary conditions at three different points.
Either you remove one of these 3 points, for instance y=0... or you solve two coupled BVPs: one is a BVP in the domain [-1, 0] and the other in the domain [0, +1] and you have to write compatibility (contnuity) conditions at their interface y=0.

___________________________________________________________________________________



Responses to your reply titled look like this

Please do not focus on the plots beat read carefully the conditions I use in my last attached file.
(Note: had you correctly answered my initial comments things could be likely clerer... but you didn't)

I already told you that Br is never defined in you data so I took arbitrarily Br=1, which could easily explain the differences between the T curves.

Concerning the differences between the u-curves : check the data you give in your attached file to those used to produce these last results.
As I simply use dsolve there is no reason ti think that the u(y) curves I provide I wrong

___________________________________________________________________________________




Responses to your reply titled  Solution verifiaction

[1]
When you derive equation 5, whose rhs = diff(p(y), y), wrt y,  you det a rhs  equal to 0: doesn't this mean that diff(p(y), y) = 0 and then that p(y)=a+b*y ?

[2]
Note that you write lhs(eq 5) = diff(p(x), x) which I thought fristly (and maybe wrongly) was a typo. The reason us that the lhs of eq 5 is a function of y alone while its rhs is a function of x alone.
To get de4 you differentiate de3 wrt y , which gives rhs(de4) = 0 .

dsolveing  de4 then givesautomatically a constant value for diff(p(x), x).
Look  CODE REMOVED BY THE AUTHOR  see here  for an explanation on a toy example.

 


So it is completely impossible to retrieve your second plot: it is not something that can be deduced from your equations nor from functions psi(y) and T(y)

___________________________________________________________________________________



Here is a revised version of my work   CODE REMOVED BY THE AUTHOR  see here  

You are probably going to say that the results this file contains are not the same than those you presented before. Nevertheless I advice you to compare the equations you wrote to those where "your" results come from before posting a reply.
For now on you presented us a problem which is not correctly (well?) posed.

Clicking on the link returns "page not found". Likely because of non latin characters in its name.

1 2 3 4 5 6 7 Last Page 2 of 138