delvin

50 Reputation

5 Badges

2 years, 148 days

MaplePrimes Activity


These are replies submitted by delvin

@C_R 

Thanks 

@tomleslie 

 I appreciate your consideration.

@C_R 

 I appreciate your taking the time.

 Just how can I adjust the colors to be brighter? 

@acer 

I want to write a code for the general state of the attached file with Maple, but unfortunately I could not, can anyone help me in this field?

GER.pdf

@C_R 

 okey

How is the MATLAB code? Of course, my MATLAB version is 2014

 

@acer 

Okey

I had forgotten this question.

@acer 

 It is possible to change the program in such a way that the number of EQ equations is reduced, for example to 6, which is equal to the size of our variables.

ddd3_ac.mwddd3_ac.mw

@acer 

 Does this mean that the answers to these 16 equations are self-evident? The last two commands are not wrong?

@acer

 Thank you very much.

 Yes, it was done. Can you tell me what adjustments, because I have several programs that I want to implement a series of changes in them, I would appreciate it.

@C_R 

 Ok, thanks.

@mmcdara 

Sorry,

It can be said that there is a disadvantage of software 1 because I previously executed 2 and 2 of these commands without error, but for other equations.

@delvin 

My dear friend @mmcdara, they worked hard.

But I have a problem with the loop again, I don't know why it gives an error

restart

eq_27 := diff(u[n](t), t$2) = alpha*(- exp(-beta*u[n-1](t)) + 2*exp(-beta*u[n](t)) - exp(-beta*u[n+1](t)))

diff(diff(u[n](t), t), t) = alpha*(-exp(-beta*u[n-1](t))+2*exp(-beta*u[n](t))-exp(-beta*u[n+1](t)))

(1)

eq_28 := n -> exp(-beta*u[n](t)) = 1+v[n](t)/alpha

proc (n) options operator, arrow; exp(-beta*u[n](t)) = 1+v[n](t)/alpha end proc

(2)

aux_1 := isolate(eq_28(n), u[n](t));

u[n](t) = -ln((v[n](t)+alpha)/alpha)/beta

(3)

eq_29 := eval(convert(lhs(eq_27), Diff), aux_1)
         =
         simplify(eval(rhs(eq_27), {seq(eq_28(n+k), k=-1..1)}));

Diff(Diff(-ln((v[n](t)+alpha)/alpha)/beta, t), t) = -v[n-1](t)+2*v[n](t)-v[n+1](t)

(4)

lhs_27 := eval(lhs(eq_27), u[n]=(t -> u[n](xi[n](t)))):
der    := [select(has, indets(%), diff)[]]:
lhs_27 := eval(lhs_27, der =~ eval(der, xi[n](t) = d__1*n + c__1*t + zeta__1)):
lhs_27 := convert(eval(lhs_27, xi[n](t)=xi[n]), diff);

(diff(diff(u[n](xi[n]), xi[n]), xi[n]))*c__1^2

(5)

aux_2 := select(has, indets(rhs(aux_1), function), ln)[] = H(t);

ln((v[n](t)+alpha)/alpha) = H(t)

(6)

eq_29_a := simplify(isolate(convert(eval(eq_29, aux_2), diff), diff(H(t), t$2)));

diff(diff(H(t), t), t) = (v[n-1](t)-2*v[n](t)+v[n+1](t))*beta

(7)

eq_30_1 := lhs_27=rhs(eq_29_a)

(diff(diff(u[n](xi[n]), xi[n]), xi[n]))*c__1^2 = (v[n-1](t)-2*v[n](t)+v[n+1](t))*beta

(8)

eq_30 := eval(convert(eq_30_1, Diff), u[n](xi[n])=lhs(aux_2))

(Diff(Diff(ln((v[n](t)+alpha)/alpha), xi[n]), xi[n]))*c__1^2 = (v[n-1](t)-2*v[n](t)+v[n+1](t))*beta

