MaplePrimes Questions

Hello, I would like to integrate a Maple sheet into a LaTeX sheet. How to do ? Thanks in advance.

If one writes:

y := x+1

x+1

(1)

 

Then, one can display y = x+1 using this notation

 

'y' = y

y = x+1

(2)

 

However, regardless of the type of punctuation I use with the Explore procedure (or even the IntertForm package), the value for y is calculated. (See examples below.)  My question is:

 

How can I get Explore to write it out as in line (2) with x evaluated?

 

Examples:

(The first is a jpg of what is shown since MaplePrimes cannot show the Explore output.)

 

 

Explore('y' = y, x = 0 .. 5, echoexpression = false)

Explore(y = y, x = 0 .. 5, echoexpression = false)

Explore(InertForm:-Display(y) = y, x = 0 .. 5, echoexpression = false)

Download Explore_with_Inert_Form_of_display.mw

I am relatively new to Maple and I'm just getting used to working with units.  Please explain to me why the final calculation does not eliminate m^3 in both the numerator and denominator. Thanks for your help!

 

Problem

 

What would be the mass of a Dyson Shell set at Venus' orbit from the sun?

 

The shell is 150 ft thick and each 1m^2 section is 200 kg.

 

The entire Earth's mass is 5.97×10^24 kg

 

The entire mass of the solar system minus the sun is 2.6667×10^27 kg

``NULLNULL

Assumptions

 

Gravitational pull from the sun is uniform through the depth of the shell.

 

Venus' average orbital distance from the sun is 67,237,910 miles we will use that as.

Pi

Pi

(1)

"(->)"

3.1415926535897932385

(2)

 
Dyson[Inside] := 355016117130*Unit('ft')``

NULLDyson[Outside] := 355016117280*Unit('ft')

355016117280*Units:-Unit(ft)

(3)

NULLNULL``

Vol[Dyson] := (4/3)*Pi*Dyson[Outside]^3-(4/3)*Pi*Dyson[Inside]^3 = 75621866085188578208340000*Pi*Units:-Unit(ft^3)"(->)"0.23757309894397957472e27*Units:-Unit(ft^3)

   

Total_Weight := 200*Unit('kg')*Vol[Dyson]/m^3

(6691789940422039289112993734304/15625)*Pi*Units:-Unit(kg*m^3)/m^3

(4)

"(=)"

(6691789940422039289112993734304/15625)*Pi*Units:-Unit(kg*m^3)/m^3

(5)

"(->)"

0.13454641994365413638e28*Units:-Unit(kg*m^3)/m^3

(6)

Download Q_for_Dyson_Shell_Weight.mw

restart

V := m^4*(1-(varphi/mu)^p);

m^4*(1-(varphi/mu)^p)

(1)

V1 := diff(V, varphi);

-m^4*(varphi/mu)^p*p/varphi

(2)

V2 := diff(V1, varphi);

-m^4*(varphi/mu)^p*p^2/varphi^2+m^4*(varphi/mu)^p*p/varphi^2

(3)

f := Zeta * (varphi^2);

Zeta*varphi^2

(4)

f1 := diff(f, varphi);

2*Zeta*varphi

(5)

f2 := diff(f1, varphi);

2*Zeta

(6)

R:= simplify(((V/3-f1*V1/(3*V))/((1-kappa^2*f)/(12*kappa^2)+f1/V)));

4*kappa^2*m^4*(-3*(varphi/mu)^(2*p)*m^4+(varphi/mu)^(3*p)*m^4+3*(varphi/mu)^p*m^4-m^4-2*Zeta*(varphi/mu)^p*p+2*Zeta*(varphi/mu)^(2*p)*p)/((m^4*(Zeta*kappa^2*varphi^2-1)*(varphi/mu)^p+(-Zeta*kappa^2*varphi^2+1)*m^4+24*Zeta*varphi*kappa^2)*(-1+(varphi/mu)^p))

(7)

N:=evalf(int((3*V1*kappa^2*((2*V*V1)/3 - f1^2*V1*R/(3*V) - f1*V1^2/(3*V))/(V*(-f*kappa^2 + 1)*(-R*f1 - 2*V1))),varphi=varphi__hc..varphi__end)assuming varphi__hc > 0, varphi__hc > varphi__end);

