mmcdara

7891 Reputation

22 Badges

9 years, 50 days

MaplePrimes Activity


These are answers submitted by mmcdara

It's never a good strategy to complexify unnecessarily an equation before trying to solve it.
This will only complicate Maple's task.

restart

with(PDEtools):

undeclare(prime, quiet); -1; declare(u(x, y, t), quiet); -1; declare(f(x, y, t), quiet)

theta := i -> t*w[i]+y*l[i]+x

proc (i) options operator, arrow; t*w[i]+y*l[i]+x end proc

(1)

# As Bij(1, 2) does not depend on x not y there is no need
# to explicit its value, so:

eqf := f(x, y, t) = theta(1)*theta(2)+Bij(1, 2)

f(x, y, t) = (t*w[1]+y*l[1]+x)*(t*w[2]+y*l[2]+x)+Bij(1, 2)

(2)

# Here again there is no need to explicit l[1] as neither lambda[1] nor lambda[2]
# depend on x and/or y.
# More: saying that l[2] = conjugate(l[1]) is not even mandatory

eqfcomplex := eval(eqf, l[2] = conjugate(l[1]))

f(x, y, t) = (t*w[1]+y*l[1]+x)*(t*w[2]+y*conjugate(l[1])+x)+Bij(1, 2)

(3)

eq17 := u(x, y, t) = 2*(diff(f(x, y, t), x))/f(x, y, t)

u(x, y, t) = 2*(diff(f(x, y, t), x))/f(x, y, t)

(4)

equ := eval(eq17, eqfcomplex)

u(x, y, t) = 2*(t*w[2]+y*conjugate(l[1])+2*x+t*w[1]+y*l[1])/((t*w[1]+y*l[1]+x)*(t*w[2]+y*conjugate(l[1])+x)+Bij(1, 2))

(5)

sys := map(normal, {diff(rhs(equ), x), diff(rhs(equ), y)});

{-2*(conjugate(l[1])^2*y^2+2*conjugate(l[1])*t*y*w[2]+t^2*w[1]^2+t^2*w[2]^2+2*t*y*l[1]*w[1]+y^2*l[1]^2+2*conjugate(l[1])*x*y+2*t*x*w[1]+2*t*x*w[2]+2*x*y*l[1]+2*x^2-2*Bij(1, 2))/(conjugate(l[1])*t*y*w[1]+conjugate(l[1])*y^2*l[1]+t^2*w[1]*w[2]+t*y*l[1]*w[2]+conjugate(l[1])*x*y+t*x*w[1]+t*x*w[2]+x*y*l[1]+x^2+Bij(1, 2))^2, -2*(conjugate(l[1])^2*y^2*l[1]+conjugate(l[1])*t^2*w[1]^2+2*conjugate(l[1])*t*y*l[1]*w[1]+2*conjugate(l[1])*t*y*l[1]*w[2]+conjugate(l[1])*y^2*l[1]^2+t^2*l[1]*w[2]^2+2*conjugate(l[1])*t*x*w[1]+4*conjugate(l[1])*x*y*l[1]+2*t*x*l[1]*w[2]+conjugate(l[1])*x^2+x^2*l[1]-conjugate(l[1])*Bij(1, 2)-Bij(1, 2)*l[1])/(conjugate(l[1])*t*y*w[1]+conjugate(l[1])*y^2*l[1]+t^2*w[1]*w[2]+t*y*l[1]*w[2]+conjugate(l[1])*x*y+t*x*w[1]+t*x*w[2]+x*y*l[1]+x^2+Bij(1, 2))^2}

(6)

# Step 1: solve numer~(sys)=0
# Step 2: check that the roots of numer~(sys) are not those of denom~(sys)

nsys  := map(numer, sys):
nroot := solve(nsys, {x, y}, explicit)