(9)

eq_30_a := eval(eq_30, {seq(v[n+k](t)=V[n+k](xi[n]), k=-1..1)})

(Diff(Diff(ln((V[n](xi[n])+alpha)/alpha), xi[n]), xi[n]))*c__1^2 = (V[n-1](xi[n])-2*V[n](xi[n])+V[n+1](xi[n]))*beta

(10)

 

eq_30_a is consistent for all the V are functions of xi[n] and you take derivatives wrt xi[n].
eq_30_a is the true equation (30) in the paper you refer to.

But eq_30 is not consistent (funstions of t and derivative wrt xi[n]).

 

 

printf("\n\nWhat you do\n\n"):

Replacements_v := {
  v[n](t) = a[0]+sum(-a[i]*(tanh(t[n]))^i, i = 1 .. 2)+sum(-b[i]*(tanh(t[n]))^(-i), i = 1 .. 2)
  , v[n+1](t) = a[0]-a[1]*(tanh(t[n])+tanh(d))/(1+tanh(t[n])*tanh(d))-a[2]*(tanh(t[n])+tanh(d))^2/(1+tanh(t[n])*tanh(d))^2-b[1]*(1+tanh(t[n])*tanh(d))/(tanh(t[n])+tanh(d))-b[2]*(1+tanh(t[n])*tanh(d))^2/(tanh(t[n])+tanh(d))^2
  , v[n-1](t) = a[0]-a[1]*(tanh(t[n])-tanh(d))/(1-tanh(t[n])*tanh(d))-a[2]*((tanh(t[n])-tanh(d))/(1-tanh(t[n])*tanh(d)))^2-b[1]*(1-tanh(t[n])*tanh(d))/(tanh(t[n])-tanh(d))-b[2]*((1-tanh(t[n])*tanh(d))/(tanh(t[n])-tanh(d)))^2
}:
print~(Replacements_v):


# Is it not this that you should do?

printf("\n\nIs it not this that you should do to account for consistency?\n\n"):

Replacements_V := eval(Replacements_v, {t[n]=xi[n], seq(v[n+k](t)=V[n+k](xi[n]), k=-1..1)}):
print~(Replacements_V):


# Or more simply

printf("\n\nOr more simply\n\n"):

Replacements_Vth := {
  V[n](xi[n]) = a[0]-a[1]*tanh(xi[n])-a[2]*tanh(xi[n])^2-b[1]/tanh(xi[n])-b[2]/tanh(xi[n])^2
  , V[n-1](xi[n]) = a[0]-a[1]*tanh(xi[n]-d)-a[2]*tanh(xi[n]-d)^2-b[1]/tanh(xi[n]-d)-b[2]/tanh(xi[n]-d)^2
  , V[n+1](xi[n]) = a[0]-a[1]*tanh(xi[n]+d)-a[2]*tanh(xi[n]+d)^2-b[1]/tanh(xi[n]+d)-b[2]/tanh(xi[n]+d)^2
}:
print~(Replacements_Vth):



What you do
 

 

v[n](t) = a[0]-a[1]*tanh(t[n])-a[2]*tanh(t[n])^2-b[1]/tanh(t[n])-b[2]/tanh(t[n])^2

 

v[n-1](t) = a[0]-a[1]*(tanh(t[n])-tanh(d))/(1-tanh(t[n])*tanh(d))-a[2]*(tanh(t[n])-tanh(d))^2/(1-tanh(t[n])*tanh(d))^2-b[1]*(1-tanh(t[n])*tanh(d))/(tanh(t[n])-tanh(d))-b[2]*(1-tanh(t[n])*tanh(d))^2/(tanh(t[n])-tanh(d))^2

 

