dharr

Dr. David Harrington

9484 Reputation

22 Badges

22 years, 39 days
University of Victoria
Professor or university staff
Victoria, British Columbia, Canada

Social Networks and Content at Maplesoft.com

Maple Application Center
I am a retired professor of chemistry at the University of Victoria, BC, Canada. My research areas are electrochemistry and surface science. I have been a user of Maple since about 1990.

MaplePrimes Activity


These are answers submitted by dharr

Your minus in the expression for Ghat has some extra backticks. If these are removed, it works as expected.

asyapprox.mw

Note: There appears to be an error in the paper. In the expression for omega[i] in Eq 11, I find q[i] =0 (see eq 15 in the worksheet)

LongWave1solition.mw

Here's how to do the limiting parts shaded in green. I do not yet know how to arrive at the limiting form for fN.

https://www.mapleprimes.com/questions/239819-How-Find-Generate-Series-Solution-From

https://doi.org/10.1016/j.matcom.2022.02.014

Limiting process from eq 12 to Bij

> 

restart

> 

``

Eq 12.

> 

eij := (k[i]^2*p[i]^2*p[j]+k[j]^2*p[i]*p[j]^2-k[i]*k[j]*p[i]*p[j]*(p[i]+p[j])+(p[i]*q[j]-p[j]*q[i])^2-(p[i]-p[j])^2)/(k[i]^2*p[i]^2*p[j]+k[j]^2*p[i]*p[j]^2+k[i]*k[j]*p[i]*p[j]*(p[i]+p[j])+(p[i]*q[j]-p[j]*q[i])^2-(p[i]-p[j])^2)

(k[i]^2*p[i]^2*p[j]+k[j]^2*p[i]*p[j]^2-k[i]*k[j]*p[i]*p[j]*(p[i]+p[j])+(p[i]*q[j]-p[j]*q[i])^2-(p[i]-p[j])^2)/(k[i]^2*p[i]^2*p[j]+k[j]^2*p[i]*p[j]^2+k[i]*k[j]*p[i]*p[j]*(p[i]+p[j])+(p[i]*q[j]-p[j]*q[i])^2-(p[i]-p[j])^2)

> 

eval(eij, k[j] = b*k[i]); series(%, k[i], 3); convert(%, polynom); eval(%, b = k[j]/k[i]); Bij := (%-1)/(k[i]*k[j])

(k[i]^2*p[i]^2*p[j]+b^2*k[i]^2*p[i]*p[j]^2-k[i]^2*b*p[i]*p[j]*(p[i]+p[j])+(p[i]*q[j]-p[j]*q[i])^2-(p[i]-p[j])^2)/(k[i]^2*p[i]^2*p[j]+b^2*k[i]^2*p[i]*p[j]^2+k[i]^2*b*p[i]*p[j]*(p[i]+p[j])+(p[i]*q[j]-p[j]*q[i])^2-(p[i]-p[j])^2)

series(1-(2*b*p[i]*p[j]*(p[i]+p[j])/((p[i]*q[j]-p[j]*q[i])^2-(p[i]-p[j])^2))*k[i]^2+O(k[i]^4),k[i],4)

1-2*b*p[i]*p[j]*(p[i]+p[j])*k[i]^2/((p[i]*q[j]-p[j]*q[i])^2-(p[i]-p[j])^2)

1-2*k[j]*k[i]*p[i]*p[j]*(p[i]+p[j])/((p[i]*q[j]-p[j]*q[i])^2-(p[i]-p[j])^2)

-2*p[i]*p[j]*(p[i]+p[j])/((p[i]*q[j]-p[j]*q[i])^2-(p[i]-p[j])^2)

> 

NULL

Download LongWaveLimit.mw

Yes, they are related.

> 

restart;

> 

a:=a+b;

Error, recursive assignment

Following is similar

> 

U:=U(x);

Error, recursive assignment

