dharr

Dr. David Harrington

9102 Reputation

22 Badges

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

@janhardo Thanks. I solved just the top part, for which the fence length is 50 m, so total fence length, top and bottom is 100 m. I've edited to clarify.

@Alfred_F Thanks; that's clear. (I was confused about why the buyer wanted to spend more money.)

I'm confused. The cost is Int(x*y(x), x=0..xmax) and the area is Int(y, x=0..xmax) and the fence length is L. So the cost and L are fixed and the area is to be maximized? ("most expansive"), or did you mean the cost is to be maximized for a given L ("most expensive") (as @janhardo seems to have assumed).

@C_R I think your red-circled green one should be yellow, not green - it is the outer integral integration variable.

Download RootOf.mw

@Jean-Michel 

Here is the excerpt from the file:

Do you agree? Because when I asked about this sequence starting with [1,2,7,...] you said no: "No Dharr I refer EXACTLY to the sequence given in the webpage I pasted here."

If I try these commands in Maple 2026, it works exactly as above:

restart

interface(version)

`Standard Worksheet Interface, Maple 2026.0, Windows 11, March 05 2026 Build ID 2001916`

intseq := [1, 2, 7, 23, 85, 314, 1207, 4682, 18493, 73688, 296671, 1202849, 4910689, 20158436, 83169871, 344628527, 1433631973, 5984532728, 25060514887, 105240685511, 443102517025, 1870054761632, 7909539602647, 33521289826778, 142330494633985, 605375433105734, 2578988979186127, 11003364185437517];

[1, 2, 7, 23, 85, 314, 1207, 4682, 18493, 73688, 296671, 1202849, 4910689, 20158436, 83169871, 344628527, 1433631973, 5984532728, 25060514887, 105240685511, 443102517025, 1870054761632, 7909539602647, 33521289826778, 142330494633985, 605375433105734, 2578988979186127, 11003364185437517]

From this sequence, the underlying recurrence can be obtained and solved:

rec := LREtools:-GuessRecurrence(intseq, q(n));

(n+4)*q(n+3)+(-7*n-25)*q(n+2)+(-n+14)*q(n+1)+(55*n+55)*q(n) = 0

NULL

NULL

Download test.mw

If I try the sequences in your original question, they both give FAIL as you found, which I believe is because Maple cannot solve them.

I enter xi (in math mode) in Scientific Word version 5.5. I select and copy and paste into a 2D input region in Maple 2026. lprint(%) gives "xi". Likewise, pasting into a 1D input region gives "xi". Please be more specific - are you using version 6? Which version of Maple?

Recent versions of Maple allow you to export the whole worksheet to latex. If you hide various parts, e.g., all Maple input then you can edit the output more easily to what you want. Not as good as a programmed solution as @acer suggests. See the help page

?worksheet,managing,exporttolatex

@Jean-Michel I'm sorry, I am totally confused and don't understand at all what you are asking. Hope someone else can help you.

@salim-barzani I think it is just too complicated for pdetest to finish. It works for some choices of the constants and functions that reduce the integrands to zero, but note that xi isn't real. Too many square roots of square roots in this case.

f-2s.mw

@Jean-Michel I think you are referring to the sequence on that page:

intseq := [1, 2, 7, 23, 85, 314, 1207, 4682, 18493, 73688, 296671, 1202849, 4910689, 20158436, 83169871, 344628527, 1433631973, 5984532728, 25060514887, 105240685511, 443102517025, 1870054761632, 7909539602647, 33521289826778, 142330494633985, 605375433105734, 2578988979186127, 11003364185437517];

That one can be solved - did you have a problem with that one? But that doesn't mean the other two sequences you chose can be solved.

@salim-barzani Note the comment about the magic of dsubs. Toward the end you had not substituted for P(y,t), a[1](y,t) etc. Now it works.

F7.mw

@salim-barzani I put it (F4.mw) instead of my earlier answer.

