dharr

Dr. David Harrington

5535 Reputation

21 Badges

19 years, 182 days
University of Victoria
Professor or university staff
Victoria, British Columbia, Canada

Social Networks and Content at Maplesoft.com

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

MaplePrimes Activity


These are replies submitted by dharr

@dharr For solution 1 you can find real solutions as follows (but real and positive is harder). 

restart

EqN in startup code.

Since most lambda__1  and lambda++2 work, you can look at the solution as a quadratic in lambda_3

sol1 := [[((2*`&lambda;__1`+1)*`&lambda;__2`+`&lambda;__1`)*`&lambda;__3`^2+((2*`&lambda;__1`+1)*`&lambda;__2`^2+(2*`&lambda;__1`^2-6*`&lambda;__1`+2)*`&lambda;__2`+`&lambda;__1`^2+2*`&lambda;__1`)*`&lambda;__3`+4*`&lambda;__2`^2*`&lambda;__1`+(4*`&lambda;__1`^2+8*`&lambda;__1`)*`&lambda;__2`], {(2*`&lambda;__1`+1)*`&lambda;__2`+`&lambda;__1` <> 0}]

[[((2*lambda__1+1)*lambda__2+lambda__1)*lambda__3^2+((2*lambda__1+1)*lambda__2^2+(2*lambda__1^2-6*lambda__1+2)*lambda__2+lambda__1^2+2*lambda__1)*lambda__3+4*lambda__1*lambda__2^2+(4*lambda__1^2+8*lambda__1)*lambda__2], {(2*lambda__1+1)*lambda__2+lambda__1 <> 0}]

p := collect(sol1[1][], `&lambda;__3`)

((2*lambda__1+1)*lambda__2+lambda__1)*lambda__3^2+((2*lambda__1+1)*lambda__2^2+(2*lambda__1^2-6*lambda__1+2)*lambda__2+lambda__1^2+2*lambda__1)*lambda__3+4*lambda__1*lambda__2^2+(4*lambda__1^2+8*lambda__1)*lambda__2

d := discrim(p, `&lambda;__3`)

4*lambda__1^4*lambda__2^2+8*lambda__1^3*lambda__2^3+4*lambda__1^2*lambda__2^4+4*lambda__1^4*lambda__2-52*lambda__1^3*lambda__2^2-52*lambda__1^2*lambda__2^3+4*lambda__1*lambda__2^4+lambda__1^4-20*lambda__1^3*lambda__2-42*lambda__1^2*lambda__2^2-20*lambda__1*lambda__2^3+lambda__2^4+4*lambda__1^3-52*lambda__1^2*lambda__2-52*lambda__1*lambda__2^2+4*lambda__2^3+4*lambda__1^2+8*lambda__1*lambda__2+4*lambda__2^2

Real solutions when discriminant is zero

ans := solve(d, `&lambda;__2`)

-(lambda__1+2)/(2*lambda__1+1), -lambda__1, (-lambda__1^2+(lambda__1^4-32*lambda__1^3+222*lambda__1^2-32*lambda__1+1)^(1/2)+15*lambda__1-1)/(2*lambda__1+1), -(lambda__1^2+(lambda__1^4-32*lambda__1^3+222*lambda__1^2-32*lambda__1+1)^(1/2)-15*lambda__1+1)/(2*lambda__1+1)

example

sol := {`&lambda;__1` = 1}; sol := `union`(sol, {`&lambda;__2` = (eval(ans, sol))[3]}); sol := `union`(sol, {`&lambda;__3` = solve(eval(p, sol), `&lambda;__3`)[2]}); simplify(eval(EqN, sol))

{lambda__1 = 1}

{lambda__1 = 1, lambda__2 = 13/3+(1/3)*160^(1/2)}

{lambda__1 = 1, lambda__2 = 13/3+(1/3)*160^(1/2), lambda__3 = -2*(13+4*10^(1/2))/(2*10^(1/2)+7)}

{0}

 

Download EqNsol.mw

@MaPal93 Some answers:

1) what is exactly Eqn? could you load my solution instead of hard coding expressions?


I definitely did not reenter this by hand! This was extracted from your worksheet by opening a new worksheet with the same Maple engine - try EqN; in your own worksheet to check.

2) is this system indeterminate (infinitely many solutions)?

Yes.

3) would it be preferred if I chose backsubstitute = true?

Probably the answer is too complicated to analyse, and maybe too slow to achieve - but you could try.

4) what happened to my parameters P := indets(MyEqs, name) minus MyVars ? I was hoping to obtain solutions as functions of those.

I just looked at what you were passing to the solver, i.e., EqN. Looks like in the line EqN := ((`~`[((numer@evala)@(:-Norm))@numer])@eval)(MyEqs, `=`~(P, 1)) you set all the parameters to 1. 

5) is this solving approach (a) reliable and (b) preferable to engine=groebner or standard solve()?

I don't see why the answer wouldn't be reliable. It worked for the case I tried at random. I don't know much about different engines; solve probably passes to one or other of these.

6) how to enforce RealDomain?

If you want only real solutions, try RealTriangularize in the RegularChains package, which was a recent suggestion somewhere here on Mapleprimes. But I really don't know much about solving polynomial equations beyond the bivariate case.

@MaPal93 Here's my understanding. You chose backsubstitute=false, so you can carry out the backsubstitution yourself, e.g.

restart