{x = -(1/2)*(t*conjugate(l[1])*w[1]+t*conjugate(l[1])*w[2]-t*l[1]*w[1]-t*l[1]*w[2]+(t*w[1]-t*w[2]+2*Bij(1, 2)^(1/2))*conjugate(l[1])+(t*w[1]-t*w[2]+2*Bij(1, 2)^(1/2))*l[1])/(conjugate(l[1])-l[1]), y = (t*w[1]-t*w[2]+2*Bij(1, 2)^(1/2))/(conjugate(l[1])-l[1])}, {x = -(1/2)*(t*conjugate(l[1])*w[1]+t*conjugate(l[1])*w[2]-t*l[1]*w[1]-t*l[1]*w[2]+(t*w[1]-t*w[2]-2*Bij(1, 2)^(1/2))*conjugate(l[1])+(t*w[1]-t*w[2]-2*Bij(1, 2)^(1/2))*l[1])/(conjugate(l[1])-l[1]), y = (t*w[1]-t*w[2]-2*Bij(1, 2)^(1/2))/(conjugate(l[1])-l[1])}, {x = (-t*conjugate(l[1])*w[1]+t*l[1]*w[2]+(Bij(1, 2)*conjugate(l[1])^2-2*Bij(1, 2)*conjugate(l[1])*l[1]+Bij(1, 2)*l[1]^2)^(1/2))/(conjugate(l[1])-l[1]), y = t*(w[1]-w[2])/(conjugate(l[1])-l[1])}, {x = (-t*conjugate(l[1])*w[1]+t*l[1]*w[2]-(Bij(1, 2)*conjugate(l[1])^2-2*Bij(1, 2)*conjugate(l[1])*l[1]+Bij(1, 2)*l[1]^2)^(1/2))/(conjugate(l[1])-l[1]), y = t*(w[1]-w[2])/(conjugate(l[1])-l[1])}

(7)

dsys  := map(denom, sys):
droot := solve(dsys, {x, y}, explicit)

{x = -(1/2)*t*w[1]-(1/2)*t*w[2]-(1/2)*y*conjugate(l[1])-(1/2)*y*l[1]+(1/2)*(conjugate(l[1])^2*y^2-2*conjugate(l[1])*t*y*w[1]+2*conjugate(l[1])*t*y*w[2]-2*conjugate(l[1])*y^2*l[1]+t^2*w[1]^2-2*t^2*w[1]*w[2]+t^2*w[2]^2+2*t*y*l[1]*w[1]-2*t*y*l[1]*w[2]+y^2*l[1]^2-4*Bij(1, 2))^(1/2), y = y}, {x = -(1/2)*t*w[1]-(1/2)*t*w[2]-(1/2)*y*conjugate(l[1])-(1/2)*y*l[1]-(1/2)*(conjugate(l[1])^2*y^2-2*conjugate(l[1])*t*y*w[1]+2*conjugate(l[1])*t*y*w[2]-2*conjugate(l[1])*y^2*l[1]+t^2*w[1]^2-2*t^2*w[1]*w[2]+t^2*w[2]^2+2*t*y*l[1]*w[1]-2*t*y*l[1]*w[2]+y^2*l[1]^2-4*Bij(1, 2))^(1/2), y = y}

(8)

# numer and denom have different roots:

{nroot} intersect {droot}

{}

(9)

# How to go further?
#
# Example:
# Let's take the first nroot:

compact_ans1 := nroot[1]

{x = -(1/2)*(t*conjugate(l[1])*w[1]+t*conjugate(l[1])*w[2]-t*l[1]*w[1]-t*l[1]*w[2]+(t*w[1]-t*w[2]+2*Bij(1, 2)^(1/2))*conjugate(l[1])+(t*w[1]-t*w[2]+2*Bij(1, 2)^(1/2))*l[1])/(conjugate(l[1])-l[1]), y = (t*w[1]-t*w[2]+2*Bij(1, 2)^(1/2))/(conjugate(l[1])-l[1])}