I don't see any problem here. These seem to be A057167 and A005132 for which there are no generating functions or recurrence formulas given, so the fact that it is too hard for Maple doesn't seem surprising to me.

@salim-barzani I went back and checked where I saw that the third derivative had disappeared and fixed that up. Not sure why the original method did not work. Now I get the correct a[0] and Q is almost the same as in the paper. I worked it up with the phi(xi) solution you chose and everything works. However if I add the term with Int(K__1(y),y) to Q as in the paper it does not work.

Yes, Maple's solution to the pde system means f__1(t) and f__3(y) can be any functions of t or y respectively.

@acer So Maple 2026 misses some, but Maple 2025 finds some that are not actually solutions.

restart;

kernelopts(version);

`Maple 2025.2, X86 64 WINDOWS, Nov 11 2025, Build ID 1971053`

eq:=x^Pi-Pi^x;

x^Pi-Pi^x

S:=solve(eq, x, allsolutions);

exp(-LambertW(_Z3, -(ln(Pi)+(2*I)*Pi*_Z4)*exp(-(2*I)*_Z1)/Pi)-(2*I)*_Z1)

A real solution on the principal branch

eval(S,{_Z3=0,_Z4=0,_Z1=0});
x=evalf(%);
simplify(fnormal(evalf(eval(eq,x=%%))),zero);

exp(-LambertW(-ln(Pi)/Pi))

x = 2.382179085

-0.1e-7

Pi is on the +1 branch ...

eval(S,{_Z3=1,_Z4=-1,_Z1=0});
x=simplify(fnormal(evalf(%)),zero);
simplify(fnormal(evalf(eval(eq,x=%%))),zero);

exp(-LambertW(1, -(ln(Pi)-(2*I)*Pi)/Pi))

x = 3.141592654

0.

... or -1 with different _Z4

eval(S,{_Z3=-1,_Z4=1,_Z1=0});
simplify(fnormal(evalf(%)),zero);
simplify(fnormal(evalf(eval(eq,x=%%))),zero);

exp(-LambertW(-1, -(ln(Pi)+(2*I)*Pi)/Pi))

3.141592654

0.

A complex solution

eval(S,{_Z3=-1,_Z4=0,_Z1=1});
x=simplify(fnormal(evalf(%)),zero);
simplify(fnormal(evalf(eval(eq,x=%%))),zero);

exp(-LambertW(-1, -ln(Pi)*exp(-2*I)/Pi)-2*I)

x = 6.368931094+7.945243820*I

0.10e-4-0.16e-5*I

But some combinations of _Z3, _Z4 and _Z1 are not solutions

eval(S,{_Z3=-1,_Z4=1,_Z1=1});
x=simplify(fnormal(evalf(%)),zero);
simplify(fnormal(evalf(eval(eq,x=%%))),zero);

exp(-LambertW(-1, -(ln(Pi)+(2*I)*Pi)*exp(-2*I)/Pi)-2*I)

x = 1.047180350+.1618339307*I

-2.196184021-0.550772690e-1*I

eq2 := eval(eq, x = s + t*I);
eqs := evalc([(Re, Im)(eq2)]);

(s+I*t)^Pi-Pi^(s+I*t)

[exp((1/2)*Pi*ln(s^2+t^2))*cos(Pi*arctan(t, s))-exp(s*ln(Pi))*cos(t*ln(Pi)), exp((1/2)*Pi*ln(s^2+t^2))*sin(Pi*arctan(t, s))-exp(s*ln(Pi))*sin(t*ln(Pi))]

There are many complex solutions, which come in complex conjugate pairs.

plots:-implicitplot(eqs, s = -10 .. 10, t = -10 .. 10, color = [red, blue], labels = [Re(x), Im(x)], gridrefine = 4);

NULL

Download s_ex.mw

1 2 3 4 5 6 7 Last Page 1 of 99