MaplePrimes Questions

I am looking for a command that generates a rotation matrix with Euler angles.

Ideally a command that allows to specify the sequence of rotations about x,y,z axes and the corresponding angles.

The only command I found is ?Student,LinearAlgebra,RotationMatrix which only rotates about one axis.

Anything else that Maple offers in this context? (searching with the search term "Euler" is hopeless -> too many hits.)

I'm calcuating an endomorphism in 2d dimensions. It is contructed out of a tensor contraction, for example, in 6-dimensions, the endomorphism is

K[mu,~nu] = LeviCivita[~alpha,~beta,~gamma,~delta,~upsilon,~nu]*C[alpha,beta,gamma]*C[delta,upsilon,mu]

I appreciate that, in terms of computation, this gets big quickly: it's something like O(exp) in time to sum over repeated indices in each matrix entry. Therefore, I thought, instead of putting the above expression in Define, I could make a matrix with unsummed entries, and then do the sums in parallel using Threads[Map](SumOverRepeatedIndices,...) but looking at my CPU usage and comparing execution times, it doesn't appear that this is working.

Is there any way I can more efficiently calculate these matrix entries?

This isn't the first time that I've seen a question that doesn't seem to have received a comment or answer, but which, when I click on the question title, turns out to have received one.
Here's the opposite phenomenon: a question appears to have two comments or answers, but none of them exist (9:38 GMT+1)

Screen capture from the main page

Screen capture from the question page

restart

with(PDEtools)

with(LinearAlgebra)

NULL

with(SolveTools)

undeclare(prime)

`There is no more prime differentiation variable; all derivatives will be displayed as indexed functions`

(1)

declare(u(x, t))

u(x, t)*`will now be displayed as`*u

(2)

declare(f(x, t))

f(x, t)*`will now be displayed as`*f

(3)

pde := diff(u(x, t), `$`(x, 3))+6*u(x, t)*(diff(u(x, t), x))+diff(u(x, t), t) = 0

diff(diff(diff(u(x, t), x), x), x)+6*u(x, t)*(diff(u(x, t), x))+diff(u(x, t), t) = 0

(4)

map(int, diff(diff(diff(u(x, t), x), x), x)+6*u(x, t)*(diff(u(x, t), x))+diff(u(x, t), t) = 0, x)

3*u(x, t)^2+diff(diff(u(x, t), x), x)+int(diff(u(x, t), t), x) = 0

(5)

pde1 := %

3*u(x, t)^2+diff(diff(u(x, t), x), x)+int(diff(u(x, t), t), x) = 0

(6)

Y := u(x, t) = 2*(diff(ln(f(x, t)), `$`(x, 2)))

u(x, t) = 2*(diff(diff(f(x, t), x), x))/f(x, t)-2*(diff(f(x, t), x))^2/f(x, t)^2

(7)

L := eval(pde1, Y)

3*(2*(diff(diff(f(x, t), x), x))/f(x, t)-2*(diff(f(x, t), x))^2/f(x, t)^2)^2+2*(diff(diff(diff(diff(f(x, t), x), x), x), x))/f(x, t)-8*(diff(diff(diff(f(x, t), x), x), x))*(diff(f(x, t), x))/f(x, t)^2+24*(diff(diff(f(x, t), x), x))*(diff(f(x, t), x))^2/f(x, t)^3-6*(diff(diff(f(x, t), x), x))^2/f(x, t)^2-12*(diff(f(x, t), x))^4/f(x, t)^4-2*(diff(f(x, t), x))*(diff(f(x, t), t))/f(x, t)^2+2*(diff(diff(f(x, t), t), x))/f(x, t) = 0

(8)

