MaplePrimes Questions

With thanks to @sand and @janhardo for their help in solving a variational problem using Maple, I'm presenting a puzzle worth remembering. It was originally published in an IBM competition over 20 years ago under simpler conditions than those presented here, and later posed in a more challenging form in private circles:

A farmer wants to buy a section of a large meadow/pasture for his sheep. He likes a lone, large oak tree on the meadow. This tree is to be the starting and ending point of the fence around the desired section. The fence is exactly 100 meters long. The farmer creates a sketch of the situation. He places the oak tree at the origin of a Cartesian coordinate system with a positive y-axis pointing north and sketches the estimated location of the desired meadow section east of the oak tree. The seller then stipulates that the price per square meter increases linearly eastward by a factor of 1/m³. An agreement is reached, and the farmer now considers the optimal route for the fence to maximize the return on his investment.

The fence route without corners and the value of the purchased meadow must be calculated.

Dear Maple users

I can easily draw a sphere with the following command:

plot3d(1, t = -Pi .. Pi, p = 0 .. Pi, coords = spherical)

Let's say I want to change the number of latitude circles so that there is one for every 10 degrees? Longitude circles are given for every 15 degrees, which is appropriate - corresponding to one for every hour! But in general: Is there a way to change the number of circles of both types? Or maybe you need to piece together a plot of several kinds of plots?

Erik

# The question is: how to get S knowing E?  All the attemps below after S assigned (suggested by Claude) fail factoring E.  

restart;

interface(showassumed = 0): 
assume(a>=0, b>=0, c>=0);
assume(x::real, y::real,z::real);

S := sqrt(x^2+(a+sqrt(y^2+(b+sqrt(z^2+c^2))^2))^2):
E := expand(S):
simplify(E,sqrt):
combine(E,sqrt):
simplify(combine(E, sqrt), sqrt):
evalindets(E, 'radical', f -> simplify(f, sqrt)):
simplify(radnormal(E), sqrt):

 My question concerns such situation:

 how to concatenate the following matrices:

Matrix([[-2, 1, 0, 0, 0, 0, 0, 0], [1, -2, 1, 0, 0, 0, 0, 0], [0, 1, -2, 1, 0, 0, 0, 0], [0, 0, 1, -2, 1, 0, 0, 0], [0, 0, 0, 1, -2, 1, 0, 0], [0, 0, 0, 0, 1, -2, 1, 0], [0, 0, 0, 0, 0, 1, -2, 1], [0, 0, 0, 0, 0, 0, 1, -2]])/(1/50)^2

Matrix([[0, 0, 0, 0, 0, 0, 0, 0], [1, -2, 1, 0, 0, 0, 0, 0], [0, 1, -2, 1, 0, 0, 0, 0], [0, 0, 1, -2, 1, 0, 0, 0], [0, 0, 0, 1, -2, 1, 0, 0], [0, 0, 0, 0, 1, -2, 1, 0], [0, 0, 0, 0, 0, 1, -2, 1], [0, 0, 0, 0, 0, 0, 1, -2]])

Matrix([[-2, 1, 0, 0, 0, 0, 0, 0], [1, -2, 1, 0, 0, 0, 0, 0], [0, 1, -2, 1, 0, 0, 0, 0], [0, 0, 1, -2, 1, 0, 0, 0], [0, 0, 0, 1, -2, 1, 0, 0], [0, 0, 0, 0, 1, -2, 1, 0], [0, 0, 0, 0, 0, 1, -2, 1], [0, 0, 0, 0, 0, 0, 1, -2]])/(1/25)^2

and

1/3*Matrix([[0, 0, 0, 0, 0, 0, 0, 0], [1, -2, 1, 0, 0, 0, 0, 0], [0, 1, -2, 1, 0, 0, 0, 0], [0, 0, 1, -2, 1, 0, 0, 0], [0, 0, 0, 1, -2, 1, 0, 0], [0, 0, 0, 0, 1, -2, 1, 0], [0, 0, 0, 0, 0, 1, -2, 1], [0, 0, 0, 0, 0, 0, 1, -2]])

????

Is there an easier or shorter way to do the following? Any handy package command?

RootOf(-(Int(1/sqrt(2*cos(_a)+RootOf(-(Int(1/sqrt(2*cos(_a)+_Z), _a = 0 .. Pi))+_a+c__2)), _a = 0 .. _Z))+x+c__2)