(10)

__w := seq(w[i] = (-1+sqrt(-4*b*beta*l[i]-4*a*beta+1))/(2*beta), i=1..2)

w[1] = (1/2)*(-1+(-4*b*beta*l[1]-4*a*beta+1)^(1/2))/beta, w[2] = (1/2)*(-1+(-4*b*beta*l[2]-4*a*beta+1)^(1/2))/beta

(11)

__Bij := (i,j) -> -24*alpha*beta/(sqrt(1 + (-4*b*l[j] - 4*a)*beta)*sqrt(1 + (-4*b*l[i] - 4*a)*beta) - 1 + ((2*l[i] + 2*l[j])*b + 4*a)*beta);

proc (i, j) options operator, arrow; -24*alpha*beta/(sqrt(1+(-4*b*l[j]-4*a)*beta)*sqrt(1+(-4*b*l[i]-4*a)*beta)-1+((2*l[i]+2*l[j])*b+4*a)*beta) end proc

(12)

eval(eval(compact_ans1, {__w, Bij(1, 2) = __Bij(1, 2)}), l[1]=lambda[1]+I*lambda[2])
assuming lambda[1]::real, lambda[2]::real:
 

ans1 := map(simplify, %, size); # it's up to you to use another simplification strategy

{x = (1/4)*(-t*(I*lambda[1]+lambda[2])*(-4*b*beta*(lambda[1]+I*lambda[2])-4*a*beta+1)^(1/2)+(I*lambda[1]-lambda[2])*t*(1+(-4*b*l[2]-4*a)*beta)^(1/2)-(4*I)*beta*lambda[1]*(-24*alpha*beta/((1+(-4*b*l[2]-4*a)*beta)^(1/2)*((-(4*I)*lambda[2]-4*lambda[1])*beta*b-4*a*beta+1)^(1/2)-1+((2*lambda[1]+(2*I)*lambda[2]+2*l[2])*b+4*a)*beta))^(1/2)+2*t*lambda[2])/(beta*lambda[2]), y = ((1/4)*I)*(-t*(1+(-4*b*l[2]-4*a)*beta)^(1/2)+t*(-4*b*beta*(lambda[1]+I*lambda[2])-4*a*beta+1)^(1/2)+4*(-24*alpha*beta/((1+(-4*b*l[2]-4*a)*beta)^(1/2)*((-(4*I)*lambda[2]-4*lambda[1])*beta*b-4*a*beta+1)^(1/2)-1+((2*lambda[1]+(2*I)*lambda[2]+2*l[2])*b+4*a)*beta))^(1/2)*beta)/(beta*lambda[2])}

(13)

# Do the same for the other nroot solutions

 

 

Download critical-point_mmcdara.mw

restart;

t   := sum(a[j]*q^j, j = 0 .. 9):

H   := diff(t, q):

F   := diff(t, q $ 2):

p1  := simplify(eval(t, q = x)) = y[n]:

p2  := simplify(eval(F, q = x)) = f[n]:

p3  := simplify(eval(F, q = x + h/4)) = f[n + 1/4]:

p4  := simplify(eval(F, q = x + h/2)) = f[n + 1/2]:

p5  := simplify(eval(F, q = x + (3*h)/4)) = f[n + 3/4]:

p6  := simplify(eval(F, q = x + h)) = f[n + 1]:

p7  := simplify(eval(F, q = x + (5*h)/4)) = f[n + 5/4]:

p8  := simplify(eval(F, q = x + (3*h)/2)) = f[n + 3/2]:

p9  := simplify(eval(F, q = x + (7*h)/4)) = f[n + 7/4]:

p10 := simplify(eval(F, q = x + 2*h)) = f[n + 2]:

r := seq(a[i], i = 0 .. 9):

s := p || (1 .. 10):

S := [s]:
R := [r];

numelems~([S, R])

[a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9]]

 

