dharr

Dr. David Harrington

8235 Reputation

22 Badges

20 years, 340 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 replies submitted by dharr

restart;

x:=(4*sigma__d^4 + 4*sigma__d^2*sigma__dc^2 + sigma__dc^4)*n^4 + (-4*sigma__d^4 - 2*sigma__d^2*sigma__dc^2)*n^3 + (sigma__d^4 - 4*sigma__d^2*sigma__dc^2 - sigma__dc^4)*n^2 + (-4*sigma__d^4 + 2*sigma__d^2*sigma__dc^2)*n + 3*sigma__d^4;

(4*sigma__d^4+4*sigma__d^2*sigma__dc^2+sigma__dc^4)*n^4+(-4*sigma__d^4-2*sigma__d^2*sigma__dc^2)*n^3+(sigma__d^4-4*sigma__d^2*sigma__dc^2-sigma__dc^4)*n^2+(-4*sigma__d^4+2*sigma__d^2*sigma__dc^2)*n+3*sigma__d^4

n = 1 is a solution, so divide it out

simplify(x);
x2:=simplify(x/(n-1));

(4*n^3*sigma__d^4+4*n^3*sigma__d^2*sigma__dc^2+n^3*sigma__dc^4+2*n^2*sigma__d^2*sigma__dc^2+n^2*sigma__dc^4+n*sigma__d^4-2*n*sigma__d^2*sigma__dc^2-3*sigma__d^4)*(n-1)

4*(sigma__d^2+(1/2)*sigma__dc^2)^2*n^3+(2*sigma__d^2*sigma__dc^2+sigma__dc^4)*n^2+(sigma__d^4-2*sigma__d^2*sigma__dc^2)*n-3*sigma__d^4

with(RootFinding:-Parametric):

cd:=CellDecomposition([x2=0,sigma__d>0,sigma__dc>0],[n]);
cp:=CellPlot(cd, 'samplepoints');

3 solutions in the pink region, one solution in the green region.

NumberOfSolutions(cd);

[[1, 3], [2, 1]]

cd[SamplePoints][1];
fsolve(eval(x2,%));

[sigma__d = 88417528224820604870217/302231454903657293676544, sigma__dc = 1]

-.9608167309, -0.8628094198e-1, .1932505965

cd[SamplePoints][2];
fsolve(eval(x2,%));

[sigma__d = 1, sigma__dc = 1]

.6437141546

The dividing line between the two regions is given implicitly by

pp:=cd[ProjectionPolynomials][2][3];
ip:=plots:-implicitplot(pp, sigma__d=0..3.5,sigma__dc=0..5,color=red):

61*sigma__d^8+66*sigma__d^6*sigma__dc^2+8*sigma__d^4*sigma__dc^4-10*sigma__d^2*sigma__dc^6-sigma__dc^8

plots:-display(ip);

 

NULL

Download quartic_equation_in_n.mw

Bilinearization is a package (like LinearAlgebra) that the author of the paper has written. So the paper will hopefully tell where to get this package from. (Unfortunately it is not in the Maple Applications Center.) It has nothing to do with the BilinearForm command.

@vv I've downgraded my answer to a comment, since you are right that my logic is flawed. Finding other than unit triangles (from a graph theory point of view) is a much more complicated problem.

@vv @Alfred_F I'll convert to an answer. Yes, the trick with the adjacency matrix only works for the unit triangles and doesn't find 3-5-7, since it is just finding walks of length 3. However, this is sufficient to find a black triangle. I agree it doesn't find red triangles. But since exchanging red and black is implicitly another solution, I think this still solves the problem given.

@Alfred_F I would implement your solution like this. (But I have misunderstood it; see comments below.) (Mapleprimes not displaying correctly right now.)
Edit: Added a variation using the Logic package.

Graph.mw

 

@MaPal93 I did work on it more, but I don't see how to make it more amenable to a matrix solution, though there are missing steps to matrix XX and then to the equations. As you say, it may not have a matrix formulation. Doesn't one of @C_R's worksheets get you to a symbolic solution? or maybe I misunderstood. 

Just to see if there are solutions that make sense (correct signs etc) it is perhaps worth giving parameters typical (random) values and then doing a numerical solution.

Bottom line: The fact that all the component equations have the same form argues for a matrix formulation, but the current formulation goes quickly to quadratic forms, which as scalars argues against a matrix formulation.

@salim-barzani Yes I looked at all that material, but in my worksheet I got a different (trivial answer), so I don't know what they are doing.

@salim-barzani I don't understand. For p := -4*t^3*x - 83*t^2*x^2 - 10*x^4 + 97*t^2 - 73*x^2 - 62*t + 5; what result would you want? The code I gave gets all 7 coefficients.

@michele To add to @Preben Alsholm's answer, you can change to 1D input for a single execution group if you don't want to change it for your whole worksheet - after the > prompt, type ctrl-m (command-m on a Mac) and then start typing.

@salim-barzani I don't know what the paper is doing

params2.mw

@MaPal93 I was trying this last night. If we let L=l.wsq, and multiply each eqi by w[i]^2 and add all equations we might get an equation containing only L, which could be solved for L. With L in hand, we can go back and find l[i] from each eqi. But I couldn't get it to work. (i) it also contains lsq.wsq. That could be just called X and then finding a relationship between L and X is still a step forward. (ii) I couldn't rearrange into a form containing only L (and X).

@Alfred_F Well, I used to derive physical models with pages and pages of handwritten equations. If I do the same steps with Maple, I can catch mistakes. (Particularly with signs, which as you have pointed out, are easy to get wrong.) Of course Maple can do many things I cannot easily do; my first published result of something more complicated than I could have done myself was a sum of an infinite series.

So for me, now I do everything with Maple - sometimes validating easy steps and sometimes looking for results that are complicated and perhaps unexpected. Ocassionally I do someting on paper still, but that usually involves some sort of diagram.

@janhardo The final solution seems to be the same as "ans" in my first worksheet for lambda=mu=1

@Alfred_F That's probably what Maple does, so doing those individual steps in Maple could be done, but I wouldn't say it is easier :-)

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