-1.*(int(-3.*(varphi/mu)^p*p*kappa^2*(-.6666666667*m^8*(1.-1.*(varphi/mu)^p)*(varphi/mu)^p*p/varphi+5.333333333*Zeta^2*varphi*m^4*(varphi/mu)^p*p*kappa^2*(-3.*(varphi/mu)^(2.*p)*m^4+(varphi/mu)^(3.*p)*m^4+3.*(varphi/mu)^p*m^4-1.*m^4-2.*Zeta*(varphi/mu)^p*p+2.*Zeta*(varphi/mu)^(2.*p)*p)/((m^4*(Zeta*kappa^2*varphi^2-1.)*(varphi/mu)^p+(-1.*Zeta*kappa^2*varphi^2+1.)*m^4+24.*Zeta*varphi*kappa^2)*(-1.+(varphi/mu)^p)*(1.-1.*(varphi/mu)^p))-.6666666667*Zeta*m^4*((varphi/mu)^p)^2*p^2/(varphi*(1.-1.*(varphi/mu)^p)))/(varphi*(1.-1.*(varphi/mu)^p)*(-1.*Zeta*kappa^2*varphi^2+1.)*(-8.*kappa^2*m^4*(-3.*(varphi/mu)^(2.*p)*m^4+(varphi/mu)^(3.*p)*m^4+3.*(varphi/mu)^p*m^4-1.*m^4-2.*Zeta*(varphi/mu)^p*p+2.*Zeta*(varphi/mu)^(2.*p)*p)*Zeta*varphi/((m^4*(Zeta*kappa^2*varphi^2-1.)*(varphi/mu)^p+(-1.*Zeta*kappa^2*varphi^2+1.)*m^4+24.*Zeta*varphi*kappa^2)*(-1.+(varphi/mu)^p))+2.*m^4*(varphi/mu)^p*p/varphi)), varphi = varphi__end .. varphi__hc))

(8)

simplify(-1.*(int(-3.*(varphi/mu)^p*p*kappa^2*(-.6666666667*m^8*(1.-1.*(varphi/mu)^p)*(varphi/mu)^p*p/varphi+5.333333333*Zeta^2*varphi*m^4*(varphi/mu)^p*p*kappa^2*(-3.*(varphi/mu)^(2.*p)*m^4+(varphi/mu)^(3.*p)*m^4+3.*(varphi/mu)^p*m^4-1.*m^4-2.*Zeta*(varphi/mu)^p*p+2.*Zeta*(varphi/mu)^(2.*p)*p)/((m^4*(Zeta*kappa^2*varphi^2-1.)*(varphi/mu)^p+(-1.*Zeta*kappa^2*varphi^2+1.)*m^4+24.*Zeta*varphi*kappa^2)*(-1.+(varphi/mu)^p)*(1.-1.*(varphi/mu)^p))-.6666666667*Zeta*m^4*((varphi/mu)^p)^2*p^2/(varphi*(1.-1.*(varphi/mu)^p)))/(varphi*(1.-1.*(varphi/mu)^p)*(-1.*Zeta*kappa^2*varphi^2+1.)*(-8.*kappa^2*m^4*(-3.*(varphi/mu)^(2.*p)*m^4+(varphi/mu)^(3.*p)*m^4+3.*(varphi/mu)^p*m^4-1.*m^4-2.*Zeta*(varphi/mu)^p*p+2.*Zeta*(varphi/mu)^(2.*p)*p)*Zeta*varphi/((m^4*(Zeta*kappa^2*varphi^2-1.)*(varphi/mu)^p+(-1.*Zeta*kappa^2*varphi^2+1.)*m^4+24.*Zeta*varphi*kappa^2)*(-1.+(varphi/mu)^p))+2.*m^4*(varphi/mu)^p*p/varphi)), varphi = varphi__end .. varphi__hc)))

Error, (in content/content) invalid arguments

 

NULL

Download ex.mw

Can anyone help me factor this thing out, so I ll get an irreductible result?

x2 := 2*u - 2/3*(a - 1)*(a + 1)*u^3 + (26/45*a^4 - 4/9*a^2 + 26/45)*u^5 + O(u^6)

In an old question, @mbras asked for a "partial" `convert/elsymfun`. However, SymPy's sympy.polys.rings.PolyElement.symmetrize seems to provide more examples that cannot be handled by the program that appeared in that question.
For instance, 