numer(lhs(3*(2*(diff(diff(f(x, t), x), x))/f(x, t)-2*(diff(f(x, t), x))^2/f(x, t)^2)^2+2*(diff(diff(diff(diff(f(x, t), x), x), x), x))/f(x, t)-8*(diff(diff(diff(f(x, t), x), x), x))*(diff(f(x, t), x))/f(x, t)^2+24*(diff(diff(f(x, t), x), x))*(diff(f(x, t), x))^2/f(x, t)^3-6*(diff(diff(f(x, t), x), x))^2/f(x, t)^2-12*(diff(f(x, t), x))^4/f(x, t)^4-2*(diff(f(x, t), x))*(diff(f(x, t), t))/f(x, t)^2+2*(diff(diff(f(x, t), t), x))/f(x, t) = 0))*denom(rhs(3*(2*(diff(diff(f(x, t), x), x))/f(x, t)-2*(diff(f(x, t), x))^2/f(x, t)^2)^2+2*(diff(diff(diff(diff(f(x, t), x), x), x), x))/f(x, t)-8*(diff(diff(diff(f(x, t), x), x), x))*(diff(f(x, t), x))/f(x, t)^2+24*(diff(diff(f(x, t), x), x))*(diff(f(x, t), x))^2/f(x, t)^3-6*(diff(diff(f(x, t), x), x))^2/f(x, t)^2-12*(diff(f(x, t), x))^4/f(x, t)^4-2*(diff(f(x, t), x))*(diff(f(x, t), t))/f(x, t)^2+2*(diff(diff(f(x, t), t), x))/f(x, t) = 0)) = numer(rhs(3*(2*(diff(diff(f(x, t), x), x))/f(x, t)-2*(diff(f(x, t), x))^2/f(x, t)^2)^2+2*(diff(diff(diff(diff(f(x, t), x), x), x), x))/f(x, t)-8*(diff(diff(diff(f(x, t), x), x), x))*(diff(f(x, t), x))/f(x, t)^2+24*(diff(diff(f(x, t), x), x))*(diff(f(x, t), x))^2/f(x, t)^3-6*(diff(diff(f(x, t), x), x))^2/f(x, t)^2-12*(diff(f(x, t), x))^4/f(x, t)^4-2*(diff(f(x, t), x))*(diff(f(x, t), t))/f(x, t)^2+2*(diff(diff(f(x, t), t), x))/f(x, t) = 0))*denom(lhs(3*(2*(diff(diff(f(x, t), x), x))/f(x, t)-2*(diff(f(x, t), x))^2/f(x, t)^2)^2+2*(diff(diff(diff(diff(f(x, t), x), x), x), x))/f(x, t)-8*(diff(diff(diff(f(x, t), x), x), x))*(diff(f(x, t), x))/f(x, t)^2+24*(diff(diff(f(x, t), x), x))*(diff(f(x, t), x))^2/f(x, t)^3-6*(diff(diff(f(x, t), x), x))^2/f(x, t)^2-12*(diff(f(x, t), x))^4/f(x, t)^4-2*(diff(f(x, t), x))*(diff(f(x, t), t))/f(x, t)^2+2*(diff(diff(f(x, t), t), x))/f(x, t) = 0))

2*f(x, t)^2*(3*(diff(diff(f(x, t), x), x))^2+f(x, t)*(diff(diff(diff(diff(f(x, t), x), x), x), x))+f(x, t)*(diff(diff(f(x, t), t), x))-4*(diff(diff(diff(f(x, t), x), x), x))*(diff(f(x, t), x))-(diff(f(x, t), x))*(diff(f(x, t), t))) = 0

(9)

PP := simplify(2*f(x, t)^2*(3*(diff(diff(f(x, t), x), x))^2+f(x, t)*(diff(diff(diff(diff(f(x, t), x), x), x), x))+f(x, t)*(diff(diff(f(x, t), t), x))-4*(diff(diff(diff(f(x, t), x), x), x))*(diff(f(x, t), x))-(diff(f(x, t), x))*(diff(f(x, t), t))) = 0)