EqN := {-(2*`&lambda;__1`^2*`&lambda;__2`*`&lambda;__3`+2*`&lambda;__1`*`&lambda;__2`^2*`&lambda;__3`+2*`&lambda;__1`*`&lambda;__2`*`&lambda;__3`^2+4*`&lambda;__1`^2*`&lambda;__2`+`&lambda;__1`^2*`&lambda;__3`+4*`&lambda;__1`*`&lambda;__2`^2-6*`&lambda;__1`*`&lambda;__2`*`&lambda;__3`+`&lambda;__1`*`&lambda;__3`^2+`&lambda;__2`^2*`&lambda;__3`+`&lambda;__2`*`&lambda;__3`^2+8*`&lambda;__1`*`&lambda;__2`+2*`&lambda;__1`*`&lambda;__3`+2*`&lambda;__2`*`&lambda;__3`)*(4*`&lambda;__1`^4*`&lambda;__2`^3*`&lambda;__3`^2+8*`&lambda;__1`^3*`&lambda;__2`^4*`&lambda;__3`^2+8*`&lambda;__1`^3*`&lambda;__2`^3*`&lambda;__3`^3+4*`&lambda;__1`^2*`&lambda;__2`^5*`&lambda;__3`^2+8*`&lambda;__1`^2*`&lambda;__2`^4*`&lambda;__3`^3+4*`&lambda;__1`^2*`&lambda;__2`^3*`&lambda;__3`^4+16*`&lambda;__1`^4*`&lambda;__2`^3*`&lambda;__3`+4*`&lambda;__1`^4*`&lambda;__2`^2*`&lambda;__3`^2+32*`&lambda;__1`^3*`&lambda;__2`^4*`&lambda;__3`-4*`&lambda;__1`^3*`&lambda;__2`^3*`&lambda;__3`^2+8*`&lambda;__1`^3*`&lambda;__2`^2*`&lambda;__3`^3+16*`&lambda;__1`^2*`&lambda;__2`^5*`&lambda;__3`-4*`&lambda;__1`^2*`&lambda;__2`^4*`&lambda;__3`^2-16*`&lambda;__1`^2*`&lambda;__2`^3*`&lambda;__3`^3+4*`&lambda;__1`^2*`&lambda;__2`^2*`&lambda;__3`^4+4*`&lambda;__1`*`&lambda;__2`^5*`&lambda;__3`^2+8*`&lambda;__1`*`&lambda;__2`^4*`&lambda;__3`^3+4*`&lambda;__1`*`&lambda;__2`^3*`&lambda;__3`^4+16*`&lambda;__1`^4*`&lambda;__2`^3+8*`&lambda;__1`^4*`&lambda;__2`^2*`&lambda;__3`+9*`&lambda;__1`^4*`&lambda;__2`*`&lambda;__3`^2+32*`&lambda;__1`^3*`&lambda;__2`^4-8*`&lambda;__1`^3*`&lambda;__2`^3*`&lambda;__3`-28*`&lambda;__1`^3*`&lambda;__2`^2*`&lambda;__3`^2+18*`&lambda;__1`^3*`&lambda;__2`*`&lambda;__3`^3+16*`&lambda;__1`^2*`&lambda;__2`^5-8*`&lambda;__1`^2*`&lambda;__2`^4*`&lambda;__3`+126*`&lambda;__1`^2*`&lambda;__2`^3*`&lambda;__3`^2-34*`&lambda;__1`^2*`&lambda;__2`^2*`&lambda;__3`^3+9*`&lambda;__1`^2*`&lambda;__2`*`&lambda;__3`^4+8*`&lambda;__1`*`&lambda;__2`^5*`&lambda;__3`+4*`&lambda;__1`*`&lambda;__2`^4*`&lambda;__3`^2-2*`&lambda;__1`*`&lambda;__2`^3*`&lambda;__3`^3+2*`&lambda;__1`*`&lambda;__2`^2*`&lambda;__3`^4+`&lambda;__2`^5*`&lambda;__3`^2+2*`&lambda;__2`^4*`&lambda;__3`^3+`&lambda;__2`^3*`&lambda;__3`^4+8*`&lambda;__1`^4*`&lambda;__2`*`&lambda;__3`+2*`&lambda;__1`^4*`&lambda;__3`^2+64*`&lambda;__1`^3*`&lambda;__2`^3+16*`&lambda;__1`^3*`&lambda;__2`^2*`&lambda;__3`+18*`&lambda;__1`^3*`&lambda;__2`*`&lambda;__3`^2+4*`&lambda;__1`^3*`&lambda;__3`^3+64*`&lambda;__1`^2*`&lambda;__2`^4-88*`&lambda;__1`^2*`&lambda;__2`^3*`&lambda;__3`+2*`&lambda;__1`^2*`&lambda;__2`^2*`&lambda;__3`^2+12*`&lambda;__1`^2*`&lambda;__2`*`&lambda;__3`^3+2*`&lambda;__1`^2*`&lambda;__3`^4+32*`&lambda;__1`*`&lambda;__2`^4*`&lambda;__3`-10*`&lambda;__1`*`&lambda;__2`^3*`&lambda;__3`^2+4*`&lambda;__1`*`&lambda;__2`^2*`&lambda;__3`^3+2*`&lambda;__1`*`&lambda;__2`*`&lambda;__3`^4+4*`&lambda;__2`^4*`&lambda;__3`^2+4*`&lambda;__2`^3*`&lambda;__3`^3+32*`&lambda;__1`^3*`&lambda;__2`*`&lambda;__3`+8*`&lambda;__1`^3*`&lambda;__3`^2+64*`&lambda;__1`^2*`&lambda;__2`^3+4*`&lambda;__1`^2*`&lambda;__2`*`&lambda;__3`^2+8*`&lambda;__1`^2*`&lambda;__3`^3+32*`&lambda;__1`*`&lambda;__2`^3*`&lambda;__3`+8*`&lambda;__1`*`&lambda;__2`*`&lambda;__3`^3+4*`&lambda;__2`^3*`&lambda;__3`^2+32*`&lambda;__1`^2*`&lambda;__2`*`&lambda;__3`+8*`&lambda;__1`^2*`&lambda;__3`^2+8*`&lambda;__1`*`&lambda;__2`*`&lambda;__3`^2), -(2*`&lambda;__1`^2*`&lambda;__2`*`&lambda;__3`+2*`&lambda;__1`*`&lambda;__2`^2*`&lambda;__3`+2*`&lambda;__1`*`&lambda;__2`*`&lambda;__3`^2+4*`&lambda;__1`^2*`&lambda;__2`+`&lambda;__1`^2*`&lambda;__3`+4*`&lambda;__1`*`&lambda;__2`^2-6*`&lambda;__1`*`&lambda;__2`*`&lambda;__3`+`&lambda;__1`*`&lambda;__3`^2+`&lambda;__2`^2*`&lambda;__3`+`&lambda;__2`*`&lambda;__3`^2+8*`&lambda;__1`*`&lambda;__2`+2*`&lambda;__1`*`&lambda;__3`+2*`&lambda;__2`*`&lambda;__3`)*(4*`&lambda;__1`^5*`&lambda;__2`^2*`&lambda;__3`^2+8*`&lambda;__1`^4*`&lambda;__2`^3*`&lambda;__3`^2+8*`&lambda;__1`^4*`&lambda;__2`^2*`&lambda;__3`^3+4*`&lambda;__1`^3*`&lambda;__2`^4*`&lambda;__3`^2+8*`&lambda;__1`^3*`&lambda;__2`^3*`&lambda;__3`^3+4*`&lambda;__1`^3*`&lambda;__2`^2*`&lambda;__3`^4+16*`&lambda;__1`^5*`&lambda;__2`^2*`&lambda;__3`+4*`&lambda;__1`^5*`&lambda;__2`*`&lambda;__3`^2+32*`&lambda;__1`^4*`&lambda;__2`^3*`&lambda;__3`-4*`&lambda;__1`^4*`&lambda;__2`^2*`&lambda;__3`^2+8*`&lambda;__1`^4*`&lambda;__2`*`&lambda;__3`^3+16*`&lambda;__1`^3*`&lambda;__2`^4*`&lambda;__3`-4*`&lambda;__1`^3*`&lambda;__2`^3*`&lambda;__3`^2-16*`&lambda;__1`^3*`&lambda;__2`^2*`&lambda;__3`^3+4*`&lambda;__1`^3*`&lambda;__2`*`&lambda;__3`^4+4*`&lambda;__1`^2*`&lambda;__2`^4*`&lambda;__3`^2+8*`&lambda;__1`^2*`&lambda;__2`^3*`&lambda;__3`^3+4*`&lambda;__1`^2*`&lambda;__2`^2*`&lambda;__3`^4+16*`&lambda;__1`^5*`&lambda;__2`^2+8*`&lambda;__1`^5*`&lambda;__2`*`&lambda;__3`+`&lambda;__1`^5*`&lambda;__3`^2+32*`&lambda;__1`^4*`&lambda;__2`^3-8*`&lambda;__1`^4*`&lambda;__2`^2*`&lambda;__3`+4*`&lambda;__1`^4*`&lambda;__2`*`&lambda;__3`^2+2*`&lambda;__1`^4*`&lambda;__3`^3+16*`&lambda;__1`^3*`&lambda;__2`^4-8*`&lambda;__1`^3*`&lambda;__2`^3*`&lambda;__3`+126*`&lambda;__1`^3*`&lambda;__2`^2*`&lambda;__3`^2-2*`&lambda;__1`^3*`&lambda;__2`*`&lambda;__3`^3+`&lambda;__1`^3*`&lambda;__3`^4+8*`&lambda;__1`^2*`&lambda;__2`^4*`&lambda;__3`-28*`&lambda;__1`^2*`&lambda;__2`^3*`&lambda;__3`^2-34*`&lambda;__1`^2*`&lambda;__2`^2*`&lambda;__3`^3+2*`&lambda;__1`^2*`&lambda;__2`*`&lambda;__3`^4+9*`&lambda;__1`*`&lambda;__2`^4*`&lambda;__3`^2+18*`&lambda;__1`*`&lambda;__2`^3*`&lambda;__3`^3+9*`&lambda;__1`*`&lambda;__2`^2*`&lambda;__3`^4+64*`&lambda;__1`^4*`&lambda;__2`^2+32*`&lambda;__1`^4*`&lambda;__2`*`&lambda;__3`+4*`&lambda;__1`^4*`&lambda;__3`^2+64*`&lambda;__1`^3*`&lambda;__2`^3-88*`&lambda;__1`^3*`&lambda;__2`^2*`&lambda;__3`-10*`&lambda;__1`^3*`&lambda;__2`*`&lambda;__3`^2+4*`&lambda;__1`^3*`&lambda;__3`^3+16*`&lambda;__1`^2*`&lambda;__2`^3*`&lambda;__3`+2*`&lambda;__1`^2*`&lambda;__2`^2*`&lambda;__3`^2+4*`&lambda;__1`^2*`&lambda;__2`*`&lambda;__3`^3+8*`&lambda;__1`*`&lambda;__2`^4*`&lambda;__3`+18*`&lambda;__1`*`&lambda;__2`^3*`&lambda;__3`^2+12*`&lambda;__1`*`&lambda;__2`^2*`&lambda;__3`^3+2*`&lambda;__1`*`&lambda;__2`*`&lambda;__3`^4+2*`&lambda;__2`^4*`&lambda;__3`^2+4*`&lambda;__2`^3*`&lambda;__3`^3+2*`&lambda;__2`^2*`&lambda;__3`^4+64*`&lambda;__1`^3*`&lambda;__2`^2+32*`&lambda;__1`^3*`&lambda;__2`*`&lambda;__3`+4*`&lambda;__1`^3*`&lambda;__3`^2+32*`&lambda;__1`*`&lambda;__2`^3*`&lambda;__3`+4*`&lambda;__1`*`&lambda;__2`^2*`&lambda;__3`^2+8*`&lambda;__1`*`&lambda;__2`*`&lambda;__3`^3+8*`&lambda;__2`^3*`&lambda;__3`^2+8*`&lambda;__2`^2*`&lambda;__3`^3+32*`&lambda;__1`*`&lambda;__2`^2*`&lambda;__3`+8*`&lambda;__1`*`&lambda;__2`*`&lambda;__3`^2+8*`&lambda;__2`^2*`&lambda;__3`^2), -(2*`&lambda;__1`^2*`&lambda;__2`*`&lambda;__3`+2*`&lambda;__1`*`&lambda;__2`^2*`&lambda;__3`+2*`&lambda;__1`*`&lambda;__2`*`&lambda;__3`^2+4*`&lambda;__1`^2*`&lambda;__2`+`&lambda;__1`^2*`&lambda;__3`+4*`&lambda;__1`*`&lambda;__2`^2-6*`&lambda;__1`*`&lambda;__2`*`&lambda;__3`+`&lambda;__1`*`&lambda;__3`^2+`&lambda;__2`^2*`&lambda;__3`+`&lambda;__2`*`&lambda;__3`^2+8*`&lambda;__1`*`&lambda;__2`+2*`&lambda;__1`*`&lambda;__3`+2*`&lambda;__2`*`&lambda;__3`)*(4*`&lambda;__1`^4*`&lambda;__2`^2*`&lambda;__3`^3+8*`&lambda;__1`^3*`&lambda;__2`^3*`&lambda;__3`^3+8*`&lambda;__1`^3*`&lambda;__2`^2*`&lambda;__3`^4+4*`&lambda;__1`^2*`&lambda;__2`^4*`&lambda;__3`^3+8*`&lambda;__1`^2*`&lambda;__2`^3*`&lambda;__3`^4+4*`&lambda;__1`^2*`&lambda;__2`^2*`&lambda;__3`^5+16*`&lambda;__1`^4*`&lambda;__2`^2*`&lambda;__3`^2+4*`&lambda;__1`^4*`&lambda;__2`*`&lambda;__3`^3+32*`&lambda;__1`^3*`&lambda;__2`^3*`&lambda;__3`^2-4*`&lambda;__1`^3*`&lambda;__2`^2*`&lambda;__3`^3+8*`&lambda;__1`^3*`&lambda;__2`*`&lambda;__3`^4+16*`&lambda;__1`^2*`&lambda;__2`^4*`&lambda;__3`^2-4*`&lambda;__1`^2*`&lambda;__2`^3*`&lambda;__3`^3-16*`&lambda;__1`^2*`&lambda;__2`^2*`&lambda;__3`^4+4*`&lambda;__1`^2*`&lambda;__2`*`&lambda;__3`^5+4*`&lambda;__1`*`&lambda;__2`^4*`&lambda;__3`^3+8*`&lambda;__1`*`&lambda;__2`^3*`&lambda;__3`^4+4*`&lambda;__1`*`&lambda;__2`^2*`&lambda;__3`^5+48*`&lambda;__1`^4*`&lambda;__2`^2*`&lambda;__3`+8*`&lambda;__1`^4*`&lambda;__2`*`&lambda;__3`^2+`&lambda;__1`^4*`&lambda;__3`^3+96*`&lambda;__1`^3*`&lambda;__2`^3*`&lambda;__3`-40*`&lambda;__1`^3*`&lambda;__2`^2*`&lambda;__3`^2+4*`&lambda;__1`^3*`&lambda;__2`*`&lambda;__3`^3+2*`&lambda;__1`^3*`&lambda;__3`^4+48*`&lambda;__1`^2*`&lambda;__2`^4*`&lambda;__3`-40*`&lambda;__1`^2*`&lambda;__2`^3*`&lambda;__3`^2+102*`&lambda;__1`^2*`&lambda;__2`^2*`&lambda;__3`^3-2*`&lambda;__1`^2*`&lambda;__2`*`&lambda;__3`^4+`&lambda;__1`^2*`&lambda;__3`^5+8*`&lambda;__1`*`&lambda;__2`^4*`&lambda;__3`^2+4*`&lambda;__1`*`&lambda;__2`^3*`&lambda;__3`^3-2*`&lambda;__1`*`&lambda;__2`^2*`&lambda;__3`^4+2*`&lambda;__1`*`&lambda;__2`*`&lambda;__3`^5+`&lambda;__2`^4*`&lambda;__3`^3+2*`&lambda;__2`^3*`&lambda;__3`^4+`&lambda;__2`^2*`&lambda;__3`^5+32*`&lambda;__1`^4*`&lambda;__2`^2+8*`&lambda;__1`^4*`&lambda;__2`*`&lambda;__3`+64*`&lambda;__1`^3*`&lambda;__2`^3+88*`&lambda;__1`^3*`&lambda;__2`^2*`&lambda;__3`+32*`&lambda;__1`^3*`&lambda;__2`*`&lambda;__3`^2+4*`&lambda;__1`^3*`&lambda;__3`^3+32*`&lambda;__1`^2*`&lambda;__2`^4+88*`&lambda;__1`^2*`&lambda;__2`^3*`&lambda;__3`-32*`&lambda;__1`^2*`&lambda;__2`^2*`&lambda;__3`^2-12*`&lambda;__1`^2*`&lambda;__2`*`&lambda;__3`^3+4*`&lambda;__1`^2*`&lambda;__3`^4+8*`&lambda;__1`*`&lambda;__2`^4*`&lambda;__3`+32*`&lambda;__1`*`&lambda;__2`^3*`&lambda;__3`^2-12*`&lambda;__1`*`&lambda;__2`^2*`&lambda;__3`^3+8*`&lambda;__1`*`&lambda;__2`*`&lambda;__3`^4+4*`&lambda;__2`^3*`&lambda;__3`^3+4*`&lambda;__2`^2*`&lambda;__3`^4+128*`&lambda;__1`^3*`&lambda;__2`^2+32*`&lambda;__1`^3*`&lambda;__2`*`&lambda;__3`+128*`&lambda;__1`^2*`&lambda;__2`^3+32*`&lambda;__1`^2*`&lambda;__2`*`&lambda;__3`^2+4*`&lambda;__1`^2*`&lambda;__3`^3+32*`&lambda;__1`*`&lambda;__2`^3*`&lambda;__3`+32*`&lambda;__1`*`&lambda;__2`^2*`&lambda;__3`^2+8*`&lambda;__1`*`&lambda;__2`*`&lambda;__3`^3+4*`&lambda;__2`^2*`&lambda;__3`^3+128*`&lambda;__1`^2*`&lambda;__2`^2+32*`&lambda;__1`^2*`&lambda;__2`*`&lambda;__3`+32*`&lambda;__1`*`&lambda;__2`^2*`&lambda;__3`)}