RootOf(-(Int(1/(2*cos(_a)+RootOf(-(Int(1/(2*cos(_a)+_Z)^(1/2), _a = 0 .. Pi))+_a+c__2))^(1/2), _a = 0 .. _Z))+x+c__2)

(1)

indets(RootOf(-(Int(1/(2*cos(_a)+RootOf(-(Int(1/(2*cos(_a)+_Z)^(1/2), _a = 0 .. Pi))+_a+c__2))^(1/2), _a = 0 .. _Z))+x+c__2), 'specfunc(anything, RootOf)')

{RootOf(-(Int(1/(2*cos(_a)+_Z)^(1/2), _a = 0 .. Pi))+_a+c__2), RootOf(-(Int(1/(2*cos(_a)+RootOf(-(Int(1/(2*cos(_a)+_Z)^(1/2), _a = 0 .. Pi))+_a+c__2))^(1/2), _a = 0 .. _Z))+x+c__2)}

(2)

subs(_a = _b, {RootOf(-(Int(1/(2*cos(_a)+_Z)^(1/2), _a = 0 .. Pi))+_a+c__2), RootOf(-(Int(1/(2*cos(_a)+RootOf(-(Int(1/(2*cos(_a)+_Z)^(1/2), _a = 0 .. Pi))+_a+c__2))^(1/2), _a = 0 .. _Z))+x+c__2)}[1])

RootOf(-(Int(1/(2*cos(_b)+_Z)^(1/2), _b = 0 .. Pi))+_b+c__2)

(3)

subs({RootOf(-(Int(1/(2*cos(_a)+_Z)^(1/2), _a = 0 .. Pi))+_a+c__2), RootOf(-(Int(1/(2*cos(_a)+RootOf(-(Int(1/(2*cos(_a)+_Z)^(1/2), _a = 0 .. Pi))+_a+c__2))^(1/2), _a = 0 .. _Z))+x+c__2)}[1] = RootOf(-(Int(1/(2*cos(_b)+_Z)^(1/2), _b = 0 .. Pi))+_b+c__2), RootOf(-(Int(1/(2*cos(_a)+RootOf(-(Int(1/(2*cos(_a)+_Z)^(1/2), _a = 0 .. Pi))+_a+c__2))^(1/2), _a = 0 .. _Z))+x+c__2))

RootOf(-(Int(1/(2*cos(_a)+RootOf(-(Int(1/(2*cos(_b)+_Z)^(1/2), _b = 0 .. Pi))+_b+c__2))^(1/2), _a = 0 .. _Z))+x+c__2)

(4)

NULL

Related question: Is that substitution mathematically correct or does the _a belong to the outermost RootOf?

Download parameters_in_nested_RootOf.mw

Dear Maple users

Is there a way in Maple to create a sphere with a texture similar to that of the Earth (UV mapping maybe?). I plan to later add mathematically defined spatial curves to the sphere to study differential geometry aspects.

Erik

most of time is give me true my substittuetion but  a lot time i saw it is not make my substittuetion true and this time i figure out which author did   and outcome is what i am looking but when i do that is so different where is problem 

f-m.mw

In here i did try my best and my equation outcome are ok but is not same as author did i dont know why, beside this he try to use two ode for constructing  a new ode which find of one solution of this can be the third solution of ode!
 i have to use eq(5) for my orginal ode  but eq(5) contain f(x) and g(x) which by some assumption  and taking two other ode eq(6) and eq(7)  they construct new one which is eq(14) and by f(xi) and g(xi) have corelation with W(xi) which is third ode  as in eq(9) and eq(11) mentioned, i try to use the solution which author mentioned but is not give me solution of third ode by using corelation what is problem here? also in eq(21)  and eq(25) when thus parameter are satisfy must our odetest be zero

i will update two maple file which realted separatly for constructing  equations and other is for apply and satisfy the solution for ode!

F-p.mw

ode-17.mw

To find the recently introduced new command that compares two expressions, I prompted the large model: 

Answer:

A useful Maple command specifically for comparing two expressions is verify.
Use it like this:
verify(expr1, expr2, equal);
This asks Maple whether the two expressions are mathematically equal.
If you want a more robust algebraic check, a very common alternative is:
is(simplify(expr1 - expr2) = 0);
For polynomial expressions, this is also common:
evalb(expand(expr1 - expr2) = 0);

This is not what I was looking for. I was looking for the command that visually highlights differences.
Can the prompt be improved?

Greetings, Friends.

I have a function f(t) which is a density function. It has a [0,2] interval and integrates to unity. I convolve f(t) with itself to get g(t). It has a [0,4] interval and integrates to unity. All is well with that and I understand.