v[n+1](t) = a[0]-a[1]*(tanh(t[n])+tanh(d))/(1+tanh(t[n])*tanh(d))-a[2]*(tanh(t[n])+tanh(d))^2/(1+tanh(t[n])*tanh(d))^2-b[1]*(1+tanh(t[n])*tanh(d))/(tanh(t[n])+tanh(d))-b[2]*(1+tanh(t[n])*tanh(d))^2/(tanh(t[n])+tanh(d))^2

 



Is it not this that you should do to account for consistency?
 

 

V[n](xi[n]) = a[0]-a[1]*tanh(xi[n])-a[2]*tanh(xi[n])^2-b[1]/tanh(xi[n])-b[2]/tanh(xi[n])^2

 

V[n-1](xi[n]) = a[0]-a[1]*(tanh(xi[n])-tanh(d))/(1-tanh(xi[n])*tanh(d))-a[2]*(tanh(xi[n])-tanh(d))^2/(1-tanh(xi[n])*tanh(d))^2-b[1]*(1-tanh(xi[n])*tanh(d))/(tanh(xi[n])-tanh(d))-b[2]*(1-tanh(xi[n])*tanh(d))^2/(tanh(xi[n])-tanh(d))^2

 

V[n+1](xi[n]) = a[0]-a[1]*(tanh(xi[n])+tanh(d))/(1+tanh(xi[n])*tanh(d))-a[2]*(tanh(xi[n])+tanh(d))^2/(1+tanh(xi[n])*tanh(d))^2-b[1]*(1+tanh(xi[n])*tanh(d))/(tanh(xi[n])+tanh(d))-b[2]*(1+tanh(xi[n])*tanh(d))^2/(tanh(xi[n])+tanh(d))^2

 



Or more simply
 

 

V[n](xi[n]) = a[0]-a[1]*tanh(xi[n])-a[2]*tanh(xi[n])^2-b[1]/tanh(xi[n])-b[2]/tanh(xi[n])^2

 

V[n-1](xi[n]) = a[0]+a[1]*tanh(-xi[n]+d)-a[2]*tanh(-xi[n]+d)^2+b[1]/tanh(-xi[n]+d)-b[2]/tanh(-xi[n]+d)^2

 

V[n+1](xi[n]) = a[0]-a[1]*tanh(xi[n]+d)-a[2]*tanh(xi[n]+d)^2-b[1]/tanh(xi[n]+d)-b[2]/tanh(xi[n]+d)^2

(11)

fin0 := eval(eq_30_a, Replacements_Vth)

(Diff(Diff(ln((a[0]-a[1]*tanh(xi[n])-a[2]*tanh(xi[n])^2-b[1]/tanh(xi[n])-b[2]/tanh(xi[n])^2+alpha)/alpha), xi[n]), xi[n]))*c__1^2 = (a[1]*tanh(-xi[n]+d)-a[2]*tanh(-xi[n]+d)^2+b[1]/tanh(-xi[n]+d)-b[2]/tanh(-xi[n]+d)^2+2*a[1]*tanh(xi[n])+2*a[2]*tanh(xi[n])^2+2*b[1]/tanh(xi[n])+2*b[2]/tanh(xi[n])^2-a[1]*tanh(xi[n]+d)-a[2]*tanh(xi[n]+d)^2-b[1]/tanh(xi[n]+d)-b[2]/tanh(xi[n]+d)^2)*beta

(12)

# To force the derivation uncomment the next line

fin0 := convert(fin0, diff)