Check out first solution, solve order lambda__3 > lambda__2 > lambda__1

sol1 := [[((2*`&lambda;__1`+1)*`&lambda;__2`+`&lambda;__1`)*`&lambda;__3`^2+((2*`&lambda;__1`+1)*`&lambda;__2`^2+(2*`&lambda;__1`^2-6*`&lambda;__1`+2)*`&lambda;__2`+`&lambda;__1`^2+2*`&lambda;__1`)*`&lambda;__3`+4*`&lambda;__2`^2*`&lambda;__1`+(4*`&lambda;__1`^2+8*`&lambda;__1`)*`&lambda;__2`], {(2*`&lambda;__1`+1)*`&lambda;__2`+`&lambda;__1` <> 0}]

[[((2*lambda__1+1)*lambda__2+lambda__1)*lambda__3^2+((2*lambda__1+1)*lambda__2^2+(2*lambda__1^2-6*lambda__1+2)*lambda__2+lambda__1^2+2*lambda__1)*lambda__3+4*lambda__1*lambda__2^2+(4*lambda__1^2+8*lambda__1)*lambda__2], {(2*lambda__1+1)*lambda__2+lambda__1 <> 0}]

Choose any lambda__1

sol := {`&lambda;__1` = 4}

{lambda__1 = 4}