[10, 10]

(1)

sol9 := solve(S[1..9], R):

whattype(sol9);
nops(sol9)

list

 

1

(2)

simplify(eval(S[10], sol9[1]), size);

depends(%, R);
 

-f[n]-70*f[n+1]-28*f[n+1/2]+8*f[n+1/4]-28*f[n+3/2]+56*f[n+3/4]+56*f[n+5/4]+8*f[n+7/4] = f[n+2]

 

false

 

{}

(3)

# As eval(R[10], sol9[1]) doesn't depend on R, solve(S, R) has no solutions
 

# Subsystems

for i from 1 to 10 do
  sol__||i := solve(S[subsop(i=NULL, [$1..10])], R):


  print():
  if nops(sol__||i) <> 0 then
    print(cat("solving S[", subsop(i=NULL, [$1..10]), "] wrt R has ", nops(sol__||i), " solution"));
    z := simplify(eval(S[i], sol__||i[1]), size);
    if depends(z, R) then
      print(cat("---- and the remaining equations depends on ", indets(z) intersect({R[]}))):
    else
      print(cat("---- but the remaining equations does not depent on any member of R"));
      print(`last equation` = z):
    end if:
  else
    print(cat("solving S[", subsop(i=NULL, [$1..10]), "] wrt R has no solution"));
  end if;
end do:

 

"solving S[[2, 3, 4, 5, 6, 7, 8, 9, 10]] wrt R has no solution"

 

 

"solving S[[1, 3, 4, 5, 6, 7, 8, 9, 10]] wrt R has 1 solution"

 

"---- but the remaining equations does not depent on any member of R"

 

`last equation` = (-70*f[n+1]-f[n+2]-28*f[n+1/2]+8*f[n+1/4]-28*f[n+3/2]+56*f[n+3/4]+56*f[n+5/4]+8*f[n+7/4] = f[n])

 

 

"solving S[[1, 2, 4, 5, 6, 7, 8, 9, 10]] wrt R has 1 solution"

 

"---- but the remaining equations does not depent on any member of R"

 

`last equation` = ((1/8)*f[n]+(35/4)*f[n+1]+(1/8)*f[n+2]+(7/2)*f[n+1/2]+(7/2)*f[n+3/2]-7*f[n+3/4]-7*f[n+5/4]-f[n+7/4] = f[n+1/4])

 

 

"solving S[[1, 2, 3, 5, 6, 7, 8, 9, 10]] wrt R has 1 solution"

 

"---- but the remaining equations does not depent on any member of R"

 

`last equation` = (-(1/28)*f[n]-(5/2)*f[n+1]-(1/28)*f[n+2]+(2/7)*f[n+1/4]-f[n+3/2]+2*f[n+3/4]+2*f[n+5/4]+(2/7)*f[n+7/4] = f[n+1/2])

 

 

"solving S[[1, 2, 3, 4, 6, 7, 8, 9, 10]] wrt R has 1 solution"

 

"---- but the remaining equations does not depent on any member of R"

 

`last equation` = ((1/56)*f[n]+(5/4)*f[n+1]+(1/56)*f[n+2]+(1/2)*f[n+1/2]-(1/7)*f[n+1/4]+(1/2)*f[n+3/2]-f[n+5/4]-(1/7)*f[n+7/4] = f[n+3/4])

 

 

"solving S[[1, 2, 3, 4, 5, 7, 8, 9, 10]] wrt R has 1 solution"

 

"---- but the remaining equations does not depent on any member of R"

 

`last equation` = (-(1/70)*f[n]-(1/70)*f[n+2]-(2/5)*f[n+1/2]+(4/35)*f[n+1/4]-(2/5)*f[n+3/2]+(4/5)*f[n+3/4]+(4/5)*f[n+5/4]+(4/35)*f[n+7/4] = f[n+1])

 

 