2*f(x, t)^2*(3*(diff(diff(f(x, t), x), x))^2+f(x, t)*(diff(diff(diff(diff(f(x, t), x), x), x), x))+f(x, t)*(diff(diff(f(x, t), t), x))-4*(diff(diff(diff(f(x, t), x), x), x))*(diff(f(x, t), x))-(diff(f(x, t), x))*(diff(f(x, t), t))) = 0

(10)

%/(2*f(x, t)^2)

3*(diff(diff(f(x, t), x), x))^2+f(x, t)*(diff(diff(diff(diff(f(x, t), x), x), x), x))+f(x, t)*(diff(diff(f(x, t), t), x))-4*(diff(diff(diff(f(x, t), x), x), x))*(diff(f(x, t), x))-(diff(f(x, t), x))*(diff(f(x, t), t)) = 0

(11)

collect(%, f)

(diff(diff(diff(diff(f(x, t), x), x), x), x)+diff(diff(f(x, t), t), x))*f(x, t)+3*(diff(diff(f(x, t), x), x))^2-4*(diff(diff(diff(f(x, t), x), x), x))*(diff(f(x, t), x))-(diff(f(x, t), x))*(diff(f(x, t), t)) = 0

(12)

pde2 := %

(diff(diff(diff(diff(f(x, t), x), x), x), x)+diff(diff(f(x, t), t), x))*f(x, t)+3*(diff(diff(f(x, t), x), x))^2-4*(diff(diff(diff(f(x, t), x), x), x))*(diff(f(x, t), x))-(diff(f(x, t), x))*(diff(f(x, t), t)) = 0

(13)

NULL

T := f(x, t) = g(x, t)^2+h(x, t)^2+a[0]

T1 := g(x, t) = t*n[1]+x*k[1]

T2 := h(x, t) = t*n[2]+x*k[2]

L2 := subs({T1, T2}, T)

f(x, t) = (t*n[1]+x*k[1])^2+(t*n[2]+x*k[2])^2+a[0]

(14)

L3 := eval(pde2, L2)

(2*k[1]*n[1]+2*k[2]*n[2])*((t*n[1]+x*k[1])^2+(t*n[2]+x*k[2])^2+a[0])+3*(2*k[1]^2+2*k[2]^2)^2-(2*(t*n[1]+x*k[1])*k[1]+2*(t*n[2]+x*k[2])*k[2])*(2*(t*n[1]+x*k[1])*n[1]+2*(t*n[2]+x*k[2])*n[2]) = 0

(15)

L4 := collect(L3, [x, t], 'distributed')

((2*k[1]*n[1]+2*k[2]*n[2])*(k[1]^2+k[2]^2)-(2*k[1]^2+2*k[2]^2)*(2*k[1]*n[1]+2*k[2]*n[2]))*x^2-(2*k[1]^2+2*k[2]^2)*(2*n[1]^2+2*n[2]^2)*x*t+((2*k[1]*n[1]+2*k[2]*n[2])*(n[1]^2+n[2]^2)-(2*k[1]*n[1]+2*k[2]*n[2])*(2*n[1]^2+2*n[2]^2))*t^2+(2*k[1]*n[1]+2*k[2]*n[2])*a[0]+3*(2*k[1]^2+2*k[2]^2)^2 = 0

(16)

eqs := {coeffs(L4, [x, t])}

Error, invalid arguments to coeffs

 

NULL

NULL

ans := solve(eqs, vars)

{a[2] = a[2], a[3] = a[3], a[4] = 0, a[5] = a[5], a[7] = a[7]}

(17)

NULL

eqI := ans

{a[2] = a[2], a[3] = a[3], a[4] = 0, a[5] = a[5], a[7] = a[7]}

(18)

eqpsi := eval(L2, eqI)

f(x, t) = (t*a[2]+a[3])^2+a[5]^2*t^2+a[7]

(19)

eqphi := eval(Y, eqpsi)

w(x, t) = 0

(20)

simplify(eval(pde, eqphi))

 

NULL