Lambda_2 is now found from {(2*`&lambda;__1`+1)*`&lambda;__2`+`&lambda;__1` <> 0}

{(2*lambda__1+1)*lambda__2+lambda__1 <> 0}

solve(eval({(2*`&lambda;__1`+1)*`&lambda;__2`+`&lambda;__1` = 0}, sol), `&lambda;__2`)

{lambda__2 = -4/9}

So any value except the above, e.g.,

sol := `union`(sol, {`&lambda;__2` = 2})

{lambda__1 = 4, lambda__2 = 2}

So lambda__3 now found from

sol1[1][]; eval(%, sol); solve(%, `&lambda;__3`); sol := `union`(sol, {`&lambda;__3` = %[1]})

((2*lambda__1+1)*lambda__2+lambda__1)*lambda__3^2+((2*lambda__1+1)*lambda__2^2+(2*lambda__1^2-6*lambda__1+2)*lambda__2+lambda__1^2+2*lambda__1)*lambda__3+4*lambda__1*lambda__2^2+(4*lambda__1^2+8*lambda__1)*lambda__2

22*lambda__3^2+80*lambda__3+256

-20/11+((12/11)*I)*7^(1/2), -20/11-((12/11)*I)*7^(1/2)

{lambda__1 = 4, lambda__2 = 2, lambda__3 = -20/11+((12/11)*I)*7^(1/2)}

