MaplePrimes Questions

i've got a list of 6 ODEs with 6 initial conditions:

MH,MS,M,a,G,e,afb are just constants

Eqns2 := diff(xH(t), t) = vxH(t),
            diff(vxH(t), t) = -G*M*xH(t)/(xH(t)^2+yH(t)^2)^(3/2),
            diff(yH(t), t) = vyH(t),
            diff(vyH(t), t) = -G*M*yH(t)/(xH(t)^2+yH(t)^2)^(3/2),

            diff(theta(t), t) = omega(t),

            diff(omega(t), t) = -G*MS*afb^2*(xH(t)*sin(theta(t))-yH(t)*cos(theta(t))*            (xH(t)*cos(theta(t))+yH(t)*sin(theta(t)))/(xH(t)^2+yH(t)^2)^(5/2):

ICs2 := xH(0) = a*(1+e), vxH(0) = 0, vyH(0) = sqrt(G*M*(1-e)/(a*(1+e))), yH(0) = 0, 0 < theta(0), theta(0) <= Pi,        omega(0) = 10*Pi/T_H:

soln2 := dsolve({Eqns2, ICs2}, {omega(t), theta(t), vxH(t), vyH(t), xH(t), yH(t)}, numeric)

But it doesn't solve it , but instead displays this error message:

Error, (in dsolve/numeric/process_input) system must be entered as a set/list of expressions/equations

Can someone find a syntax error or a typo that would explain this?

When assigning a color to a given wave length I initially used ColorTools WavelengthToColor. Acer commented that this wasn't the most accurate. I looked into this a little further and it seems there could be a better result. The attached document compares some different ways of assigning colors to wave lengths. 

Warning- The CIEDE2000 computation for deltaE is very slow. I think this is because of the hue angle calculations which use piecewise a lot. The CIE94 delta E method produces nearly the same result and takes minutes instead of hours.

 

Questions;

 I think I could speed up my calculation if I could find the position of the minimum element of an Array similar to FindMinimalElement of a list. 

I created my own atan2 function (similar to Excel). If there were a built in Maple equivalent perhaps it would be faster? I didn't see any such function.

6bit_Wavelength_Color_CIEDE2000.mw

Hello,

I have a procedure which plots a graph. I need the x-axes, which in this case is theta, to range between -3 and +3. However, I am not sure as to how I can create this restricted range. Any help is greatly appreciated! Thank you in advance!

Kind regards,

Gambia Man

with(plots):

a := 1.501*10^9:

Th := sqrt(4*Pi^2*a^3/(G*(Mh+Msat))):

HyperionOrbit := proc (`&theta;IC`, `&omega;IC`, n, nopoints) local a, Mh, Msat, G, e, beta, M, Eqns, ICs, soln; option remember; global `&omega;H`, Th; a := 1.501*10^9; Mh := 5.5855*10^18; Msat := 5.6832*10^26; G := 6.67259/10^11; e := .232; beta := .89; M := Mh+Msat; Eqns := diff(theta(t), t) = omega(t), diff(omega(t), t) = -G*Msat*beta^2*(xH(t)*sin(theta(t))-yH(t)*cos(theta(t)))*(xH(t)*cos(theta(t))+yH(t)*sin(theta(t)))/(xH(t)^2+yH(t)^2)^2.5, diff(xH(t), t) = vxH(t), diff(vxH(t), t) = -G*M*xH(t)/(xH(t)^2+yH(t)^2)^(3/2), diff(yH(t), t) = vyH(t), diff(vyH(t), t) = -G*M*yH(t)/(xH(t)^2+yH(t)^2)^(3/2); ICs := xH(0) = a*(1+e), yH(0) = 0, vxH(0) = 0, vyH(0) = sqrt(G*M*(1-e)/(a*(1+e))), theta(0) = `&theta;IC`, omega(0) = `&omega;IC`; soln := dsolve({Eqns, ICs}, numeric, maxfun = 0, output = array([seq(i, i = 0 .. n*Th, Th)])); plots:-odeplot(soln, [theta(t), omega(t)/`&omega;H`], 0 .. n*Th, numpoints = nopoints, labels = ["&theta;(t)","&omega;(t)/&omega;H"], axes = boxed, style = plottools:-point) end proc:

plots:-display(seq(HyperionOrbit(i, `&omega;H`*i, 1, 1), i = -3 .. 3))

 

NULL

NULL

 

Download Poincare_section_Boyd_plot.mw

with(plots):

a := 1.501*10^9:

Th := sqrt(4*Pi^2*a^3/(G*(Mh+Msat))):

HyperionOrbit := proc (`&theta;IC`, `&omega;IC`, n, nopoints) local a, Mh, Msat, G, e, beta, M, Eqns, ICs, soln; option remember; global `&omega;H`, Th; a := 1.501*10^9; Mh := 5.5855*10^18; Msat := 5.6832*10^26; G := 6.67259/10^11; e := .232; beta := .89; M := Mh+Msat; Eqns := diff(theta(t), t) = omega(t), diff(omega(t), t) = -G*Msat*beta^2*(xH(t)*sin(theta(t))-yH(t)*cos(theta(t)))*(xH(t)*cos(theta(t))+yH(t)*sin(theta(t)))/(xH(t)^2+yH(t)^2)^2.5, diff(xH(t), t) = vxH(t), diff(vxH(t), t) = -G*M*xH(t)/(xH(t)^2+yH(t)^2)^(3/2), diff(yH(t), t) = vyH(t), diff(vyH(t), t) = -G*M*yH(t)/(xH(t)^2+yH(t)^2)^(3/2); ICs := xH(0) = a*(1+e), yH(0) = 0, vxH(0) = 0, vyH(0) = sqrt(G*M*(1-e)/(a*(1+e))), theta(0) = `&theta;IC`, omega(0) = `&omega;IC`; soln := dsolve({Eqns, ICs}, numeric, maxfun = 0, output = array([seq(i, i = 0 .. n*Th, Th)])); plots:-odeplot(soln, [theta(t), omega(t)/`&omega;H`], 0 .. n*Th, numpoints = nopoints, labels = ["&theta;(t)","&omega;(t)/&omega;H"], axes = boxed, style = plottools:-point) end proc:

plots:-display(seq(HyperionOrbit(i, `&omega;H`*i, 1, 1), i = -3 .. 3))

 

NULL

NULL

 

Download Poincare_section_Boyd_plot.mw

Hi,

Wondered if anyone could help with the query below.

Consider f(x,y) defined as:
f := proc (x, y) options operator, arrow; x*y/(x+y) end proc

 

Then f(A, B); becomes:
(A * B )/(A + B)

 

now consider the polynomial:(poly2)

poly2:=(A*B+A*X+B*X)*(Y+X)/((A+B)*X*(2*Y+X))

 

This polynomial is just the expansion of the polynomial below (lets call it poly1) which MAPLE does not recognize.

(A*B/(A+B)+X)/(X+Y*X/(Y+X))

Here you can see that A,B on top and X,Y on the bottom are clearly of the form f(x,y).

 

Is there a way you can get MAPLE to recognize certain algebraic forms such that the polynomial poly2 could be written either as poly1 (already shown above) or as poly3 below:

poly3:=(f(A, B)+X)/(X+f(Y, X))

 

I have tried using simplify in the following form but not much luck. It doesn't seem to recognize anything other than the obvious.

simplify(poly2, {A*B/(A+B) = F1}, tdeg(A, B))

 

(I am still a bit new to the MAPLE syntax and procedures so apologies if I have missed something obvious function that can do this.)

 

Thanks.

 

In Maple 2015, the DrawNetwork command option "horizontal" does not seem to work. Is this a bug? It doesn't even display horizontally on the online Maple Help webpage. Any help would be appreciated.

Hello,

I have a question about poincare sections. I have this piece of code i need to analyse and I want to use a poincare section in order to so. How could I do it? I am interested in theta and omega. Any help is greatly appreciated! Thank you in advance!

Kind regards,

Gambia Man

with(plots):

a := 1.501*10^9:

Th := sqrt(4*Pi^2*a^3/(G*(Mh+Msat)));

1876321.326

 

0.3348672330e-5

(1)

HyperionOrbit := proc (`&theta;IC`, `&omega;IC`) local a, Mh, Msat, G, e, beta, M, Eqns, ICs; global `&omega;H`, Th, soln; a := 1.501*10^9; Mh := 5.5855*10^18; Msat := 5.6832*10^26; G := 6.67259/10^11; e := .232; beta := .89; M := Mh+Msat; Eqns := diff(theta(t), t) = omega(t), diff(omega(t), t) = -G*Msat*beta^2*(xH(t)*sin(theta(t))-yH(t)*cos(theta(t)))*(xH(t)*cos(theta(t))+yH(t)*sin(theta(t)))/(xH(t)^2+yH(t)^2)^2.5, diff(xH(t), t) = vxH(t), diff(vxH(t), t) = -G*M*xH(t)/(xH(t)^2+yH(t)^2)^(3/2), diff(yH(t), t) = vyH(t), diff(vyH(t), t) = -G*M*yH(t)/(xH(t)^2+yH(t)^2)^(3/2); ICs := xH(0) = a*(1+e), yH(0) = 0, vxH(0) = 0, vyH(0) = sqrt(G*M*(1-e)/(a*(1+e))), theta(0) = `&theta;IC`, omega(0) = `&omega;IC`; soln := dsolve({Eqns, ICs}, numeric); odeplot(soln, [theta(t), omega(t)/`&omega;H`], 0 .. 5*Th, numpoints = 2000, labels = ["&theta;(t)","&omega;(t)/&omega;H"], axes = boxed, size = [.25, .75]) end proc

``

 

Download New_Poincare_section.mw

http://www.maplesoft.com/support/help/Maple/view.aspx?path=Physics/.

i see bra and ket expression are so beautiful,

however,

how do real valued eigenvectors involve in calculation of bra and ket style computation?

assume a,b,c,d,B2,B3 are matrices and y is unknown

eq2 := a*b+c*d+a;
eq3 := a*c+c*d+c;
eq4 := a*b+c*a+b*c;
eq5 := a*b+a*d+b*c;
solve([eq2=B2,eq3=B3,eq4=B2,eq5=y],[a,b,c,d]);

which function can solve this kind of system of matrices?

how to solve a,b,c,d in terms of y?

solve([a = -(-y+1)/(x-y+2), b = -(-x^2+2*x*y-y^2-3*x+3*y-2)/(x-2*y+3), c = -(x*y-y^2-2*x+4*y-4)/(x*y-y^2-x+2*y-1), d = -(-x*y+y^2+x-2*y+1)/(x-2*y+3)], [x,y]);

i do not know whether multiple solutions lead no solutions in this.

if so, is it possible to show all possible solutions of x and y in terms of a,b,c,d ?

 

equ1 := -l*cos(xi)^2*(1-cos(`&beta;__f`))/(alpha^2.sin(sigma))-`&lambda;__2`*w*(v^2.sin(sigma))/(g*l*cos(xi)^2) = 0

-l*cos(xi)^2*(1-cos(`&beta;__f`))/(alpha^2.sin(sigma))-`&lambda;__2`*w*(v^2.sin(sigma))/(g*l*cos(xi)^2) = 0

(1)

equ2 := -l*cos(xi)^2*(1-cos(beta[f]))/(alpha*sin(sigma)*tan(sigma))+Typesetting:-delayDotProduct(l, cos(xi)^2)*z__0*sin(`&beta;__f`)/(alpha*sin(sigma)*(2*l*cos(sigma)^2))-`&lambda;__1`*`#mi("L")`*`#mi("sin",fontstyle = "normal")`(sigma)*cos(xi)+`&lambda;__2`*L*cos(sigma)*cos(xi)-`&lambda;__2`*w*alpha*v^2*sin(sigma)/(g*l*tan(sigma)*cos(xi)^2) = 0

-l*cos(xi)^2*(1-cos(beta[f]))/(alpha*sin(sigma)*tan(sigma))+(1/2)*(l.(cos(xi)^2))*z__0*sin(`&beta;__f`)/(alpha*sin(sigma)*l*cos(sigma)^2)-`&lambda;__1`*`#mi("L")`*`#mi("sin",fontstyle = "normal")`(sigma)*cos(xi)+`&lambda;__2`*L*cos(sigma)*cos(xi)-`&lambda;__2`*w*alpha*v^2*sin(sigma)/(g*l*tan(sigma)*cos(xi)^2) = 0

(2)

equ3 := l*cos(xi)^2*sin(`&beta;__f`)*tan(sigma)/(alpha*sin(sigma)*(2*l)) = 0

(1/2)*cos(xi)^2*sin(`&beta;__f`)*tan(sigma)/(alpha*sin(sigma)) = 0

(3)

equ4 := -`&lambda;__1`*`#mi("L")`*`#mi("cos",fontstyle = "normal")`(sigma)*sin(xi)+`&lambda;__2`*L*sin(sigma)*sin(xi)-2*`&lambda;__2`*tan(xi)*w*alpha*v^2*sin(sigma)/(g*l*cos(xi)^2)-l*sin(2*xi)*(1-cos(beta[f]))/(alpha*sin(sigma)) = 0

-`&lambda;__1`*`#mi("L")`*`#mi("cos",fontstyle = "normal")`(sigma)*sin(xi)+`&lambda;__2`*L*sin(sigma)*sin(xi)-2*`&lambda;__2`*tan(xi)*w*alpha*v^2*sin(sigma)/(g*l*cos(xi)^2)-l*sin(2*xi)*(1-cos(beta[f]))/(alpha*sin(sigma)) = 0

(4)

equ5 := L*cos(sigma)*cos(xi)-w = 0

L*cos(sigma)*cos(xi)-w = 0

(5)

`#mi("equ6")` := `#mi("L")`*`#mi("sin",fontstyle = "normal")`(sigma)*cos(xi)-w*alpha*v^2*sin(sigma)/(g*l*cos(xi)^2)

`#mi("L")`*`#mi("sin",fontstyle = "normal")`(sigma)*cos(xi)-w*alpha*v^2*sin(sigma)/(g*l*cos(xi)^2)

(6)

answer := solve({equ1, equ2, equ3, equ4, equ5, equ6}, {alpha, sigma, xi, `&lambda;__1`, `&lambda;__2`, beta[f]})

``

(7)

``

(8)

NULL

 

Download Bryson_sesson1_p6.mw

I am exploring the onset of chaos in the driven damped pendulum. I have set up the non-linear initial value problem that describes the situation in terms of phi(t), the angle of the pendulum from the vertical. I can solve the differential equation numerically for certain initial conditions using dsolve, and then graph that solution using odeplot. I can then explore what happens when I change the initial conditions ever so slightly. Again I can solve this new initial value problem numerically with dsolve, and then graph it with odeplot, Suppose the solution to the first problem is phi1(t), and the solution to the second initial value problem phi2(t). I would like to plot log | phi2(t) - phi1(t) | versus t, that is, the logarithm of the absolute value of the difference of the two solutions versus t. I’m interested in how sensitive the system is to initial conditions.

So, how can I disentangle the two solutions, phi1(t) and phi2(t), from dsolve and then plot the graph I want?


I have an implcit function to plot. I can plot it with the parameter but that puts the parameter on the x axis instead of the y axis. What is the best way to present the plot with the parameter on the y axis?

 

T; R0 := 0.1003183099e-5; T;
/ / -15 -34
- \0.00007363071999 h \3.947841762 10 h + 3.158273412 10

-7 \\// (1/2)
- 3.947841763 10 h R0// |/ 2 -7 \
\\-Pi h + 1.256637062 10 R0/

\
2 / -15 -7 \|
R0 \-1.256637062 10 + 1.256637062 10 R0//
0.000001003183099
1 / 20 /
- --------------------------------- \5.862184047 10 h \4.00
(1/2)
/ 2 -13\
\-Pi h + 1.260637062 10 /

-16 2 -13 -34\\
10 Pi h - 1.260637062 10 Pi h + 3.158273412 10 //
plot(T, h = 0.1e-8 .. 0.10e-7, title = Tension*vs*height*of*dome*above*plane, labels = [m, N/m]);

I would like the plot to be inverted to show the height of the dome as a function of tension;

Maple's isprime is not a definitive primality test. The input has to pass a "strong pseudo-primality test" and "one Lucas test". This is well documented. I thought I remembered that there is also a way to get Maple to perform a true primality test, but I don't remember how and don't see anything about this in the Maple help system.

Is my memory faulty, or is there no definitive primality test in Maple?

Thanks in advance,

Doug

---------------------------------------------------------------------
Douglas B. Meade  <><
Math, USC, Columbia, SC 29208  E-mail: mailto:meade@math.sc.edu
Phone:  (803) 777-6183         URL:    http://www.math.sc.edu

Hei, I'm trying to create a random walk in the plane, with constant step length (=1) and the angle between two consecutive steps are decided by a probability density function. I just can't seem to find out how I should implement the density function into my worksheet.

The probability density function is: p(phi)=(1/4)*cos(phi/2), on the interval [-Pi,Pi].
And  I think i managed to do it by selecting a random angle, but don't know how to generate a random angle given this probability function. Any ideas? It'd be highly appreciated!


Hi everyone, I'm working a problem

Given a dog and a man. At t=0, the position of the man and his dog is (0,0) and (0,h), respectively. Then, the man start moving along Ox with constant speed vm. The dog keep running toward its master with constant speed vd. Describe the movement of the dog?

Therefore, let say the position of the dog is (f1(x),f2(x)), I wrote these:

restart;

with(plots);

MD := proc (h, vm, vd) local x, y, ode, ics, sol;

ode := {(diff(f2(t), t))*(vm*t-f1(t))+(diff(f1(t), t))*f2(t), diff(f2(t), t) = -sqrt(vd^2-(diff(f1(t), t))^2)};

ics := {f1(0) = h, f2(0) = 0};

sol := dsolve(ode union ics);

x := unapply(eval(f1(t), sol), t);

y := unapply(eval(f2(t), sol), t);

plot([x(t), y(t), t = 0 .. 10], scaling = constrained) end proc;

MD(10, 1, 5);

However, "sol" is returned NULL, which means the equation has no solution. I supposed I completed the motion part of the problem correctly. Please help me or point out an another method

 

First 1191 1192 1193 1194 1195 1196 1197 Last Page 1193 of 2429