>>> from sympy import var
>>> var('x:z,p:r')
(x, y, z, p, q, r)
>>> from sympy.polys.polyfuncs import symmetrize
>>> symmetrize(x**2-(y**2+2**z),[y,x],formal=True,symbols=[p+p,q*q])[0]
-2**z - 4*p**2 + 2*q**2
>>> symmetrize(x*x*y+y*y*z+z*z*x,[y,x,z],formal=True,symbols=[p,q,r])
(0, x**2*y + x*z**2 + y**2*z, [(p, x + y + z), (q, x*y + x*z + y*z), (r, x*y*z)])

Though I can , can't the built-in  be generalized to such expressions (in other words, write the polynomial part of input as a symmetric part and a remainder with (named, if need be) elementary symmetric polynomials)?

Besides, since any symmetric polynomial can also be expressed in terms of the complete symmetric polynomials, is there a similar  command in Maple?

Hi,

I have a small issue when trying to calculate the I have assigned 'g' to the derivative function, but I have to use 'subs' to obtain the images. Thank you for your insights

QFonction.mw

I find that if if declare a variable in a procedure inside a if  statement it Maple things something is wrong with the if statement:

tSound=proc(xMic,yMic,zMic,xGun,yGun,zGun,mode)  

global vSound;  

local locMic:=Vector([xMic,yMix,zMix]);  

local locGun:=Vector([xGun,yGun,zGun]);   l

ocal delGunToMix;   if mode=1 then #`direct  `    

local x=0.0;    <==remove this sand fine

delGunToMix:=locMic-locGun;    

return vSound*Norm(delGunToMix);  

elif  mode=2 then #`reflect off wall at z=0`        

end if;   return 0.0;  end proc:


Error, invalid 'if' statement
==>I can delclare the variable 'local' outside the if. Why? It doesn't make much sense, though not that hard to avoid.

So, every year our family picks names for Christmas, but this year seemed odd.  My wife pointed out that one family always just happens to randomly pick another families name.  That is the majority of the time most of one family is always trading with another, the only rule is that each family member can not trade with a member of their own family. 

I was wondering if someone could come up with a way to calculate just how random the choice actually was from the previous year or years using whatever means necessary .. graph theory came to mind.  The draw was done behind closed doors, so my wife questioned how failrly that was done, and so brought me here with the question ...
Was the name choosing really random or was it actually a fixed draw?

In our group there are total of 9 adults and 9 children, but actually the 2 youngest children swap gifts so it's really 9 adults and 7 children who can swap presents.  But I will breakdown the families less the two trading children.

Family A - 2 adults 1 child
Family B - 2 adults 2 children
Family C - 2 adults 2 children
Family D - 2 adults 2 children
Family E - 1 adult

Oh, a child can trade with another child or a parent and similarily a parent can trade with another parent or a child.  

My code
restart;
reqn:=f(n+1) = f(n)  + sqrt(2*f(n+1)-f(n)):
rsolve({reqn, f(1) = 15},f(n));

I can not get the answer. How can I get the answer?

The uploaded worksheet begins to uniformly tile the Poincare disk with pentagons using hyperbolic reflection .

Although relatively easy to create the central pentagon and the first adjacent pentagon, it becomes increasingly difficult to determine which lines to reflect to create the remaining pentagons in the first tier adjacent to the central pentagon and more so to create the pentagons of the second tier adjacent to those in the first tier and so on.

Is there a better technique for accomplishing this?

In particular can Mobius tranformations be employed to do this? If so, please replay with or point to a working example of this for me to follow.

 Tile_Poincare_disk.mw

Sorry, I forgot that respondents to this question must establich their own link to the DirectSearch package.

I wonder if this a bug or Am I overlooking something?

I set infolevel[dsolve]:=5; and first time calling dsolve(ode), it works as expected. It prints on the screen the trace and steps it did.  But when I repeat the command dsolve, now it only prints one line and the rest of info that were printed before no longer show.

Should not the same information be printed each time? This is what happens on another example I tried. It seems infolevel does not work the same depending on the ode being solved?  Here is a worksheet attached to show the above.

Is there a workaround to make it display same information each time?

Maple 2023.2 on windows 10.

 

restart;

21424

interface(version);

`Standard Worksheet Interface, Maple 2023.2, Windows 10, October 25 2023 Build ID 1753458`