Check

simplify(eval(EqN, sol))

{0}

NULL

Download EqNsol.mw

@occipitalbaker Thanks.

I did something similar before here but for the case where the walk had to start and end at a particular vertex. (Perhaps that is the same problem?) There is a significant difference between just finding the length and finding the walk itself. Are you OK with just the length?

@Axel Vogt Vote up. The second one can be done without a change of variable.

restart;

i1:=(sin(x + sqrt(x)))/(1 + x);
i2:=(x*BesselJ(0, x^2))/(1 + x);

sin(x+x^(1/2))/(1+x)

x*BesselJ(0, x^2)/(1+x)

int(i2, x = 0 .. infinity);
int2:=evalf(%);

(1/4)*MeijerG([[1/4, 3/4, 1], []], [[1, 3/4, 1/2, 1/2, 1/4], []], 1/4)/Pi^3

.3233985132

 

Download int.mw

@rockyicer You're welcome. If you want to convert the .lib file to .mla, you can use the LibraryTools:-ConvertVersion command.

Yes, development is always going on - new integration methods were added in the latest (2023) version, see

https://www.maplesoft.com/support/help/Maple/view.aspx?path=updates%2fMaple2023%2fAdvancedMath

@mmcdara If you try Eigenvalues(SQRT),Eigenvalues(Q_L); you will see that two of the eigenvalues are negative of what they should be, i.e., the method has effectively chosen the wrong sqrt. I'm guessing that can be solved by a different starting guess, but not sure how exactly that could be done. Note that for the Eigenvalue method, you can work completely in reals (and more efficiently) by telling it C is symmetric:
 