"solving S[[1, 2, 3, 4, 5, 6, 8, 9, 10]] wrt R has 1 solution"

 

"---- but the remaining equations does not depent on any member of R"

 

`last equation` = ((1/56)*f[n]+(5/4)*f[n+1]+(1/56)*f[n+2]+(1/2)*f[n+1/2]-(1/7)*f[n+1/4]+(1/2)*f[n+3/2]-f[n+3/4]-(1/7)*f[n+7/4] = f[n+5/4])

 

 

"solving S[[1, 2, 3, 4, 5, 6, 7, 9, 10]] wrt R has 1 solution"

 

"---- but the remaining equations does not depent on any member of R"

 

`last equation` = (-(1/28)*f[n]-(5/2)*f[n+1]-(1/28)*f[n+2]-f[n+1/2]+(2/7)*f[n+1/4]+2*f[n+3/4]+2*f[n+5/4]+(2/7)*f[n+7/4] = f[n+3/2])

 

 

"solving S[[1, 2, 3, 4, 5, 6, 7, 8, 10]] wrt R has 1 solution"

 

"---- but the remaining equations does not depent on any member of R"

 

`last equation` = ((7/2)*f[n+3/2]-f[n+1/4]+(7/2)*f[n+1/2]-7*f[n+3/4]+(35/4)*f[n+1]-7*f[n+5/4]+(1/8)*f[n+2]+(1/8)*f[n] = f[n+7/4])

 

 

"solving S[[1, 2, 3, 4, 5, 6, 7, 8, 9]] wrt R has 1 solution"

 

"---- but the remaining equations does not depent on any member of R"

 

`last equation` = (-f[n]-70*f[n+1]-28*f[n+1/2]+8*f[n+1/4]-28*f[n+3/2]+56*f[n+3/4]+56*f[n+5/4]+8*f[n+7/4] = f[n+2])

(4)

# Thus your system has no solution for arbitrary f
#
# Direct proof

A, B := LinearAlgebra:-GenerateMatrix(S, R):
LinearAlgebra:-Rank(A);

9

(5)
 

 

Download details.mw

restart:

s0 := Sum(Sum(1/(m^2-n^2), m=1..+infinity), n=1..+infinity)

Sum(Sum(1/(m^2-n^2), m = 1 .. infinity), n = 1 .. infinity)

(1)

s1 := Sum(Sum(1/(m^2-n^2), m=1..n-1), n=1..+infinity) + Sum(Sum(1/(m^2-n^2), m=n+1..+infinity), n=1..+infinity)

Sum(Sum(1/(m^2-n^2), m = 1 .. n-1), n = 1 .. infinity)+Sum(Sum(1/(m^2-n^2), m = n+1 .. infinity), n = 1 .. infinity)

(2)

s2 := value(s1)

sum(-(1/2)*Psi(2*n)/n-(1/2)*gamma/n+(1/2)*Psi(n+1)/n-(1/2)*Psi(n)/n, n = 1 .. infinity)+sum((1/2)*Psi(2*n+1)/n+(1/2)*gamma/n, n = 1 .. infinity)

(3)

combine(s2)

(1/8)*Pi^2

(4)
 

 

Download test_mmcdara.mw

Here is an example that you can adapt to your own problem.

As I use Maple 2015, RandomTools[GenerateSimilar] is not supported, the end of the attached file presents a proposal based on Maple 2015 : it can be translated immediatly into more recent versions and easily customizable.

A_few_ideas.mw

Result:

What is equation (77)?

Your equation L3, which I guess is this unknown relation (77) after having substituted in it relations (79)  (which seems tocorrespondtowhat you name  L2, am I right?) contains far more monomials than only t^2, s*t, y*t... as said in the unusefull excerpt you provide.

Look to the attached file and please, keep in maind that if you need help you have to provide potential helpers all necessary informations they could need of.

Clarifications_needed.mw