1. The following creates a procedure with Remember table but no code (assuming the option to make procedure code by this assignment hasn't been set).

> 

U(x):=sin(x);
type(U,procedure);

sin(x)

true

The following overwrites it.

> 

U:=U(x);
type(U,procedure)

sin(x)

false

2. The following creates a procedure with code

> 

U:=x->sin(x);
type(U,procedure);

proc (x) options operator, arrow; sin(x) end proc

true

This again overwrites it.

> 

U:=U(x);
type(U,procedure);

sin(x)

false

> 

NULL

Download proc.mw

It's hard to guess what you mean from your description. So this may be completely wrong. I'm guessing you want to find the ode that is satisfied by psi(xi) = diff(phi(xi),xi). firint in the DEtools package does this, but your case is too difficult unless you know what the form of the integating factor is.

> 

restart

> 

with(PDEtools); with(DEtools)

> 

declare(phi(xi), psi(xi))

phi(xi)*`will now be displayed as`*phi

psi(xi)*`will now be displayed as`*psi

> 

r1 := (1/2*(phi(xi)^2-2*c))*(diff(diff(phi(xi), xi), xi))+((-(1/2)*phi(xi)^2+c)*(k*phi(xi)^2-Omega)^2*(phi(xi)^2-c)^2/(phi(xi)^4*(phi(xi)^2-2*c)^2)-(-k*phi(xi)^2+c*k+Omega)*(k*phi(xi)^2-Omega)*(phi(xi)^2-c)/(phi(xi)^2*(phi(xi)^2-2*c))-(1/2)*k^2*phi(xi)^2+Omega*k+(diff(phi(xi), xi))^2+1)*phi(xi)

(1/2)*(phi(xi)^2-2*c)*(diff(diff(phi(xi), xi), xi))+((-(1/2)*phi(xi)^2+c)*(k*phi(xi)^2-Omega)^2*(phi(xi)^2-c)^2/(phi(xi)^4*(phi(xi)^2-2*c)^2)-(-k*phi(xi)^2+c*k+Omega)*(k*phi(xi)^2-Omega)*(phi(xi)^2-c)/(phi(xi)^2*(phi(xi)^2-2*c))-(1/2)*k^2*phi(xi)^2+Omega*k+(diff(phi(xi), xi))^2+1)*phi(xi)

> 

r2 := numer(normal(r1))

phi(xi)^7*(diff(diff(phi(xi), xi), xi))+2*phi(xi)^6*(diff(phi(xi), xi))^2+phi(xi)^4*c^2*k^2-4*phi(xi)^5*(diff(diff(phi(xi), xi), xi))*c-4*phi(xi)^4*(diff(phi(xi), xi))^2*c-2*phi(xi)^4*Omega*c*k+2*phi(xi)^6+phi(xi)^4*Omega^2+4*phi(xi)^3*(diff(diff(phi(xi), xi), xi))*c^2-4*phi(xi)^4*c-Omega^2*c^2

We perhaps want to replace all the derivatives of phi into their equivalents in psi. Use dsubs for this

> 

pa := {diff(phi(xi), xi) = psi(xi)}

{diff(phi(xi), xi) = psi(xi)}

But what do you want to do with phi itself?

> 

dsubs(pa, r2)

phi(xi)^7*(diff(psi(xi), xi))+2*phi(xi)^6*psi(xi)^2+phi(xi)^4*c^2*k^2-4*phi(xi)^5*(diff(psi(xi), xi))*c-4*phi(xi)^4*psi(xi)^2*c-2*phi(xi)^4*Omega*c*k+2*phi(xi)^6+phi(xi)^4*Omega^2+4*phi(xi)^3*(diff(psi(xi), xi))*c^2-4*phi(xi)^4*c-Omega^2*c^2

DEtools:-firint tries to find the first integral of phi given the ode.

> 

firint(r2, phi(xi))

Error, (in ODEtools/firint) the given ODE is not exact

If it's not exact, we need to help it by finding an integrating factor. But Maple can't find it (giving a hint of the form is possible here.

> 

intfactor(r2, phi(xi), try_hard = true)

So we could just solve the ode, and then differentiate the answer to get psi. Perhaps the expression would be simpler if some initial/boundary conditions were given.

> 

ans := rhs(dsolve(r2, explicit)[1]); psieqn := psi(xi) = simplify(diff(ans, xi))

RootOf(-Intat((_f^2-2*c)*_f/(-_f^4*c^2*k^2+2*Omega*_f^4*c*k-Omega^2*_f^4-_f^6+4*_f^4*c-Omega^2*c^2+c__1*_f^2)^(1/2), _f = _Z)+xi+c__2)

psi(xi) = (-RootOf(-Intat((_f^2-2*c)*_f/(-_f^4*c^2*k^2+2*Omega*_f^4*c*k-Omega^2*_f^4-_f^6+4*_f^4*c-Omega^2*c^2+c__1*_f^2)^(1/2), _f = _Z)+xi+c__2)^6+(-c^2*k^2+2*Omega*c*k-Omega^2+4*c)*RootOf(-Intat((_f^2-2*c)*_f/(-_f^4*c^2*k^2+2*Omega*_f^4*c*k-Omega^2*_f^4-_f^6+4*_f^4*c-Omega^2*c^2+c__1*_f^2)^(1/2), _f = _Z)+xi+c__2)^4+c__1*RootOf(-Intat((_f^2-2*c)*_f/(-_f^4*c^2*k^2+2*Omega*_f^4*c*k-Omega^2*_f^4-_f^6+4*_f^4*c-Omega^2*c^2+c__1*_f^2)^(1/2), _f = _Z)+xi+c__2)^2-Omega^2*c^2)^(1/2)/((RootOf(-Intat((_f^2-2*c)*_f/(-_f^4*c^2*k^2+2*Omega*_f^4*c*k-Omega^2*_f^4-_f^6+4*_f^4*c-Omega^2*c^2+c__1*_f^2)^(1/2), _f = _Z)+xi+c__2)^2-2*c)*RootOf(-Intat((_f^2-2*c)*_f/(-_f^4*c^2*k^2+2*Omega*_f^4*c*k-Omega^2*_f^4-_f^6+4*_f^4*c-Omega^2*c^2+c__1*_f^2)^(1/2), _f = _Z)+xi+c__2))

NULL

Download Hamiltonian.mw

map[3](op@FileTools:-ListDirectory,currentdir(),'all','select'=~["*.mw","*.eps"]);

You odes and initial conditions need to be together in a set (or list). You also have three functions A(t), Ab(t), R(t) and only two odes; I'm assuming Ab(t) was meant to be A(t). Then it works. (I made c3 smaller to see something on the plot.)

dsolve_problem.mw

Your error disappears if you run the worksheet after a restart. Your graphs are all the same because although you change S[t] when you define your substitutions p1, p2 etc., there is no S[t] in the expression you are substituting into (which I've renamed ff since you are using f(x) for other purposes in your worksheet). You should be careful about using both S[t] and S as variables; if you set a value for S then S[t] will not be defined -- to solve this use S__t instead of S[t]; they look almost the same on output (the first has the t in italics).

To change the view for the plot, use view=[0..1,0..1].

sstf.mw

After transforming to xi, evalc(Re()) and evalc(Im()) work as you would expect, and you get Eq. (1.5). (I find the pdes easier to manipulate if you leave off the =0, which is usually assumed anyway for many Maple commands, such as pdsolve.)

> 

restart

> 

with(PDEtools)

> 

interface(showassumed = 0)

> 

NULL

> 

> 

declare(q(x, t), qr(x, t)); declare(phi(xi))

q(x, t)*`will now be displayed as`*q

qr(x, t)*`will now be displayed as`*qr

phi(xi)*`will now be displayed as`*phi

> 

pde := diff(diff(q(x, t), t), x)+q(x, t)-(2*I)*q(x, t)*qr(x, t)*(diff(q(x, t), x))

diff(diff(q(x, t), t), x)+q(x, t)-(2*I)*q(x, t)*qr(x, t)*(diff(q(x, t), x))

> 

Q := phi(-c*t+x)*exp(I*(k*x-Omega*t+theta(-c*t+x))); rel := {q(x, t) = Q, qr(x, t) = subs({t = -t, x = -x}, Q)}; pde1 := simplify(eval(pde, rel))

phi(-c*t+x)*exp(I*(k*x-Omega*t+theta(-c*t+x)))

{q(x, t) = phi(-c*t+x)*exp(I*(k*x-Omega*t+theta(-c*t+x))), qr(x, t) = phi(c*t-x)*exp(I*(-k*x+Omega*t+theta(c*t-x)))}

> 

pde2 := simplify(subs({phi(c*t-x) = phi(c*t-x), theta(c*t-x) = -theta(-c*t+x)}, pde1))

> 

pde3 := simplify(exp(-I*(k*x-Omega*t+theta(-c*t+x)))*pde2)

> 

itr := xi = -c*t+x; tr := isolate(itr, x); pde4 := dchange(tr, pde3, [xi], params = {Omega, c, k})

xi = -c*t+x

x = c*t+xi

-2*phi(xi)^2*((-(diff(theta(xi), xi))-k)*phi(xi)+I*(diff(phi(xi), xi)))+((diff(theta(xi), xi))^2*c+(c*k+Omega)*(diff(theta(xi), xi))-I*c*(diff(diff(theta(xi), xi), xi))+Omega*k+1)*phi(xi)-(2*I)*(diff(theta(xi), xi))*c*(diff(phi(xi), xi))+I*(-c*k-Omega)*(diff(phi(xi), xi))-(diff(diff(phi(xi), xi), xi))*c

Eq 1.5

> 

collect(evalc(Re(pde4)), phi(xi)); collect(evalc(Im(-pde4)), phi(xi))

(2*(diff(theta(xi), xi))+2*k)*phi(xi)^3+((diff(theta(xi), xi))^2*c+(c*k+Omega)*(diff(theta(xi), xi))+1+Omega*k)*phi(xi)-(diff(diff(phi(xi), xi), xi))*c

2*phi(xi)^2*(diff(phi(xi), xi))+c*(diff(diff(theta(xi), xi), xi))*phi(xi)+2*(diff(theta(xi), xi))*c*(diff(phi(xi), xi))+(c*k+Omega)*(diff(phi(xi), xi))

NULL

Download PD_OD2.mw

You can subtract a common term from each side of an equation or inequality using elementwise subtraction, assuming you know what term you want to subtract. If you don't, it is simpler to subtract it all, which is essentially @nm's answer. (I would typically set up an equation or inequality in the ineq3 form originally, then you do not have this issue.) Here it turns out the simplification makes the inequality harder to solve. 

For the assumptions you gave in the worksheet, solve gives two cases.

> 

restart

> 

ineq := -d*(Am-s1)/(2*Clm)-d*(Am*R0er*d^2-R0er*d^2*s1+Aer*Clm-Ce*Clm+Clm*Rer-Clm*l)/(2*Clm*(-R0er*d^2+Clr)) <= -d*(Am-Cv+Rm-s1-s2)/(-2*R0m*d^2+2*d^2*g1+2*Clm)-d*(Rer-Ce-l+Aer)/(-2*R0er*d^2+2*Clr)

Subtract the right-hand side from each side

> 

ineq2 := `~`[`-`](ineq, rhs(ineq))

-(1/2)*d*(Am-s1)/Clm-(1/2)*d*(Am*R0er*d^2-R0er*d^2*s1+Aer*Clm-Ce*Clm+Clm*Rer-Clm*l)/(Clm*(-R0er*d^2+Clr))+d*(Am-Cv+Rm-s1-s2)/(-2*R0m*d^2+2*d^2*g1+2*Clm)+d*(Rer-Ce-l+Aer)/(-2*R0er*d^2+2*Clr) <= 0

> 

ineq3 := simplify(ineq2)

-(1/2)*d*((R0er*(Am-Cv+Rm-s1-s2)*Clm-Clr*(Am-s1)*(R0m-g1))*d^2+Clm*Clr*(Cv-Rm+s2))/((R0er*d^2-Clr)*((R0m-g1)*d^2-Clm)*Clm) <= 0

Simpler, faster solution with ineq2 than ineq3

> 

`assuming`([solve(ineq2, Cv, useassumptions)], [d > 0, Am > 0, R0er > 0, Clm > 0, s1 > 0, Ce > 0, s2 > 0, Clr > 0, l > 0, g1 > 0, g2 > 0, Aer > 0, Rer > 0])

piecewise(0 < d/(-2*R0m*d^2+2*d^2*g1+2*Clm), [{-(Am*Clm*R0er*d^2-Am*Clr*R0m*d^2+Am*Clr*d^2*g1+Clm*R0er*Rm*d^2-Clm*R0er*d^2*s1-Clm*R0er*d^2*s2+Clr*R0m*d^2*s1-Clr*d^2*g1*s1-Clm*Clr*Rm+Clm*Clr*s2)/(Clm*(-R0er*d^2+Clr)) <= Cv}], d/(-2*R0m*d^2+2*d^2*g1+2*Clm) < 0, [{Cv <= -(Am*Clm*R0er*d^2-Am*Clr*R0m*d^2+Am*Clr*d^2*g1+Clm*R0er*Rm*d^2-Clm*R0er*d^2*s1-Clm*R0er*d^2*s2+Clr*R0m*d^2*s1-Clr*d^2*g1*s1-Clm*Clr*Rm+Clm*Clr*s2)/(Clm*(-R0er*d^2+Clr))}], [])

 

NULL

Download Q_12.mw

The other question about phase shifts has now been deleted. .pdf of it is here: phase_shift.pdf

> 

restart

> 

with(PDEtools)

> 

undeclare(prime); declare(u(x, t)); declare(v(x, t)); declare(f(x, t))

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

u(x, t)*`will now be displayed as`*u

v(x, t)*`will now be displayed as`*v

f(x, t)*`will now be displayed as`*f

PDE to solve, Eq 11

> 

pde := diff(u(x, t), t)+diff(u(x, t), x)-(diff(u(x, t), `$`(x, 2), t))-4*u(x, t)*(diff(u(x, t), t))-2*(diff(u(x, t), x))*(int(diff(u(x, t), t), x))

diff(u(x, t), t)+diff(u(x, t), x)-(diff(diff(diff(u(x, t), t), x), x))-4*u(x, t)*(diff(u(x, t), t))-2*(diff(u(x, t), x))*(int(diff(u(x, t), t), x))

Use potential transformation Eq 12 to give Eq 13

> 

ptrans := u(x, t) = diff(v(x, t), x); pdev := dsubs(ptrans, pde)

u(x, t) = diff(v(x, t), x)

diff(diff(v(x, t), t), x)+diff(diff(v(x, t), x), x)-(diff(diff(diff(diff(v(x, t), t), x), x), x))-4*(diff(v(x, t), x))*(diff(diff(v(x, t), t), x))-2*(diff(diff(v(x, t), x), x))*(diff(v(x, t), t))

Split pdev into linear and non-linear parts

> 

pdev_nonlinear, pdev_linear := selectremove(proc (term) options operator, arrow; has((eval(term, v(x, t) = a*v(x, t)))/a, a) end proc, pdev)

-4*(diff(v(x, t), x))*(diff(diff(v(x, t), t), x))-2*(diff(diff(v(x, t), x), x))*(diff(v(x, t), t)), diff(diff(v(x, t), t), x)+diff(diff(v(x, t), x), x)-(diff(diff(diff(diff(v(x, t), t), x), x), x))

Use Eq 14 to find Eq 15

> 

thetai := -t*c[i]+x*k[i]; eval(pdev_linear, v(x, t) = exp(thetai)); eq15 := isolate(%, c[i])

-t*c[i]+x*k[i]

-c[i]*k[i]*exp(-t*c[i]+x*k[i])+k[i]^2*exp(-t*c[i]+x*k[i])+c[i]*k[i]^3*exp(-t*c[i]+x*k[i])

c[i] = -k[i]/(k[i]^2-1)

Use expthetai to define the auxiliary function in Eq 18

> 

eqf := f(x, t) = 1+eval(exp(thetai), eq15)

f(x, t) = 1+exp(k[i]*t/(k[i]^2-1)+k[i]*x)

Now we use this in Eq 17, and substitute into pdev to find that R=2

> 

eq17 := v(x, t) = R*(diff(ln(f(x, t)), x)); eval(eq17, eqf); simplify(eval(pdev, %)); sort([solve(%, R)]); eq17withR := eval(eq17, R = %[2])

v(x, t) = R*(diff(f(x, t), x))/f(x, t)

v(x, t) = R*k[i]*exp(k[i]*t/(k[i]^2-1)+k[i]*x)/(1+exp(k[i]*t/(k[i]^2-1)+k[i]*x))

6*k[i]^5*R*exp(2*k[i]*(x*k[i]^2+t-x)/((k[i]-1)*(k[i]+1)))*(exp(k[i]*(x*k[i]^2+t-x)/((k[i]-1)*(k[i]+1)))-1)*(R-2)/((1+exp(k[i]*(x*k[i]^2+t-x)/((k[i]-1)*(k[i]+1))))^5*(k[i]^2-1))

[0, 2]

v(x, t) = 2*(diff(f(x, t), x))/f(x, t)

So we can now find v as Eq 19.

> 

eq19 := eval(eq17withR, eqf)

v(x, t) = 2*k[i]*exp(k[i]*t/(k[i]^2-1)+k[i]*x)/(1+exp(k[i]*t/(k[i]^2-1)+k[i]*x))

Check it solves pdev

> 

pdetest(eq19, pdev)

0

And then we can find the u (Eq 20) that solves the original pde.

> 

eq20 := simplify(eval(ptrans, eq19))

u(x, t) = 2*k[i]^2*exp(k[i]*(x*k[i]^2+t-x)/((k[i]-1)*(k[i]+1)))/(1+exp(k[i]*(x*k[i]^2+t-x)/((k[i]-1)*(k[i]+1))))^2

> 

pdetest(eq20, pde)

0

Now for the 2-soliton case. This time the auxiliary function f is as below.
Note that we use a product of exps so that we can more easily do later substitutions.

> 

theta1 := normal(eval(eval(thetai, eq15), i = 1)); theta2 := normal(eval(eval(thetai, eq15), i = 2)); eqf2 := f(x, t) = 1+exp(theta1)+exp(theta2)+a__12*exp(theta1)*exp(theta2)

k[1]*(x*k[1]^2+t-x)/(k[1]^2-1)

k[2]*(x*k[2]^2+t-x)/(k[2]^2-1)

f(x, t) = 1+exp(k[1]*(x*k[1]^2+t-x)/(k[1]^2-1))+exp(k[2]*(x*k[2]^2+t-x)/(k[2]^2-1))+a__12*exp(k[1]*(x*k[1]^2+t-x)/(k[1]^2-1))*exp(k[2]*(x*k[2]^2+t-x)/(k[2]^2-1))

Find v

> 

eqv2 := eval(eq17withR, eqf2)

v(x, t) = 2*(k[1]*exp(k[1]*(x*k[1]^2+t-x)/(k[1]^2-1))+k[2]*exp(k[2]*(x*k[2]^2+t-x)/(k[2]^2-1))+a__12*k[1]*exp(k[1]*(x*k[1]^2+t-x)/(k[1]^2-1))*exp(k[2]*(x*k[2]^2+t-x)/(k[2]^2-1))+a__12*exp(k[1]*(x*k[1]^2+t-x)/(k[1]^2-1))*k[2]*exp(k[2]*(x*k[2]^2+t-x)/(k[2]^2-1)))/(1+exp(k[1]*(x*k[1]^2+t-x)/(k[1]^2-1))+exp(k[2]*(x*k[2]^2+t-x)/(k[2]^2-1))+a__12*exp(k[1]*(x*k[1]^2+t-x)/(k[1]^2-1))*exp(k[2]*(x*k[2]^2+t-x)/(k[2]^2-1)))

Substitute into pdev. Don't simplify.  Then we want it to hold for arbitrary theta1 and theta2.
The straightforward way it to algsubs these to X and Y, but the pattern is too complex

> 

p2a := eval(pdev, eqv2); algsubs(theta1 = X, p2a); algsubs(theta1 = Y, %)

Error, (in algsubs) cannot compute degree of pattern in k[1]

Error, (in algsubs) cannot compute degree of pattern in k[1]

The two exps have been retained intact, so a simple subs might work

> 

indets(p2a)

{a__12, t, x, k[1], k[2], exp(k[1]*(x*k[1]^2+t-x)/(k[1]^2-1)), exp(k[2]*(x*k[2]^2+t-x)/(k[2]^2-1))}

> 

p2b := subs(exp(k[1]*(x*k[1]^2+t-x)/(k[1]^2-1)) = eX, exp(k[2]*(x*k[2]^2+t-x)/(k[2]^2-1)) = eY, p2a); indets(%)

{a__12, eX, eY, k[1], k[2]}

It worked, so proceed to find the coeffs and solve.

> 

p2c := numer(normal(p2b))

> 

eqns := {coeffs(collect(p2c, {eX, eY}, distributed), {eX, eY})}; nops(%)

{2*(-a__12*k[1]^5+a__12*k[1]^3*k[2]^2-a__12*k[1]^2*k[2]^3+a__12*k[2]^5+k[1]^5-4*k[1]^4*k[2]+7*k[1]^3*k[2]^2-7*k[1]^2*k[2]^3+4*k[1]*k[2]^4-k[2]^5+3*a__12*k[1]^3+3*a__12*k[1]^2*k[2]-3*a__12*k[1]*k[2]^2-3*a__12*k[2]^3-3*k[1]^3+9*k[1]^2*k[2]-9*k[1]*k[2]^2+3*k[2]^3)*k[1]*k[2], 2*(a__12*k[1]^5-a__12*k[1]^3*k[2]^2+a__12*k[1]^2*k[2]^3-a__12*k[2]^5-k[1]^5+4*k[1]^4*k[2]-7*k[1]^3*k[2]^2+7*k[1]^2*k[2]^3-4*k[1]*k[2]^4+k[2]^5-3*a__12*k[1]^3-3*a__12*k[1]^2*k[2]+3*a__12*k[1]*k[2]^2+3*a__12*k[2]^3+3*k[1]^3-9*k[1]^2*k[2]+9*k[1]*k[2]^2-3*k[2]^3)*k[1]*k[2], 2*(-a__12*k[1]^5-4*a__12*k[1]^4*k[2]-7*a__12*k[1]^3*k[2]^2-7*a__12*k[1]^2*k[2]^3-4*a__12*k[1]*k[2]^4-a__12*k[2]^5+k[1]^5-k[1]^3*k[2]^2-k[1]^2*k[2]^3+k[2]^5+3*a__12*k[1]^3+9*a__12*k[1]^2*k[2]+9*a__12*k[1]*k[2]^2+3*a__12*k[2]^3-3*k[1]^3+3*k[1]^2*k[2]+3*k[1]*k[2]^2-3*k[2]^3)*k[1]*k[2], 2*(a__12^2*k[1]^5+4*a__12^2*k[1]^4*k[2]+7*a__12^2*k[1]^3*k[2]^2+7*a__12^2*k[1]^2*k[2]^3+4*a__12^2*k[1]*k[2]^4+a__12^2*k[2]^5-a__12*k[1]^5+a__12*k[1]^3*k[2]^2+a__12*k[1]^2*k[2]^3-a__12*k[2]^5-3*a__12^2*k[1]^3-9*a__12^2*k[1]^2*k[2]-9*a__12^2*k[1]*k[2]^2-3*a__12^2*k[2]^3+3*a__12*k[1]^3-3*a__12*k[1]^2*k[2]-3*a__12*k[1]*k[2]^2+3*a__12*k[2]^3)*k[1]*k[2]}

4

Eq 24.

> 

solve(eqns, a__12); eq24 := factor(%)

{a__12 = (k[1]^2-2*k[1]*k[2]+k[2]^2)/(k[1]^2+2*k[1]*k[2]+k[2]^2)}

{a__12 = (k[1]-k[2])^2/(k[1]+k[2])^2}

> 

eq25 := eval(eqf2, eq24)

f(x, t) = 1+exp(k[1]*(x*k[1]^2+t-x)/(k[1]^2-1))+exp(k[2]*(x*k[2]^2+t-x)/(k[2]^2-1))+(k[1]-k[2])^2*exp(k[1]*(x*k[1]^2+t-x)/(k[1]^2-1))*exp(k[2]*(x*k[2]^2+t-x)/(k[2]^2-1))/(k[1]+k[2])^2

So solution to pdev is

> 

eqv2 := eval(eq17withR, eq25)

v(x, t) = 2*(k[1]*exp(k[1]*(x*k[1]^2+t-x)/(k[1]^2-1))+k[2]*exp(k[2]*(x*k[2]^2+t-x)/(k[2]^2-1))+(k[1]-k[2])^2*k[1]*exp(k[1]*(x*k[1]^2+t-x)/(k[1]^2-1))*exp(k[2]*(x*k[2]^2+t-x)/(k[2]^2-1))/(k[1]+k[2])^2+(k[1]-k[2])^2*exp(k[1]*(x*k[1]^2+t-x)/(k[1]^2-1))*k[2]*exp(k[2]*(x*k[2]^2+t-x)/(k[2]^2-1))/(k[1]+k[2])^2)/(1+exp(k[1]*(x*k[1]^2+t-x)/(k[1]^2-1))+exp(k[2]*(x*k[2]^2+t-x)/(k[2]^2-1))+(k[1]-k[2])^2*exp(k[1]*(x*k[1]^2+t-x)/(k[1]^2-1))*exp(k[2]*(x*k[2]^2+t-x)/(k[2]^2-1))/(k[1]+k[2])^2)

> 

pdetest(eqv2, pdev)

0

And of the original

> 

equ2 := eval(ptrans, eqv2)

Following doesn't complete. Perhaps the integration is too difficult?

> 

pdetest(equ2, pde)

> 

NULL

Download phase_shift.mw

 

To get Maple to work this out, turns out to be surprisingly difficult, if you want to avoid inputting things like the cosine rule that you expect Maple to know. Here's a solution. Really, it should be easier.

> 

restart

> 

with(geometry)

> 

assume(n > 2, 2*r > 0)

Define a regular polygon, with size determined by the radius of the circumscribed circle, r.

Turns out it doesn't accept a symbolic n.

> 

RegularPolygon(P, n, point(o, 0, 0), r)

Error, invalid input: geometry:-RegularPolygon expects its 2nd argument, n, to be of type posint, but received n

Oh, well, I guess we have to make it from triangles. Let's define a triangle by side-angle-side, with the angle at the cenre of the polygon.

> 

triangle(T, [r, angle = 2*Pi/n, r])

T

So now we want to find which r value makes the other side = 1.

> 

sides(T); r := solve(%[3] = 1, r, useassumptions)

[r, r, (2*r^2-2*r^2*cos(2*Pi/n))^(1/2)]

1/(2-2*cos(2*Pi/n))^(1/2)

To make any progress we have to define triangles with 3 points.
So make two triangles with a common side of length r, with that side lying along the x-axis, between the origin at the centre of the polygon and point X.
(Actually, we dont need to generate the triagles, just their vertices.)

> 

point(X, [r, 0]); rotation(A, X, 2*Pi/n, clockwise, o); rotation(B, X, 2*Pi/n, counterclockwise, o)
NULL

X

A

B

Find the midpoints, and the distance between them

> 

midpoint(mOA, o, A); midpoint(mOB, o, B); d := simplify(distance(mOA, mOB))

mOA

mOB

cos(Pi/n)

Find the limit

> 

limit(d, n = infinity)

1

> 

NULL

Download polygon.mw

If I trust isolve (?), then there is only one solution, with the tangents 1, 2 and 3. In the figure below tan(A) = 3, tan(B) = 2, tan(C) = 1.

Download tangents.mw

The exponentials are gone in eq22, so it has worked. I assume that after the substitution, the expression with V simplifies so that there is no longer a V.

If fact you can verify this by doing simplify on eq2.

p.s. use indets(eq22,name) to only see the variable names and not more complicated expressions.

@salim-barzani This iterates over all possibilities of mu[1]=0,1;mu[2]=0,1; etc, and is the only way I can make sense of it.

> 

restart

> 

N := 3

3

> 

f0 := exp(add(mu[i]*eta[i], i = 1 .. N)+add(add(mu[i]*mu[j]*B[i, j], i = 1 .. j-1), j = 1 .. N))

exp(B[1, 2]*mu[1]*mu[2]+B[1, 3]*mu[1]*mu[3]+B[2, 3]*mu[2]*mu[3]+eta[1]*mu[1]+eta[2]*mu[2]+eta[3]*mu[3])

> 

mus := Iterator:-BinaryGrayCode(N); muvals := seq({`~`[`=`](seq(mu[i], i = 1 .. N), seq(mui))}, `in`(mui, mus))

_m2021747042624

{mu[1] = 0, mu[2] = 0, mu[3] = 0}, {mu[1] = 1, mu[2] = 0, mu[3] = 0}, {mu[1] = 1, mu[2] = 1, mu[3] = 0}, {mu[1] = 0, mu[2] = 1, mu[3] = 0}, {mu[1] = 0, mu[2] = 1, mu[3] = 1}, {mu[1] = 1, mu[2] = 1, mu[3] = 1}, {mu[1] = 1, mu[2] = 0, mu[3] = 1}, {mu[1] = 0, mu[2] = 0, mu[3] = 1}

> 

add(eval(f0, muval), `in`(muval, muvals))

1+exp(eta[1])+exp(B[1, 2]+eta[1]+eta[2])+exp(eta[2])+exp(B[2, 3]+eta[2]+eta[3])+exp(B[1, 2]+B[1, 3]+B[2, 3]+eta[1]+eta[2]+eta[3])+exp(B[1, 3]+eta[1]+eta[3])+exp(eta[3])

> 

f1 := exp(add(mu[i]*eta[i], i = 1 .. N)+add(add(mu[i]*mu[j]*ln(b[i, j]), i = 1 .. j-1), j = 1 .. N))

exp(mu[1]*eta[1]+mu[2]*eta[2]+mu[3]*eta[3]+mu[1]*mu[2]*ln(b[1, 2])+mu[1]*mu[3]*ln(b[1, 3])+mu[2]*mu[3]*ln(b[2, 3]))

> 

f := simplify(add(eval(f1, muval), `in`(muval, muvals)))

1+exp(eta[1])+b[1, 2]*exp(eta[1]+eta[2])+exp(eta[2])+b[2, 3]*exp(eta[2]+eta[3])+b[1, 2]*b[1, 3]*b[2, 3]*exp(eta[1]+eta[2]+eta[3])+b[1, 3]*exp(eta[1]+eta[3])+exp(eta[3])

Change b[1,2]*b[2,3]*b[1,3] to b[1,2,3], etc.

> 

evalindets(f,`*`,
  proc(term)
    local inds:=indets(term,specindex(b));
    b[op(op~(inds))]*eval(term,inds=~1);
  end proc);

1+exp(eta[1])+b[1, 2]*exp(eta[1]+eta[2])+exp(eta[2])+b[2, 3]*exp(eta[2]+eta[3])+b[1, 2, 3]*exp(eta[1]+eta[2]+eta[3])+b[1, 3]*exp(eta[1]+eta[3])+exp(eta[3])

> 

``

Download formula.mw

In Maple, u[1/2](t) and u[0.5](t) are not the same so you cannot mix them. I changed all the 0.5's to 1/2 and it seems to work now.

error.mw

First 14 15 16 17 18 19 20 Last Page 16 of 89