LEC := proc(C)
  local L, E;
  L, E := LinearAlgebra:-Eigenvectors(Matrix(evalf(C),shape=symmetric)):
  E . DiagonalMatrix(sqrt~(L)) . E^(-1)
end proc:

But if you use a numerical version of my routine above (with shape = symmetric) then you can avoid the numerical inverse (just a transpose now) and it might be more efficient (but the normalization will slow it down)

Msqrtf:=proc(A::Matrix(square,datatype=float))
  local evs,evals,evecs,U,i,j,k,g,Lambda;
  uses LinearAlgebra;
  evs:=Eigenvectors(Matrix(A,shape=symmetric),output='list');
  evals:=table();evecs:=table();
  j:=0;
  for i in evs do
    if i[2] = 1 then
      j:=j+1;
      evals[j]:=i[1];
      evecs[j]:=Normalize(i[3][],'Euclidean');
    else
      g:=GramSchmidt(i[3],conjugate=false,normalized=true);
      for k to i[2] do
        j:=j+1;
        evals[j]:=i[1];
        evecs[j]:=g[k];
      end do;
    end if;
  end do;
  Lambda:=DiagonalMatrix(map(sqrt,convert(evals,list)));
  U:=convert(convert(evecs,list),Matrix);
  U.Lambda.U^%T;