ode:=[2*diff(x(t),t)+diff(y(t),t)=x(t)+y(t)+t,diff(x(t),t)+diff(y(t),t)=2*x(t)+3*y(t)+exp(t)];
infolevel[dsolve]:=5;
dsolve(ode);

[2*(diff(x(t), t))+diff(y(t), t) = x(t)+y(t)+t, diff(x(t), t)+diff(y(t), t) = 2*x(t)+3*y(t)+exp(t)]

5

-> Solving each unknown as a function of the next ones using the order: [y(t), x(t)]

-> Calling odsolve with the ODE diff(diff(y(x) x) x) = 4*(diff(y(x) x))-y(x)-3*x+1 y(x) singsol = none

Methods for second order ODEs:

--- Trying classification methods ---

trying a quadrature

trying high order exact linear fully integrable

trying differential order: 2; linear nonhomogeneous with symmetry [0,1]

trying a double symmetry of the form [xi=0, eta=F(x)]

-> Try solving first the homogeneous part of the ODE

   checking if the LODE has constant coefficients

   <- constant coefficients successful

   -> Determining now a particular solution to the non-homogeneous ODE

      trying a rational particular solution

      <- rational particular solution successful

<- solving first the homogeneous part of the ODE successful

{x(t) = exp((2+3^(1/2))*t)*c__2+exp(-(-2+3^(1/2))*t)*c__1-3*t-11, y(t) = -(1/2)*exp((2+3^(1/2))*t)*c__2*3^(1/2)+(1/2)*exp(-(-2+3^(1/2))*t)*c__1*3^(1/2)-(3/2)*exp((2+3^(1/2))*t)*c__2-(3/2)*exp(-(-2+3^(1/2))*t)*c__1-(1/2)*exp(t)+2*t+7}

dsolve(ode);

-> Solving each unknown as a function of the next ones using the order: [y(t), x(t)]

{x(t) = exp((2+3^(1/2))*t)*c__2+exp(-(-2+3^(1/2))*t)*c__1-3*t-11, y(t) = -(1/2)*exp((2+3^(1/2))*t)*c__2*3^(1/2)+(1/2)*exp(-(-2+3^(1/2))*t)*c__1*3^(1/2)-(3/2)*exp((2+3^(1/2))*t)*c__2-(3/2)*exp(-(-2+3^(1/2))*t)*c__1-(1/2)*exp(t)+2*t+7}

infolevel[dsolve]:=5;

5

dsolve(ode);

-> Solving each unknown as a function of the next ones using the order: [y(t), x(t)]

{x(t) = exp((2+3^(1/2))*t)*c__2+exp(-(-2+3^(1/2))*t)*c__1-3*t-11, y(t) = -(1/2)*exp((2+3^(1/2))*t)*c__2*3^(1/2)+(1/2)*exp(-(-2+3^(1/2))*t)*c__1*3^(1/2)-(3/2)*exp((2+3^(1/2))*t)*c__2-(3/2)*exp(-(-2+3^(1/2))*t)*c__1-(1/2)*exp(t)+2*t+7}

dsolve(ode);

-> Solving each unknown as a function of the next ones using the order: [y(t), x(t)]

{x(t) = exp((2+3^(1/2))*t)*c__2+exp(-(-2+3^(1/2))*t)*c__1-3*t-11, y(t) = -(1/2)*exp((2+3^(1/2))*t)*c__2*3^(1/2)+(1/2)*exp(-(-2+3^(1/2))*t)*c__1*3^(1/2)-(3/2)*exp((2+3^(1/2))*t)*c__2-(3/2)*exp(-(-2+3^(1/2))*t)*c__1-(1/2)*exp(t)+2*t+7}

ode:=diff(y(x),x$2)+y(x)=sin(x);
dsolve(ode);

diff(diff(y(x), x), x)+y(x) = sin(x)

Methods for second order ODEs:

--- Trying classification methods ---

trying a quadrature

trying high order exact linear fully integrable

trying differential order: 2; linear nonhomogeneous with symmetry [0,1]

trying a double symmetry of the form [xi=0, eta=F(x)]

-> Try solving first the homogeneous part of the ODE

   checking if the LODE has constant coefficients

   <- constant coefficients successful

   -> Determining now a particular solution to the non-homogeneous ODE

      building a particular solution using variation of parameters

<- solving first the homogeneous part of the ODE successful