((2*a[1]*tanh(xi[n])*(1-tanh(xi[n])^2)-2*a[2]*(1-tanh(xi[n])^2)^2+4*a[2]*tanh(xi[n])^2*(1-tanh(xi[n])^2)-2*b[1]*(1-tanh(xi[n])^2)^2/tanh(xi[n])^3-2*b[1]*(1-tanh(xi[n])^2)/tanh(xi[n])-6*b[2]*(1-tanh(xi[n])^2)^2/tanh(xi[n])^4-4*b[2]*(1-tanh(xi[n])^2)/tanh(xi[n])^2)/(a[0]-a[1]*tanh(xi[n])-a[2]*tanh(xi[n])^2-b[1]/tanh(xi[n])-b[2]/tanh(xi[n])^2+alpha)-(-a[1]*(1-tanh(xi[n])^2)-2*a[2]*tanh(xi[n])*(1-tanh(xi[n])^2)+b[1]*(1-tanh(xi[n])^2)/tanh(xi[n])^2+2*b[2]*(1-tanh(xi[n])^2)/tanh(xi[n])^3)^2/(a[0]-a[1]*tanh(xi[n])-a[2]*tanh(xi[n])^2-b[1]/tanh(xi[n])-b[2]/tanh(xi[n])^2+alpha)^2)*c__1^2 = (a[1]*tanh(-xi[n]+d)-a[2]*tanh(-xi[n]+d)^2+b[1]/tanh(-xi[n]+d)-b[2]/tanh(-xi[n]+d)^2+2*a[1]*tanh(xi[n])+2*a[2]*tanh(xi[n])^2+2*b[1]/tanh(xi[n])+2*b[2]/tanh(xi[n])^2-a[1]*tanh(xi[n]+d)-a[2]*tanh(xi[n]+d)^2-b[1]/tanh(xi[n]+d)-b[2]/tanh(xi[n]+d)^2)*beta

(13)

# look at this to understand why you get an error.

p/q=P/Q;
numer(%);

p/q = P/Q

 

Error, invalid input: numer expects its 1st argument, x, to be of type {algebraic, list, set}, but received p/q = P/Q

 

# or to this

p=P/Q;
numer(%);

p = P/Q

 

Error, invalid input: numer expects its 1st argument, x, to be of type {algebraic, list, set}, but received p = P/Q

 

# if you want to get the numerators of both sides do this

p/q=P/Q;
map(numer, %)

p/q = P/Q

 

p = P

(14)

# APPLICATION:

fin1 := map(numer, fin0)

(tanh(xi[n])^2-1)*tanh(xi[n])^4*(-10*tanh(xi[n])^3*a[1]*b[2]-2*tanh(xi[n])^3*b[1]*b[2]+6*tanh(xi[n])^2*alpha*b[2]+6*tanh(xi[n])^2*a[0]*b[2]-4*tanh(xi[n])*b[1]*b[2]-2*tanh(xi[n])^7*a[0]*a[1]+2*tanh(xi[n])^7*a[1]*a[2]+10*tanh(xi[n])^7*a[2]*b[1]+2*tanh(xi[n])^6*alpha*a[2]+2*tanh(xi[n])^6*a[0]*a[2]+4*tanh(xi[n])^6*a[1]*b[1]+16*tanh(xi[n])^6*a[2]*b[2]+8*tanh(xi[n])^5*a[1]*b[2]-8*tanh(xi[n])^5*a[2]*b[1]-2*tanh(xi[n])^4*alpha*b[2]-2*tanh(xi[n])^4*a[0]*b[2]-4*tanh(xi[n])^4*a[1]*b[1]-16*tanh(xi[n])^4*a[2]*b[2]+2*tanh(xi[n])^3*alpha*b[1]+2*tanh(xi[n])^3*a[0]*b[1]+4*tanh(xi[n])^9*a[1]*a[2]-6*tanh(xi[n])^8*alpha*a[2]-6*tanh(xi[n])^8*a[0]*a[2]-2*tanh(xi[n])^7*alpha*a[1]+2*tanh(xi[n])^10*a[2]^2+tanh(xi[n])^8*a[1]^2+2*tanh(xi[n])^8*a[2]^2+tanh(xi[n])^6*a[1]^2-tanh(xi[n])^4*b[1]^2-tanh(xi[n])^2*b[1]^2-2*tanh(xi[n])^2*b[2]^2-2*b[2]^2)*c__1^2 = -(a[2]*tanh(-xi[n]+d)^4*tanh(xi[n])^2*tanh(xi[n]+d)^2+a[2]*tanh(xi[n]+d)^4*tanh(-xi[n]+d)^2*tanh(xi[n])^2-2*a[2]*tanh(xi[n])^4*tanh(-xi[n]+d)^2*tanh(xi[n]+d)^2-a[1]*tanh(-xi[n]+d)^3*tanh(xi[n])^2*tanh(xi[n]+d)^2+a[1]*tanh(xi[n]+d)^3*tanh(-xi[n]+d)^2*tanh(xi[n])^2-2*a[1]*tanh(xi[n])^3*tanh(-xi[n]+d)^2*tanh(xi[n]+d)^2-2*b[1]*tanh(-xi[n]+d)^2*tanh(xi[n])*tanh(xi[n]+d)^2+b[1]*tanh(-xi[n]+d)^2*tanh(xi[n])^2*tanh(xi[n]+d)-b[1]*tanh(-xi[n]+d)*tanh(xi[n])^2*tanh(xi[n]+d)^2-2*b[2]*tanh(-xi[n]+d)^2*tanh(xi[n]+d)^2+b[2]*tanh(-xi[n]+d)^2*tanh(xi[n])^2+b[2]*tanh(xi[n])^2*tanh(xi[n]+d)^2)*beta