BUT, the boundary of g(t) shouild be on the interval [0,4/sqrt(3)]. This is based upon both my simulation and other analyses.

At present, the area of the g(t) function on the [4/sqrt(3), 4] interval accounts for 1.408701% of the area under the curve. Not a "trivial" nor "throwaway" amount.

Does anyone know of a way to "re-scale" or modify my convolved result g(t) so that all of the resultant area under the curve is on the [0,4/sqrt(3)] interval?

My work is attached.

restart

with(Statistics)

f := proc (t) options operator, arrow; piecewise(t <= 0, 0, t <= 2, 6/5-(3/2)*t^2+(3/4)*t^3-(3/80)*t^5, 2 <= t, 0) end proc

proc (t) options operator, arrow; piecewise(t <= 0, 0, t <= 2, 6/5-(3/2)*t^2+(3/4)*t^3-(3/80)*t^5, 2 <= t, 0) end proc

(1)

plot(f(t), t = 0 .. 2)

 

int(f(t), t = 0 .. 2)

1

(2)

simplify(int(f(tau)*f(t-tau), tau = -infinity .. infinity))

(1/1971200)*piecewise(t <= 0, 0, t <= 2, t^11-220*t^9+1320*t^8+7920*t^7-103488*t^6+147840*t^5+887040*t^4-2365440*t^3+2838528*t, t <= 4, -(t^4+28*t^3+228*t^2+536*t+80)*(t-4)^7, 4 < t, 0)

(3)

g := unapply(simplify(int(f(tau)*f(t-tau), tau = -infinity .. infinity)), t)

proc (t) options operator, arrow; (1/1971200)*piecewise(t <= 0, 0, t <= 2, t^11-220*t^9+1320*t^8+7920*t^7-103488*t^6+147840*t^5+887040*t^4-2365440*t^3+2838528*t, t <= 4, -(t^4+28*t^3+228*t^2+536*t+80)*(t-4)^7, 4 < t, 0) end proc

(4)

plot(g(t), t = 0 .. 4)

 

int(g(t), t = 0 .. 4)

1

(5)

evalf(int(g(t), t = 0 .. 4/sqrt(3)))

.98591299

(6)

evalf(int(g(t), t = 4/sqrt(3) .. 4))

0.1408701e-1

(7)
 

NULL

Download SphereConvolution.mw

Note that Maple 2026 is not an available option on the product list above. This operation was used in Maple 2026.

I obtained code for the shuffle product of two lists from the AI Assistant. Included in the code was the following list operation to extract a sublist.:

 defined list  u:=[a,b,c]:  extract the sublist using the operation u[2..-1] which gives correct result [b.c]

Normally, I would have expected this operation would be encoded as [op(2..-1),u] . 

Is the shortcut notion reliable or should the operation have been encoded using op() to be safe.

Dear Ladies and Gents ,

I am sorry to ask such a supposedly trivial thing :

what is the differences in the 2 A defined in the attached "worksheet" ?

Thank you.

I am tired and my brain is bugged tonite.

Have a great evening.

Jean-Michel

When trying to open two files I got this message. The files were completely empty. Hours of work lost.

Also further trouble with the interface: copy and paste, modifying text, etc. do not work as they should. Could resolve some problems, but I am losing time and I doubt about the reliability of the software.

Any suggestion?

Hi MaplePrimes, and all,

got stuck

want output of all numbers less than 234 that are divisible by eleven
see attached
if_question.mw

if_question.pdf

Thanks in advance

Matt

 a while ago there is a code for changing function from trig to hyperbolic and viceversa  but i can't find that code except changind xi=I*xi there is another one?

restart

S3 := G(xi) = -(sqrt(Omega)*(tanh(sqrt(Omega)*xi)+I*sech(sqrt(Omega)*xi))+B)/(2*C); S4 := G(xi) = -(sqrt(Omega)*(tanh(sqrt(Omega)*xi)-I*sech(sqrt(Omega)*xi))+B)/(2*C)

G(xi) = -(1/2)*(Omega^(1/2)*(tanh(Omega^(1/2)*xi)-I*sech(Omega^(1/2)*xi))+B)/C

(1)

convert(rhs(S3), trig)

-(1/2)*(Omega^(1/2)*(tanh(Omega^(1/2)*xi)+I*sech(Omega^(1/2)*xi))+B)/C

(2)

NULL

Download convert.mw

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