dharr

Dr. David Harrington

8440 Reputation

22 Badges

21 years, 28 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

I would have said that s is already in factored form. Simplify is the correct way here, I think, though the answer appears to be 2^m not 2^(m+1). Maple's commands for working with polynomials and rational functions such as factor don't work for generic/unspecified exponents/degrees. Even if given a specific m, the default field for the coefficients is the rationals, so you will have to work more specifically on them to determine their factors, as I did here.

restart

Factored form

s := (1+sqrt(3))^(2*m+1)

(1+3^(1/2))^(2*m+1)

Example for m=6

s6 := eval(s, m = 6)

(1+3^(1/2))^13

Expanded form

e6 := expand(s6)

236224+136384*3^(1/2)

Extracting parts is ugly; then find gcd

op(1, e6), op([2, 1], e6); igcd(%); 2^6

236224, 136384

64

64

simplify(s/2^m)

(1+3^(1/2))*(2+3^(1/2))^m

NULL

Download test2.mw

 

Click on the green up-arrow in the Mapleprimes editor, click on choose file and browse to the file on your computer you want to upload and select it. Then click upload, and then click one of "insert link" or "insert contents" buttons. This definitely works for worksheet (*.mw) files. It doesn't work directly for *.mpl files, but if it contains only text then just rename it to *.txt and upload that. It works for some other types of files, but if it doesn't work then you can convert it to a .zip file and upload that.

Inserting contents of a worksheet sometimes fails to display the contents, but gives a link that works anyway.

Full evaluation is occuring in the first case, but not the second. If you change the second to eval(cat(x_,i-1));  it becomes the same as the first.

So in the first case, for i = 2, x_2 := x_1, but x_1 is already x_0, so you get x_2 := x_0.

I don't have Maple 2023, but for 2025 you need assumptions to get a result. I assumed everything positive, but you may have more specific requirements. For future reference. please upload a worksheet so we don't have to type in from the image.

Download Fourier.mw

plots:-complexplot([allvalues(RootOf(x^6 - 1))], style = point,
     symbol = solidcircle, color = red, symbolsize = 15, scaling = constrained);

The same result can be obtained with fsolve

plots:-complexplot([fsolve(x^6 - 1, complex)], style = point,
     symbol = solidcircle, color = red, symbolsize = 15, scaling = constrained);

allvalues(RootOf(x^6 - 1)) gives the symbolic solutions and  fsolve(x^6 - 1, complex) gives the numeric solutions.

Here's an example.

restart

with(plots); with(plottools)

display(polygon([[0, 0], [3, 4], [3, 1]], color = "Plasma 212"), polygon([[-1, 1], [-2, 4], [-5, 1]], color = red))

NULL

Download polygons.mw

In general wuth solve, specify the variables you want to solve for, and then these will be given in terms of the others. The set of variables you were solving for included alpha[9,1,1] and alpha[9,1,2], which won't give a solution with alpha[9,1,1] or alpha[9,1,2] on the right-hand side, which was the case for the solution you wanted.