(15)

# Use this correction and do a step worward

 

subs(tanh(xi[n]) = Psi, fin1); fin := simplify(%)

2*(Psi-1)*Psi^4*(Psi+1)*c__1^2*(Psi^10*a[2]^2+2*Psi^9*a[1]*a[2]+(a[2]^2+(-3*alpha-3*a[0])*a[2]+(1/2)*a[1]^2)*Psi^8+((a[1]+5*b[1])*a[2]-a[1]*(alpha+a[0]))*Psi^7+((alpha+a[0]+8*b[2])*a[2]+(1/2)*a[1]*(a[1]+4*b[1]))*Psi^6+(4*a[1]*b[2]-4*a[2]*b[1])*Psi^5+(-8*a[2]*b[2]+(-alpha-a[0])*b[2]-2*((1/4)*b[1]+a[1])*b[1])*Psi^4+((-5*a[1]-b[1])*b[2]+b[1]*(alpha+a[0]))*Psi^3+(-b[2]^2+(3*alpha+3*a[0])*b[2]-(1/2)*b[1]^2)*Psi^2-2*Psi*b[1]*b[2]-b[2]^2) = -(a[2]*tanh(-xi[n]+d)^4*Psi^2*tanh(xi[n]+d)^2-a[1]*tanh(-xi[n]+d)^3*Psi^2*tanh(xi[n]+d)^2+(a[2]*tanh(xi[n]+d)^4*Psi^2+a[1]*tanh(xi[n]+d)^3*Psi^2+(-2*Psi^4*a[2]-2*Psi^3*a[1]-2*Psi*b[1]-2*b[2])*tanh(xi[n]+d)^2+b[1]*Psi^2*tanh(xi[n]+d)+b[2]*Psi^2)*tanh(-xi[n]+d)^2-b[1]*tanh(-xi[n]+d)*Psi^2*tanh(xi[n]+d)^2+b[2]*Psi^2*tanh(xi[n]+d)^2)*beta

(16)

 

NULL

for i from 0 to degree(fin, Psi) do EQ[i] := simplify(coeff(fin, Psi, i)) end do

Error, final value in for loop must be numeric or character

 

Eqs := {seq(EQ[i], i = 0 .. 6)}

Sol := solve(Eqs, {a[0], a[1], a[2], b[1], b[2], c[1]})``

(17)

Download ddd3.mw

@mmcdara 

 Thank you for everything you do.

Unfortunately no.

@mmcdara 

Thanks 

Sorry, I was not familiar with vote.