Besides, I don't think that asking the same type of questions from different logins (proses, syntaxes and codes are too similar to be mere coincidence) will save you from all the inconvenience or disrespect you claimed to be the victim of.

With Maple 2015.2 : One_way.mw

(Insert content doesn't respond)

 

  1. In procedure generate_ic, p2_sol is a sequence (at least with my Maple 2015 version) of two values containing p1.
    Inset this print line to see that:
    p2_sol := solve(H_eq, p2); 
    print('p2_sol'=p2_sol);
    
  2. If p2_sol is indeed a sequence forn your Maple version, then this (simpler) command fails 

    select(x -> 0 < evalf(x), p2_sol);
    Error, invalid input: select expects 2 or more arguments, but received 1
    

    and you must write instead

    select(x -> 0 < evalf(x), [p2_sol]);  # note the square brackets
    
  3. As p2_sol contains the name p1, no testing is applicable because Maple does not know anything about p1.
    To understand that run this simplified version of generate_ic:

    test_1 := proc (q1_val, ET_val, f_val) 
      local term, H_eq, p2_sol, p2_val; 
      term := sqrt(q1_val^2+1)-1+f_val; 
      H_eq := (1/2)*p1^2+(1/2)*p2^2-f_val+(1/2)*term^2 = ET_val; 
      p2_sol := [solve(H_eq, p2)]; 
      print('p2_sol'=p2_sol);
      select(x -> 0 < evalf(x), p2_sol)
    end proc:
    
    interface(displayprecision=5):
    
    test_1(.1, ET, f)
    
             p2_sol = [2.000*10^(-8)*sqrt(-2.500*10^15*p1^2+8.745*10^13), -2.000*10^(-8)*sqrt(-2.500*10^15*p1^2+8.745*10^13)]
    
    Error, (in test_1) selecting function must return true or false
    



Last but not least: can you provide a picture of your spring pendulum (is it a simple or double one or a mixed one?)
 

The worksheet is written with Maple 2015 and the output of solve(eqn1, allsolutions); (see @dharr ) differ from what you get in newer version.
This is why I explicitely split this output in two components named ans_2015_0 and ans_2015_1 wich corresponds to @dharr's ans1 and ans2 resoectively.

The plot serves as a guidance but is not at all mandatory: what matters is what comes next.

sets_mmcdara.mw

restart
solve(sqrt(2)*sin(2*x-(1/6)*Pi) = 1)
                             5    
                             -- Pi
                             24   
solve(sqrt(2)*sin(2*x-(1/6)*Pi) = 1, allsolutions=true)
                   5       3                
                   -- Pi - - Pi _B1 + Pi _Z1
                   24      4                
about(_B1)
Originally _B1, renamed _B1~:
  is assumed to be: OrProp(0,1)

about(_Z1)
Originally _Z1, renamed _Z1~:
  is assumed to be: integer

# BTW: you missed the Pi constant in your solution

eval(sqrt(2)*sin(2*x-(1/6)*Pi), x=5/24) = 1
                    (1/2)    /  5    1   \    
                  -2      sin|- -- + - Pi| = 1
                             \  12   6   /    
eval(sqrt(2)*sin(2*x-(1/6)*Pi), x=5/24*Pi) = 1
                             1 = 1

Download Allsolutions.mw

Simply use  package Student:-Statistics  (it's a shame that package Statistics forgot ExploreRV !)
 

with( Student:-Statistics ):
X := NormalRandomVariable(mu, sigma);
ExploreRV( X );


# Or, even more simply:
Student:-Statistics:-ExploreRV()


Raw result

By the time I was writting this reply Scot Gould was submitting his one.
Nevertheless I decided not to delete mine, even if there is likely nothing new compared to Scot's.

Customize_it.mw

You can animate wrt 1 or more parameters by selecting them.

BTW: You are Salim Barzani aren't you? 

I guess there is a conflct netween background in G1 and background in animate.
Here is a Maple 2015 Workaround.mw

Feel free to adjust the plotting ranges in G1.

Here is another alternative (more funny?)

f := unapply(PDF(Normal(mu, sigma), x), x):

G3 := proc(t)
  plots:-display(
    DensityPlot(X, color = blue, thickness = 5, range = mu-4*sigma-1..t)
    , plot(f(tau), tau = mu-4*sigma .. t, thickness = 5, color = red)
    , gridlines=true
    , view=[mu-4*sigma .. t, default]
  )
end proc:

plots:-animate(G3, [t], t = mu-4*sigma .. mu+4*sigma, background="AliceBlue") 


 

restart

with(PDEtools):

with(LinearAlgebra):

with(SolveTools):

undeclare(prime)

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

(1)

PDEtools:-declare(u(x, y, t)):

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

(2)

PDEtools:-declare(f(x, y, t)):

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

(3)

pde := diff(u(x, y, t), t)-(diff(diff(u(x, y, t), `$`(x, 4))+5*u(x, y, t)*(diff(u(x, y, t), `$`(x, 2)))+(5/3)*u(x, y, t)^3+5*(diff(u(x, y, t), x, y)), x))-5*u(x, y, t)*(diff(u(x, y, t), y))+5*(int(diff(u(x, y, t), `$`(y, 2)), x))-5*(diff(u(x, y, t), x))*(int(diff(u(x, y, t), y), x)):

thetai := t*w[i]+y*p[i]+x:

eqw := w[i] = -5*p[i]^2:

Bij := proc (i, j) options operator, arrow; (-6*p[i]-6*p[j])/(p[i]-p[j])^2 end proc:

eq17 := u(x, y, t) = 6*(diff(diff(f(x, y, t), x), x))/f(x, y, t)-6*(diff(f(x, y, t), x))^2/f(x, y, t)^2:

eqf2 := f(x, y, t) = (-5*t*p[1]^2+y*p[1]+x)*(-5*t*p[2]^2+y*p[2]+x)*(-5*t*p[3]^2+y*p[3]+x)*(-5*t*p[4]^2+y*p[4]+x)-(6*(p[1]+p[2]))*(-5*t*p[3]^2+y*p[3]+x)*(-5*t*p[4]^2+y*p[4]+x)/(p[1]-p[2])^2-(6*(p[1]+p[3]))*(-5*t*p[2]^2+y*p[2]+x)*(-5*t*p[4]^2+y*p[4]+x)/(p[1]-p[3])^2-(6*(p[1]+p[4]))*(-5*t*p[2]^2+y*p[2]+x)*(-5*t*p[3]^2+y*p[3]+x)/(p[1]-p[4])^2-(6*(p[2]+p[3]))*(-5*t*p[1]^2+y*p[1]+x)*(-5*t*p[4]^2+y*p[4]+x)/(p[2]-p[3])^2-(6*(p[2]+p[4]))*(-5*t*p[1]^2+y*p[1]+x)*(-5*t*p[3]^2+y*p[3]+x)/(p[2]-p[4])^2-(6*(p[3]+p[4]))*(-5*t*p[1]^2+y*p[1]+x)*(-5*t*p[2]^2+y*p[2]+x)/(p[3]-p[4])^2+(36*(p[1]+p[2]))*(p[3]+p[4])/((p[1]-p[2])^2*(p[3]-p[4])^2)+(36*(p[1]+p[3]))*(p[2]+p[4])/((p[1]-p[3])^2*(p[2]-p[4])^2)+(36*(p[1]+p[4]))*(p[2]+p[3])/((p[1]-p[4])^2*(p[2]-p[3])^2):

eqt2 := eval(eq17, eqf2):

CodeTools:-Usage(normal(value(normal(eval(pde, [int = Int, eqt2])))));

Warning,  computation interrupted

 

eqt22_pre_evalc := eval(eval(eqt2, {p[3] = conjugate(p[1]), p[4] = conjugate(p[2])}), {p[1] = pR+I*pI, p[2] = hR+I*hI}):

indets(eqt22_pre_evalc, name)

 

{hI, hR, pI, pR, t, x, y}

(4)

# There is no reason why the indets/name of evalc(eqt22_pre_evalc) would be different
# from those of eqt22_pre_evalc.
#
# More of this using evalc will unnecessarily complicate the expression and increase the
# computation time.

# Illustration: consider the first term in the rhs of eqt22_pre_evalc:

o1 := op(1, rhs(eqt22_pre_evalc)): # feel free to display

indets(o1, name);

eo1 := evalc(o1):
indets(eo1, name);


 

{hI, hR, pI, pR, t, x, y}

 

{hI, hR, pI, pR, t, x, y}

(5)

# Even much clever:

indets(eqt2, name);

indets(eval(%, {p[3] = conjugate(p[1]), p[4] = conjugate(p[2])}), name);

indets(eval(%, {p[1] = pR+I*pI, p[2] = hR+I*hI}), name);
 

{t, x, y, p[1], p[2], p[3], p[4]}

 

{t, x, y, p[1], p[2]}

 

{hI, hR, pI, pR, t, x, y}

(6)

 


 

Download stop-working_mmcdara.mw

Point 1:
The signature of [2, 1, 4, 3] (your example p2) is +1 (even permutation) and not -1!

Point 2:
You can indeed ask Geminy for a code, but you can also ask Mapleprimers, or more simply search for parity in the help pages.
This is what an AIA (Astute IA, see @nm's reply) should answer you

restart

OddEven := proc(P::list)
  local signature:
  uses GroupTheory:
  signature := PermParity( Perm( P ) );
  `if`(signature=-1, "odd", "even")
end proc:

p1 := OddEven([2, 3, 1]);

"even"

(1)

p1 := OddEven([2, 3, 1]);

"even"

(2)

p2 := OddEven([2, 1, 4, 3]);

"even"

(3)

p3 := OddEven([1, 2, 3, 4, 5]);

"even"

(4)

p4 := OddEven([5, 4, 3, 2, 1]);

"even"

(5)

p5 := OddEven([1, 2, 2]);

Error, (in Perm:-normalform) invalid input: map expects 2 or more arguments, but received 1

 

p6 := OddEven([1, 6, 3, 4]);

Error, (in convert/disjcyc) not a permutation.

 

p7 := OddEven([2, 1, 3]);

"odd"

(6)

p8 := OddEven([3, 1, 2, 4, 5, 7, 6]);

"odd"

(7)
 

 

Download PermParity.mw

@nm: It would be interesting to see what the IA you used in your reply answers you for this parity problem: does it know about GroupTheory package?


I suggest you to read the help pages to see what the correct syntaxes are

restart

with(LinearAlgebra):

A := Matrix(2, 2, [1, 4, 5, 6])

A := Matrix(2, 2, {(1, 1) = 1, (1, 2) = 4, (2, 1) = 5, (2, 2) = 6})

(1)

Rank(A)

2

(2)

NullSpace(A)

{}

(3)

restart

with(Student:-LinearAlgebra):

A := Matrix(2, 2, [1, 4, 5, 6])

A := Matrix(2, 2, {(1, 1) = 1, (1, 2) = 4, (2, 1) = 5, (2, 2) = 6})

(4)

Rank(A)

2

(5)

NullSpace(A)

{}

(6)

restart

with(linalg):  # deprecated

A := Matrix(2, 2, [1, 4, 5, 6])

A := Matrix(2, 2, {(1, 1) = 1, (1, 2) = 4, (2, 1) = 5, (2, 2) = 6})

(7)

rank(A)

2

(8)

kernel(A)

{}

(9)

 


 

Download LA.mw

2 3 4 5 6 7 8 Last Page 4 of 65