(I'm assuming you are OK with using the left-hand side variables of the known solution, rather that needing to find all solutions without any prior knowledge of those solutions.)
p.s. the new Maple 2025 ExpressionTools:-Compare doesn't display correctly here on Mapleprimes.

restart;

Equations

eqjerkAB:=[-alpha[9, 1, 1] - alpha[9, 2, 2] - alpha[9, 3, 3] = -alpha[14, 1, 1] - alpha[14, 2, 2] - alpha[14, 3, 3], alpha[9, 1, 1] + alpha[9, 2, 2] = alpha[14, 1, 1] + alpha[14, 2, 2], -alpha[9, 2, 6]*alpha[9, 3, 5] = -alpha[14, 2, 6]*alpha[14, 3, 5], alpha[9, 1, 1]*alpha[9, 3, 3] + alpha[9, 2, 2]*alpha[9, 3, 3] = alpha[14, 1, 1]*alpha[14, 3, 3] + alpha[14, 2, 2]*alpha[14, 3, 3], alpha[9, 1, 1]*alpha[9, 2, 6]*alpha[9, 3, 5] - alpha[9, 1, 2]*alpha[9, 2, 6]*alpha[9, 3, 4] = alpha[14, 1, 1]*alpha[14, 2, 6]*alpha[14, 3, 5], -alpha[9, 1, 1]*alpha[9, 2, 2]*alpha[9, 3, 3] - alpha[9, 1, 2]*alpha[9, 2, 6]*alpha[9, 3, 0] = -alpha[14, 1, 1]*alpha[14, 2, 2]*alpha[14, 3, 3] + alpha[14, 1, 2]*alpha[14, 2, 1]*alpha[14, 3, 3]]:
nops(%);

6

We want to find this solution

solother:={alpha[9,2,2]=-alpha[9,1,1] + alpha[14,1,1] + alpha[14,2,2],
alpha[9,3,0] = (((alpha[9,1,1] - alpha[14,1,1])*(alpha[9,1,1] - alpha[14,2,2]) - alpha[14,1,2]*alpha[14,2,1])*alpha[14,3,3])/(alpha[9,1,2]*alpha[9,2,6]),
alpha[9,3,3] = alpha[14,3,3],
alpha[9,3,4] = (alpha[9,1,1] - alpha[14,1,1])*alpha[14,2,6]*alpha[14,3,5]/(alpha[9,1,2]*alpha[9,2,6]),
alpha[9,3,5] = alpha[14,2,6]*alpha[14,3,5]/alpha[9,2,6]};

{alpha[9, 2, 2] = -alpha[9, 1, 1]+alpha[14, 1, 1]+alpha[14, 2, 2], alpha[9, 3, 0] = ((alpha[9, 1, 1]-alpha[14, 1, 1])*(alpha[9, 1, 1]-alpha[14, 2, 2])-alpha[14, 1, 2]*alpha[14, 2, 1])*alpha[14, 3, 3]/(alpha[9, 1, 2]*alpha[9, 2, 6]), alpha[9, 3, 3] = alpha[14, 3, 3], alpha[9, 3, 4] = (alpha[9, 1, 1]-alpha[14, 1, 1])*alpha[14, 2, 6]*alpha[14, 3, 5]/(alpha[9, 1, 2]*alpha[9, 2, 6]), alpha[9, 3, 5] = alpha[14, 2, 6]*alpha[14, 3, 5]/alpha[9, 2, 6]}

simplify(eval((rhs-lhs)~(eqjerkAB),solother));

[0, 0, 0, 0, 0, 0]

lhsvars:=indets(lhs~(solother));

{alpha[9, 2, 2], alpha[9, 3, 0], alpha[9, 3, 3], alpha[9, 3, 4], alpha[9, 3, 5]}

sol2:=simplify(solve(eqjerkAB,lhsvars));

{alpha[9, 2, 2] = -alpha[9, 1, 1]+alpha[14, 1, 1]+alpha[14, 2, 2], alpha[9, 3, 0] = alpha[14, 3, 3]*(alpha[9, 1, 1]^2+(-alpha[14, 1, 1]-alpha[14, 2, 2])*alpha[9, 1, 1]+alpha[14, 1, 1]*alpha[14, 2, 2]-alpha[14, 1, 2]*alpha[14, 2, 1])/(alpha[9, 1, 2]*alpha[9, 2, 6]), alpha[9, 3, 3] = alpha[14, 3, 3], alpha[9, 3, 4] = (alpha[9, 1, 1]-alpha[14, 1, 1])*alpha[14, 2, 6]*alpha[14, 3, 5]/(alpha[9, 1, 2]*alpha[9, 2, 6]), alpha[9, 3, 5] = alpha[14, 2, 6]*alpha[14, 3, 5]/alpha[9, 2, 6]}

They look the same except alpha[9,3,0]

ExpressionTools:-Compare(sol2,solother);

"{alpha[9,2,2]=-alpha[9,1,1]+alpha[14,1,1]+alpha[14,2,2],alpha[9,3,0]=(alpha[14,3,3] ((alpha[9,1,1]^2)+((-1) alpha[([[14],[9]]),1,1]-alpha[14,2,2]) (alpha[9,1,1]+(-alpha[14,1,1]))+(alpha[14,1,1] alpha[14,2,2])-alpha[14,1,2] alpha[14,2,1]))/(alpha[9,1,2] alpha[9,2,6]),alpha[9,3,3]=alpha[14,3,3],alpha[9,3,4]=((alpha[9,1,1]-alpha[14,1,1]) alpha[14,2,6] alpha[14,3,5])/(alpha[9,1,2] alpha[9,2,6]),alpha[9,3,5]=(alpha[14,2,6] alpha[14,3,5])/(alpha[9,2,6])}"

Check the alpha[9,3,0] expressions are actually the same.

simplify(eval(alpha[9,3,0],sol2)-eval(alpha[9,3,0],solother));

0

NULL

Download eqns.mw

I mostly use laplace transforms, but the same applies here. The inverse transforms often seem to need additional assumptions to work. Here adding "assuming positive" will work. I use this for invlaplace even though s is not positive, i.e., it works even though the assumptions might not be correct.

Holding the windows key down with downarrow should minimize. On Maple (Java interface?) it seems instead to iconify, but that may be enough for you.

You can convert the plot to an image, and then strip off the pixels around the border when you write the image to a file

p := plot(x^2, x = 0 .. 3, background = "Blue", axes = none);
p2 := convert(p, Image):
ImageTools:-Write("test2.png", p2[9 .. -9, 10 .. -9, 1 .. 3]);

The file goes into the location specified by currentdir(); you may add the path information to the filename for other locations.

This is for the default size plot. For others the border might be a different size, and you might have to look at the Array to see where the border of 1s ends (that's just a guess; I didn't try it).

kill_border.mw

Another solution, which I prefer, is to export the original plot to *.eps, which is a vector graphics format. Import into your favourite editing program (I use CorelDraw), delete the rectangle object that is the border, and then export to *.png (or other format). This way you're not messing around with individual pixels.

The final answer is

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

giving Pi^2/8. Perhaps obvious, but I got it by hacking around as below, which might or might not be instructive.

Summation.mw

A large section of 2D code can be harder to delete or copy (or paste as 2D), since internally it has a longer format. If you want things to be faster to process, use ctrl-M at the prompt before pasting it in from another worksheet, so it is converted to 1D for later faster use.

The first plot is just the textplot T. To not show it, end the T:= statement with a colon (":").

For example you have a denominator 

-3*(k[1] + k[2])^2*alpha + beta*(l[1] - l[2])^2

but k[1]=-k[2] and l[1]=l[2] so this evaluates to zero.

Since Maple has difficulty with symbolic k, one can work it out for many k and then find a potential answer using generating functions.

Download generating_functions.mw

Possibly a version issue, but for me in Maple 2024.2 it works without cat. Or perhaps you want something else?

GenerateSimilar_Test.mw

5 6 7 8 9 10 11 Last Page 7 of 83