Only one of the answers had a cup.

@mmcdara 

 Hello,

Can you see why the rest is wrong?

restart

eq_27 := diff(u[n](t), t$2) = alpha*(- exp(-beta*u[n-1](t)) + 2*exp(-beta*u[n](t)) - exp(-beta*u[n+1](t)))

diff(diff(u[n](t), t), t) = alpha*(-exp(-beta*u[n-1](t))+2*exp(-beta*u[n](t))-exp(-beta*u[n+1](t)))

(1)

eq_28 := n -> exp(-beta*u[n](t)) = 1+v[n](t)/alpha

proc (n) options operator, arrow; exp(-beta*u[n](t)) = 1+v[n](t)/alpha end proc

(2)

aux_1 := isolate(eq_28(n), u[n](t));

u[n](t) = -ln((v[n](t)+alpha)/alpha)/beta

(3)

eq_29 := eval(convert(lhs(eq_27), Diff), aux_1)
         =
         simplify(eval(rhs(eq_27), {seq(eq_28(n+k), k=-1..1)}));

Diff(Diff(-ln((v[n](t)+alpha)/alpha)/beta, t), t) = -v[n-1](t)+2*v[n](t)-v[n+1](t)

(4)

lhs_27 := eval(lhs(eq_27), u[n]=(t -> u[n](xi[n](t)))):
der    := [select(has, indets(%), diff)[]]:
lhs_27 := eval(lhs_27, der =~ eval(der, xi[n](t) = d__1*n + c__1*t + zeta__1)):
lhs_27 := convert(eval(lhs_27, xi[n](t)=xi[n]), diff);

(diff(diff(u[n](xi[n]), xi[n]), xi[n]))*c__1^2

(5)

aux_2 := select(has, indets(rhs(aux_1), function), ln)[] = H(t);

ln((v[n](t)+alpha)/alpha) = H(t)

(6)

eq_29_a := simplify(isolate(convert(eval(eq_29, aux_2), diff), diff(H(t), t$2)));

diff(diff(H(t), t), t) = (v[n-1](t)-2*v[n](t)+v[n+1](t))*beta

(7)

eq_30_1 := lhs_27=rhs(eq_29_a)

(diff(diff(u[n](xi[n]), xi[n]), xi[n]))*c__1^2 = (v[n-1](t)-2*v[n](t)+v[n+1](t))*beta

(8)

eq_30 := eval(convert(eq_30_1, Diff), u[n](xi[n])=lhs(aux_2))

(Diff(Diff(ln((v[n](t)+alpha)/alpha), xi[n]), xi[n]))*c__1^2 = (v[n-1](t)-2*v[n](t)+v[n+1](t))*beta

(9)

eq_30_a := eval(eq_30, {seq(v[n+k](t)=V[n+k](xi[n]), k=-1..1)})

(Diff(Diff(ln((V[n](xi[n])+alpha)/alpha), xi[n]), xi[n]))*c__1^2 = (V[n-1](xi[n])-2*V[n](xi[n])+V[n+1](xi[n]))*beta

(10)

 

eq_30_a is consistent for all the V are functions of xi[n] and you take derivatives wrt xi[n].
eq_30_a is the true equation (30) in the paper you refer to.

But eq_30 is not consistent (funstions of t and derivative wrt xi[n]).

 

 

printf("\n\nWhat you do\n\n"):