y(x) = sin(x)*c__2+cos(x)*c__1+(1/2)*sin(x)-(1/2)*cos(x)*x

dsolve(ode);

Methods for second order ODEs:

--- Trying classification methods ---

trying a quadrature

trying high order exact linear fully integrable

trying differential order: 2; linear nonhomogeneous with symmetry [0,1]

trying a double symmetry of the form [xi=0, eta=F(x)]

-> Try solving first the homogeneous part of the ODE

   checking if the LODE has constant coefficients

   <- constant coefficients successful

   -> Determining now a particular solution to the non-homogeneous ODE

      building a particular solution using variation of parameters

<- solving first the homogeneous part of the ODE successful

y(x) = sin(x)*c__2+cos(x)*c__1+(1/2)*sin(x)-(1/2)*cos(x)*x

 


On a side note. the first line of the display is hard to read. Any one know what it is supposed to mean by the space between the 1 and y(x) at the end there?

Download infolevel_stops_working.mw

Another example where infolevel changes on second call to dsolve: The first call gives more information which is lost in the second call. There does not seem to be a way to fix this at user level.

restart;

23828

ode:=diff(y(x),x)+(a*x+y(x))*y(x)^2=0:
infolevel[dsolve]:=5:
dsolve(ode)

Methods for first order ODEs:

--- Trying classification methods ---

trying a quadrature

trying 1st order linear

trying Bernoulli

trying separable

trying inverse linear

trying homogeneous types:

trying Chini

differential order: 1; looking for linear symmetries

trying exact

trying Abel

The relative invariant s3 is: -1/27*a*(2*a^2*x^3-9)

The first absolute invariant s5^3/s3^5 is: 729*a^4*x^6*(2*a^2*x^3-15)^3/(2*a^2*x^3-9)^5

The second absolute invariant s3*s7/s5^2 is: 5/3/a^2*(2*a^2*x^3-9)/x^3*(2*a^4*x^6-21*a^2*x^3+18)/(2*a^2*x^3-15)^2

...checking Abel class AIL (45)

...checking Abel class AIL (310)

...checking Abel class AIR (36)

inverse of the transformation solving the problem is: {t = 1/2*(-2*a^2)^(1/3)*x, u(t) = -(-2*a^2)^(1/3)/a*y(x)}

<- Abel successful

y(x) = 2*a/(a^2*x^2+2*RootOf((-2*a^2)^(1/3)*AiryBi(_Z)*c__1*x+(-2*a^2)^(1/3)*x*AiryAi(_Z)+2*AiryBi(1, _Z)*c__1+2*AiryAi(1, _Z))*(-2*a^2)^(1/3))

dsolve(ode)

Methods for first order ODEs:

--- Trying classification methods ---

trying a quadrature

trying 1st order linear

trying Bernoulli

trying separable

trying inverse linear

trying homogeneous types:

trying Chini

differential order: 1; looking for linear symmetries

trying exact

trying Abel

<- Abel successful

y(x) = 2*a/(a^2*x^2+2*RootOf((-2*a^2)^(1/3)*AiryBi(_Z)*c__1*x+(-2*a^2)^(1/3)*x*AiryAi(_Z)+2*AiryBi(1, _Z)*c__1+2*AiryAi(1, _Z))*(-2*a^2)^(1/3))

 

Download another_example_info_level_changes.mw

I'd like to plot vectors with one beginning at the head of the other. The application is a reflection at a surface. VectorPositionPlot doesn't seem to do it.

The same kind of plot would be used to illustrate vector addition.

I have done a complete clean reinstall of windows 10 and all programs on my pc.

In worksheet mode new files do not have the "default" red/brown text coluor ond the font is different. 

Might not be a problem but thought that was the default?

What have I changed or have Maple defaults changed?

restart

``

2+2

4

(1)

NULL

eq := x^3+x-7

x^3+x-7

(2)

NULL

Download 23-11-23_Q_inputs_to_worksheet_not_brown_red_colour.mw

Sorry if this is already known, but I haven't found the proper function call.

I just want to "print" this expression without evaluating the boolean calls

restart;
P(X <= 5) = P(-5 <= -X) = P(E(X) - 5 <= E(X) - X);

As it stands, this will evaluate to "false" which I obviously don't want.

I just want to use it as a displayer.

First 97 98 99 100 101 102 103 Last Page 99 of 2374