Download F-params.mw

Hello

I have a question regarding the input of a list that I would like to use for further calculations. 
Attached, you’ll find the maple file with some vector calculations and a 3D visualisation. Three numbers are used as input (F_D3, F_D4, F_S2). I would like to use a function over time for these inputs instead of plain numbers. The function consists of an Excel list with an input number for each time step. How do I do this? Can I also use PlotVector in visu2 to plot a vector at a certain time step? 

For further processing, I would like the p-norm (F_E2) of vector RF_E2 to be visualized/plotted as a function over time. How do I approach this? 

Thank you very much for your help in advance!

input_question.xlsx

Input_question.mw

I first tried Threads and found that Maple dsolve does not work in threads (see https://www.mapleprimes.com/questions/239602-Error-in-Dsolve-Type-System-Does)

It was suggested there to use Grid instead of Threads. 

Now I got time to try Grid. My first test shows that Grid does not work with dsolve also.

Here is an example where dsolve solves this system of odes,. But when using Grid, Maple gives an internal error 

         Error, (in evalapply) cannot apply non-operator differential equation

Does this means one can't use Threads and also can't use Grid with dsolve? Or Am I doing something wrong?

interface(version);

`Standard Worksheet Interface, Maple 2024.2, Windows 10, October 29 2024 Build ID 1872373`

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 1841 and is the same as the version installed in this computer, created 2025, January 3, 8:59 hours Pacific Time.`

restart;

P:=[diff(x(t),t)=t*x(t)-y(t)+exp(t)*z(t),diff(y(t),t)=2*x(t)+t^2*y(t)-z(t),diff(z(t),t)=exp(-t)*x(t)+3*t*y(t)+t^3*z(t)]:

dsolve(P); #no error, Long answer

{x(t) = (exp(t)*y(t)*t^5-(diff(y(t), t))*exp(t)*t^3-2*(exp(t))^2*y(t)*t^2-(diff(y(t), t))*exp(t)*t^2+2*(diff(y(t), t))*(exp(t))^2+t*y(t)*exp(t)+(diff(diff(y(t), t), t))*exp(t)+2*exp(t)*y(t))/(-2*t^3*exp(t)+4*(exp(t))^2+2*exp(t)*t-1), y(t) = DESol({diff(diff(diff(_Y(t), t), t), t)+(-4*(exp(t))^3/(-2*(exp(t))^2*t^3+4*(exp(t))^3+2*(exp(t))^2*t-exp(t))-2*(exp(t))^2/(-2*(exp(t))^2*t^3+4*(exp(t))^3+2*(exp(t))^2*t-exp(t))-exp(t)/(-2*(exp(t))^2*t^3+4*(exp(t))^3+2*(exp(t))^2*t-exp(t))-4*(exp(t))^3*t^2/(-2*(exp(t))^2*t^3+4*(exp(t))^3+2*(exp(t))^2*t-exp(t))-2*(exp(t))^2*t^3/(-2*(exp(t))^2*t^3+4*(exp(t))^3+2*(exp(t))^2*t-exp(t))-4*(exp(t))^3*t/(-2*(exp(t))^2*t^3+4*(exp(t))^3+2*(exp(t))^2*t-exp(t))+4*(exp(t))^2*t^2/(-2*(exp(t))^2*t^3+4*(exp(t))^3+2*(exp(t))^2*t-exp(t))+exp(t)*t^3/(-2*(exp(t))^2*t^3+4*(exp(t))^3+2*(exp(t))^2*t-exp(t))+2*(exp(t))^2*t^6/(-2*(exp(t))^2*t^3+4*(exp(t))^3+2*(exp(t))^2*t-exp(t))+2*(exp(t))^2*t^5/(-2*(exp(t))^2*t^3+4*(exp(t))^3+2*(exp(t))^2*t-exp(t))-4*(exp(t))^3*t^3/(-2*(exp(t))^2*t^3+4*(exp(t))^3+2*(exp(t))^2*t-exp(t))+exp(t)*t^2/(-2*(exp(t))^2*t^3+4*(exp(t))^3+2*(exp(t))^2*t-exp(t))+exp(t)*t/(-2*(exp(t))^2*t^3+4*(exp(t))^3+2*(exp(t))^2*t-exp(t)))*(diff(diff(_Y(t), t), t))+(-4*(exp(t))^2/(-2*(exp(t))^2*t^3+4*(exp(t))^3+2*(exp(t))^2*t-exp(t))-exp(t)/(-2*(exp(t))^2*t^3+4*(exp(t))^3+2*(exp(t))^2*t-exp(t))-exp(t)*t^5/(-2*(exp(t))^2*t^3+4*(exp(t))^3+2*(exp(t))^2*t-exp(t))+4*(exp(t))^3*t^2/(-2*(exp(t))^2*t^3+4*(exp(t))^3+2*(exp(t))^2*t-exp(t))-6*(exp(t))^2*t^3/(-2*(exp(t))^2*t^3+4*(exp(t))^3+2*(exp(t))^2*t-exp(t))-exp(t)*t^4/(-2*(exp(t))^2*t^3+4*(exp(t))^3+2*(exp(t))^2*t-exp(t))-2*(exp(t))^2*t^8/(-2*(exp(t))^2*t^3+4*(exp(t))^3+2*(exp(t))^2*t-exp(t))-2*(exp(t))^2*t^7/(-2*(exp(t))^2*t^3+4*(exp(t))^3+2*(exp(t))^2*t-exp(t))+4*(exp(t))^3*t^5/(-2*(exp(t))^2*t^3+4*(exp(t))^3+2*(exp(t))^2*t-exp(t))+4*(exp(t))^3*t^4/(-2*(exp(t))^2*t^3+4*(exp(t))^3+2*(exp(t))^2*t-exp(t))+2*(exp(t))^2*t^5/(-2*(exp(t))^2*t^3+4*(exp(t))^3+2*(exp(t))^2*t-exp(t))+4*(exp(t))^3*t^3/(-2*(exp(t))^2*t^3+4*(exp(t))^3+2*(exp(t))^2*t-exp(t))-2*(exp(t))^2*t^4/(-2*(exp(t))^2*t^3+4*(exp(t))^3+2*(exp(t))^2*t-exp(t))+2*(exp(t))^2*t/(-2*(exp(t))^2*t^3+4*(exp(t))^3+2*(exp(t))^2*t-exp(t))+4*exp(t)*t^2/(-2*(exp(t))^2*t^3+4*(exp(t))^3+2*(exp(t))^2*t-exp(t))+exp(t)*t/(-2*(exp(t))^2*t^3+4*(exp(t))^3+2*(exp(t))^2*t-exp(t)))*(diff(_Y(t), t))+(-4*(exp(t))^3/(-2*(exp(t))^2*t^3+4*(exp(t))^3+2*(exp(t))^2*t-exp(t))-8*(exp(t))^2/(-2*(exp(t))^2*t^3+4*(exp(t))^3+2*(exp(t))^2*t-exp(t))-3*exp(t)/(-2*(exp(t))^2*t^3+4*(exp(t))^3+2*(exp(t))^2*t-exp(t))+1/(-2*(exp(t))^2*t^3+4*(exp(t))^3+2*(exp(t))^2*t-exp(t))-exp(t)*t^5/(-2*(exp(t))^2*t^3+4*(exp(t))^3+2*(exp(t))^2*t-exp(t))-24*(exp(t))^4*t/(-2*(exp(t))^2*t^3+4*(exp(t))^3+2*(exp(t))^2*t-exp(t))-8*(exp(t))^3*t^2/(-2*(exp(t))^2*t^3+4*(exp(t))^3+2*(exp(t))^2*t-exp(t))+4*(exp(t))^2*t^3/(-2*(exp(t))^2*t^3+4*(exp(t))^3+2*(exp(t))^2*t-exp(t))-5*exp(t)*t^4/(-2*(exp(t))^2*t^3+4*(exp(t))^3+2*(exp(t))^2*t-exp(t))-4*(exp(t))^3*t/(-2*(exp(t))^2*t^3+4*(exp(t))^3+2*(exp(t))^2*t-exp(t))+16*(exp(t))^2*t^2/(-2*(exp(t))^2*t^3+4*(exp(t))^3+2*(exp(t))^2*t-exp(t))+4*exp(t)*t^3/(-2*(exp(t))^2*t^3+4*(exp(t))^3+2*(exp(t))^2*t-exp(t))+6*(exp(t))^2*t/(-2*(exp(t))^2*t^3+4*(exp(t))^3+2*(exp(t))^2*t-exp(t))+2*(exp(t))^2*t^9/(-2*(exp(t))^2*t^3+4*(exp(t))^3+2*(exp(t))^2*t-exp(t))-4*(exp(t))^3*t^6/(-2*(exp(t))^2*t^3+4*(exp(t))^3+2*(exp(t))^2*t-exp(t))-6*(exp(t))^2*t^7/(-2*(exp(t))^2*t^3+4*(exp(t))^3+2*(exp(t))^2*t-exp(t))+4*(exp(t))^2*t^6/(-2*(exp(t))^2*t^3+4*(exp(t))^3+2*(exp(t))^2*t-exp(t))+20*(exp(t))^3*t^4/(-2*(exp(t))^2*t^3+4*(exp(t))^3+2*(exp(t))^2*t-exp(t))+8*(exp(t))^2*t^5/(-2*(exp(t))^2*t^3+4*(exp(t))^3+2*(exp(t))^2*t-exp(t))+exp(t)*t^6/(-2*(exp(t))^2*t^3+4*(exp(t))^3+2*(exp(t))^2*t-exp(t))-12*(exp(t))^3*t^3/(-2*(exp(t))^2*t^3+4*(exp(t))^3+2*(exp(t))^2*t-exp(t))-4*(exp(t))^2*t^4/(-2*(exp(t))^2*t^3+4*(exp(t))^3+2*(exp(t))^2*t-exp(t))-3*exp(t)*t/(-2*(exp(t))^2*t^3+4*(exp(t))^3+2*(exp(t))^2*t-exp(t)))*_Y(t)}, {_Y(t)}), z(t) = (2*exp(t)*y(t)*t^3-2*(diff(y(t), t))*exp(t)*t^2-2*(diff(y(t), t))*exp(t)*t+2*t*y(t)*exp(t)-t^2*y(t)+2*(diff(diff(y(t), t), t))*exp(t)+4*exp(t)*y(t)+diff(y(t), t))/(-2*t^3*exp(t)+4*(exp(t))^2+2*exp(t)*t-1)}

restart;

 

P:=[diff(x(t),t)=t*x(t)-y(t)+exp(t)*z(t),diff(y(t),t)=2*x(t)+t^2*y(t)-z(t),diff(z(t),t)=exp(-t)*x(t)+3*t*y(t)+t^3*z(t)]:

Grid:-Run(0,dsolve(P)); #gives internal error
Grid:-Wait();

Error, (in evalapply) cannot apply non-operator differential equation

 


This error happens on this specific ode. I tried 2-3 others and did not see an error. So it seems to depend to what the ode is.

Download dsolve_also_fail_in_grid.mw

in help for Grid:-Wait, it has an example where it says

And in help for Grid:-Setup it says

"The numnodes option allows you to specify the number of nodes to be used in subsequent computations.  This option is only available in "local" mode."

Is numnodes supposed to be the same as number of cores on my PC?  If so, then why numnodes=4 says this will insure it run run on 2 core machine?

Is this typo and it should be 4 core machine?

I have a solution to a physics free-fall problem:

times := -2.019619977*Unit('s'), 2.019619977*Unit('s')

I would like to extract the positive values.

After some tinkering, I came up with this solution:

sol:=[][]:
for i in times do:
    val := Split(i, output = coefficient):
    if 0 <= val then:
        sol := sol, val*Unit('s'):
    end if:
end do:
evalf(sol,3)

2.02 s

This works, but is inelegant and requires many expressions.

Is there a simpler way, possibly a single-line expression, to accomplish this?

I am quite puzzled by the fact that Maple occasionally returns incorrect results when calculating the real and imaginary parts. I have attached an example script below. As shown, the returned value is erroneous unless the condition that k is real is explicitly specified.

Do you have any thoughts on this?

question.mw

Download question.mw

In Peter Winkler's book "Mathematical Mind-Benders" the now famous problem of dividing an ice cream cake is posed. It asks: If, when cutting the circular cake with any central angle (whether rational or irrational), neighboring piece after neighboring piece is constantly cut off, the cake segment is rotated to the previous top side, and the cut surface is considered to be healed, then after a finite number of cuts the top side is back where it was at the beginning. I also fell for it at first and assumed that according to Weyl's theorem (uniform distribution modulo 1) this is not possible and therefore the central angle must be rational. I have since found a solution according to which the cutting process must stop after a finite number of steps. Weyl's theorem is obviously not applicable here. Why - I am still puzzling over that.

Now I am interested in whether Maple can be used to animate the uniform distribution modulo 1 on the unit circle and to display the associated statistics in the sense of a sample and calculate the sample value of the uniform distribution. As a Maple beginner, I am not yet able to do this and am asking for help.

How do add two or more variables to the save command ?

e.g.  the following works for one variable

number:=1;
A:=5;
fname:=sprintf("file(%a)",number);
save A, fname;

but how do you e.g. add another variable to the fname ?

Lets say I want  to add the contents of another variable say Var2
 

number:=1;
A:=5;
Var2:="b";
fname:=sprintf("file(%a)_Var2",number);

save A, fname

How do I do that ?

Could we create a plot with tau0 varying from 0.1 to 0.6 on the x-axis and profit on the y-axis displaying Rprof, Mprof, Tprof, T_Cprof all on the same graph?

Sheet attached : trial_question.mw

there is must be a problem but i didn't figure out ?  in this command didn't give me my parameter why?
vars1 := indets(eqs1);
ans := solve(eqs1, {a[0], a[1], a[2], a[3], a[4], e[1], k[1], n[1], p[1]});

parameter.mw

On joint un point M  d'une ellipse aux foyers F1 et F2.  Les droites MF1 et MF2 recoupent l'ellipse aux points H1 et H2 ,  trouver l'enveloppe de la droite H1H2,  quand le point M se `déplace` sur l'ellipse.;


restart;
Fig := proc(t) local a, b, c, courbe, sol, sol1, dr, tx; _EnvHorizontalName := 'x'; _EnvVerticalName := 'y'; a := 11; b := 7; c := sqrt(a^2 - b^2); geometry:-ellipse(e1, x^2/a^2 + y^2/b^2 = 1); geometry:-point(Oo, 0, 0); geometry:-point(M, a*cos(t), b*sin(t)); geometry:-point(F1, -c, 0); geometry:-point(F2, c, 0); geometry:-line(MF1, [M, F1]); geometry:-line(MF2, [M, F2]); sol := solve({geometry:-Equation(MF1), x^2/a^2 + y^2/b^2 = 1}, {x, y}, explicit); print(%); geometry:-point(H1, subs(sol[2], x), subs(sol[2], y)); geometry:-line(MH1, [M, H1]); sol := solve({geometry:-Equation(MF2), x^2/a^2 + y^2/b^2 = 1}, {x, y}, explicit); print(%); geometry:-point(H2, subs(sol[2], x), subs(sol[2], y)); geometry:-line(MH2, [M, H2]); courbe := plots:-implicitplot(x^2/a^2 + (a^2 + c^2)^2*y^2/b^2 - 1 = 0, x = -a .. a, y = -b .. b, color = cyan); tx := plots:-textplot([[geometry:-coordinates(M)[], "M"], [geometry:-coordinates(Oo)[], "O"], [geometry:-coordinates(H1)[], "H1"], [geometry:-coordinates(H2)[], "H2"], [geometry:-coordinates(F1)[], "F1"], [geometry:-coordinates(F2)[], "F2"]], font = [times, bold, 16], align = [above, left]); dr := geometry:-draw([e1(color = blue), MH1(color = magenta), MH2(color = magenta), M(color = red, symbol = solidcircle, symbolsize = 12), H1(color = red, symbol = solidcircle, symbolsize = 12), H2(color = red, symbol = solidcircle, symbolsize = 12), F1(color = red, symbol = solidcircle, symbolsize = 12), F2(color = red, symbol = solidcircle, symbolsize = 12), Oo(color = red, symbol = solidcircle, symbolsize = 12)]); plots:-display([dr, tx, courbe], scaling = constrained, axes = normal, title = "Ellipse et normales ", titlefont = [HELVETICA, 14]); end proc;
Fig(Pi/3);
    /    11      7  (1/2)\    /      26411   210177  (1/2)  
   { x = --, y = - 3      }, { x = - ----- - ------ 2     , 
    \    2       2       /    \      57074   28537          

         11319  (1/2)  (1/2)   66199  (1/2)\ 
     y = ----- 3      2      - ----- 3      }
         28537                 57074       / 


     /    11      7  (1/2)\    /    210177  (1/2)   26411  
    { x = --, y = - 3      }, { x = ------ 2      - -----, 
     \    2       2       /    \    28537           57074  

            11319  (1/2)  (1/2)   66199  (1/2)\ 
      y = - ----- 3      2      - ----- 3      }
            28537                 57074       / 

Fig(Pi/6);
   /      104027  (1/2)   17787  (1/2)  (1/2)   123420  (1/2)
  { x = - ------ 3      + ----- 3      6      - ------ 2     
   \      22226           11113                 11113        

       19404  (1/2)  (1/2)        66199   11319  (1/2)\   
     + ----- 2      6     , y = - ----- + ----- 6      }, 
       11113                      22226   11113       /   

     /    11  (1/2)      7\ 
    { x = -- 3     , y = - }
     \    2              2/ 


Error, (in geometry:-line) the line is not defined
plots:-animate(Fig, [t], t = 0.1 .. 2*Pi, frames = 150);
            {x = -10.99908244, y = -0.09041172732}, 

              {x = 10.94504582, y = 0.6988339166}


Error, (in plots/animate) the line is not defined
;
NULL;
Thank you for your help.

I am trying to calculate a probability density function for the distance between two points inside a unit circle.  I have succeeded with doing this for a few differing applications, but I am stuck on this problem.  I use uniformly distributed polar coordinates to find x and y values for two independent points.  When I ask for the PDF of the distance, I get a FAIL.

I am assuming that such a calculation is possible, I've succeeded with similar problems, but here I am stuck.  I hope my problem is rooted in my lack of knowledge, as opposed to a limitation of Maple.

Here are my Maple statements:

with(Statistics);
th1 := RandomVariable(Uniform(0, 2*Pi));
th2 := RandomVariable(Uniform(0, 2*Pi));
r1 := RandomVariable(Uniform(0, 1));
r2 := RandomVariable(Uniform(0, 1));
x1 := r1*cos(th1);
y1 := r1*sin(th1);
x2 := r2*cos(th2);
y2 := r2*sin(th2);
Dist := sqrt((x1 - x2)^2 + (y1 - y2)^2);
f := simplify(PDF(Dist, t));

Does anyone have any idea as to what I am doing wrong?  Thank you.

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