Replacements_v := {
  v[n](t) = a[0]+sum(-a[i]*(tanh(t[n]))^i, i = 1 .. 2)+sum(-b[i]*(tanh(t[n]))^(-i), i = 1 .. 2)
  , v[n+1](t) = a[0]-a[1]*(tanh(t[n])+tanh(d))/(1+tanh(t[n])*tanh(d))-a[2]*(tanh(t[n])+tanh(d))^2/(1+tanh(t[n])*tanh(d))^2-b[1]*(1+tanh(t[n])*tanh(d))/(tanh(t[n])+tanh(d))-b[2]*(1+tanh(t[n])*tanh(d))^2/(tanh(t[n])+tanh(d))^2
  , v[n-1](t) = a[0]-a[1]*(tanh(t[n])-tanh(d))/(1-tanh(t[n])*tanh(d))-a[2]*((tanh(t[n])-tanh(d))/(1-tanh(t[n])*tanh(d)))^2-b[1]*(1-tanh(t[n])*tanh(d))/(tanh(t[n])-tanh(d))-b[2]*((1-tanh(t[n])*tanh(d))/(tanh(t[n])-tanh(d)))^2
}:
print~(Replacements_v):


# Is it not this that you should do?

printf("\n\nIs it not this that you should do to account for consistency?\n\n"):

Replacements_V := eval(Replacements_v, {t[n]=xi[n], seq(v[n+k](t)=V[n+k](xi[n]), k=-1..1)}):
print~(Replacements_V):


# Or more simply

printf("\n\nOr more simply\n\n"):

Replacements_Vth := {
  V[n](xi[n]) = a[0]-a[1]*tanh(xi[n])-a[2]*tanh(xi[n])^2-b[1]/tanh(xi[n])-b[2]/tanh(xi[n])^2
  , V[n-1](xi[n]) = a[0]-a[1]*tanh(xi[n]-d)-a[2]*tanh(xi[n]-d)^2-b[1]/tanh(xi[n]-d)-b[2]/tanh(xi[n]-d)^2
  , V[n+1](xi[n]) = a[0]-a[1]*tanh(xi[n]+d)-a[2]*tanh(xi[n]+d)^2-b[1]/tanh(xi[n]+d)-b[2]/tanh(xi[n]+d)^2
}:
print~(Replacements_Vth):



What you do
 

 

v[n](t) = a[0]-a[1]*tanh(t[n])-a[2]*tanh(t[n])^2-b[1]/tanh(t[n])-b[2]/tanh(t[n])^2

 

v[n-1](t) = a[0]-a[1]*(tanh(t[n])-tanh(d))/(1-tanh(t[n])*tanh(d))-a[2]*(tanh(t[n])-tanh(d))^2/(1-tanh(t[n])*tanh(d))^2-b[1]*(1-tanh(t[n])*tanh(d))/(tanh(t[n])-tanh(d))-b[2]*(1-tanh(t[n])*tanh(d))^2/(tanh(t[n])-tanh(d))^2

 

v[n+1](t) = a[0]-a[1]*(tanh(t[n])+tanh(d))/(1+tanh(t[n])*tanh(d))-a[2]*(tanh(t[n])+tanh(d))^2/(1+tanh(t[n])*tanh(d))^2-b[1]*(1+tanh(t[n])*tanh(d))/(tanh(t[n])+tanh(d))-b[2]*(1+tanh(t[n])*tanh(d))^2/(tanh(t[n])+tanh(d))^2

 



Is it not this that you should do to account for consistency?
 

 

V[n](xi[n]) = a[0]-a[1]*tanh(xi[n])-a[2]*tanh(xi[n])^2-b[1]/tanh(xi[n])-b[2]/tanh(xi[n])^2

 

V[n-1](xi[n]) = a[0]-a[1]*(tanh(xi[n])-tanh(d))/(1-tanh(xi[n])*tanh(d))-a[2]*(tanh(xi[n])-tanh(d))^2/(1-tanh(xi[n])*tanh(d))^2-b[1]*(1-tanh(xi[n])*tanh(d))/(tanh(xi[n])-tanh(d))-b[2]*(1-tanh(xi[n])*tanh(d))^2/(tanh(xi[n])-tanh(d))^2

 