end proc:

 

@sand15 Thanks - I remembered that and had a quick look for it but didn't find it. The emphasis there was on the numerical case, but here on symbolic. For symbolic use, the method here requires that the exact eigenvalues can be found. Here even though the matrices are large, the eigenvalues and eigenvectors are easily found (for M1..M3, the eigenvalues are actually integers). The method here avoids finding a matrix inverse, or more accurately the inverse is just the hermitian transpose so is easy to compute.

My recollection is that Maple's method can suceed in more cases, at the expense of being slow. The solution is presumably for MatrixPower and/or MatrixFunction to do more preselection of different algorithms depending on the matrix type.

convert(expr,elementary) is intended to convert hypergeoms etc to elementary functions, but doesn't seem to work on these cases. 

@lcz Isomorphic triangulations don't necessarily correspond to isomorphic binary trees, so I think a different approach is needed.

@OtherAlloyMonkey I left all the equations in terms of beta, and made all the constants exact. Then it is easy to see that the 5th and 6th rows of the matrix are identical, and therefore the determinant must be zero.

Model_Derivation_3.mw

@MaPal93 b2 appears in the assignment to Var_Omega_S. I see many places your subscripts or superscripts or Greek letters are parts of atomic variables, which I suppose is OK, but not the b2. This is a very strange way to use Maple. For example the line

looks like 1-D math but has Omega in. When converted from the right-click menu 2-D math-convert to 1-D math then we get the real 1-D math Omega := subs(repl, `&Omega;inst`); If I convert that to 2-Math input I get 

So you are using 2-D math and formatting it as 1-D math? I guess in that context the b2 is OK, but not sure why you would do this.

I only answered the title part of your question, and do not understand what you are trying to do, which is why I replied to rather than answered your question. Hope someone else can help you with that.

Your Var_Omega_S has a (scalar) expression added to a Matrix, which doesn't make sense. This is manipulated and eventually passed to solve, which probably generates the error messages. (Also your 1-D math inputs have superscripts and subscripts, which seem strange - for example b2 instead of b^2.)

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