V[n+1](xi[n]) = a[0]-a[1]*(tanh(xi[n])+tanh(d))/(1+tanh(xi[n])*tanh(d))-a[2]*(tanh(xi[n])+tanh(d))^2/(1+tanh(xi[n])*tanh(d))^2-b[1]*(1+tanh(xi[n])*tanh(d))/(tanh(xi[n])+tanh(d))-b[2]*(1+tanh(xi[n])*tanh(d))^2/(tanh(xi[n])+tanh(d))^2

 



Or more simply
 

 

V[n](xi[n]) = a[0]-a[1]*tanh(xi[n])-a[2]*tanh(xi[n])^2-b[1]/tanh(xi[n])-b[2]/tanh(xi[n])^2

 

V[n-1](xi[n]) = a[0]+a[1]*tanh(-xi[n]+d)-a[2]*tanh(-xi[n]+d)^2+b[1]/tanh(-xi[n]+d)-b[2]/tanh(-xi[n]+d)^2

 

V[n+1](xi[n]) = a[0]-a[1]*tanh(xi[n]+d)-a[2]*tanh(xi[n]+d)^2-b[1]/tanh(xi[n]+d)-b[2]/tanh(xi[n]+d)^2

(11)

fin0 := eval(eq_30_a, Replacements_Vth)

(Diff(Diff(ln((a[0]-a[1]*tanh(xi[n])-a[2]*tanh(xi[n])^2-b[1]/tanh(xi[n])-b[2]/tanh(xi[n])^2+alpha)/alpha), xi[n]), xi[n]))*c__1^2 = (a[1]*tanh(-xi[n]+d)-a[2]*tanh(-xi[n]+d)^2+b[1]/tanh(-xi[n]+d)-b[2]/tanh(-xi[n]+d)^2+2*a[1]*tanh(xi[n])+2*a[2]*tanh(xi[n])^2+2*b[1]/tanh(xi[n])+2*b[2]/tanh(xi[n])^2-a[1]*tanh(xi[n]+d)-a[2]*tanh(xi[n]+d)^2-b[1]/tanh(xi[n]+d)-b[2]/tanh(xi[n]+d)^2)*beta

(12)

# To force the derivation uncomment the next line

# convert(fin0, diff)

fin1 := simplify(numer(fin0))

Error, invalid input: numer expects its 1st argument, x, to be of type {algebraic, list, set}, but received Diff(Diff(ln((a[0]-a[1]*tanh(xi[n])-a[2]*tanh(xi[n])^2-b[1]/tanh(xi[n])-b[2]/tanh(xi[n])^2+alpha)/alpha),xi[n]),xi[n])*c__1^2 = (a[1]*tanh(-xi[n]+d)-a[2]*tanh(-xi[n]+d)^2+b[1]/tanh(-xi[n]+d)-b[2]/tanh(-xi[n]+d)^2+2*a[1]*tanh(xi[n])+2*a[2]*tanh(xi[n])^2+2*b[1]/tanh(xi[n])+2*b[2]/tanh(xi[n])^2-a[1]*tanh(xi[n]+d)-a[2]*tanh(xi[n]+d)^2-b[1]/tanh(xi[n]+d)-b[2]/tanh(xi[n]+d)^2)*beta

 

NULL

fin := simplify(subs(tanh(xi[n]) = Psi, fin1));

fin1

(13)

degree(fin,Psi)

0

(14)

FF:=convert(series(fin,Psi,7),polynom):

degree(%,Psi)

0

(15)

for i from 0 to degree(FF, Psi) do
    EQ[i] := simplify(coeff(FF, Psi, i));
end do

fin1

(16)

NULL

Eqs := {seq(EQ[i], i = 0 .. 6)}

Sol := dsolve(Eqs, {a[0], a[1], a[2], b[1], b[2], c[1]})

Error, (in dsolve) not a system with respect to the unknowns {a[0], a[1], a[2], b[1], b[2], c[1]}

 

 

Download ddd_1_mmcdara.mw

2 3 4 5 6 7 8 Page 4 of 8