Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

Hello people in mapleprimes,

I have an expression, which apparently can be factored with (beta-1)

e1 := -(beta-1)*L*s*lambda*Omega^3+(beta-1)*L*s*g^k*epsilon*(T*lambda-T+1)*Omega^2+(beta-1)*L*s*(T+lambda-1)*Omega-(beta-1)*L*s*g^k*T*epsilon*lambda;

I want this expresson factored with (beta-1) but keeping other terms the same as

e2:=-L*s*lambda*Omega^3+L*s*g^k*epsilon*(T*lambda-T+1)*Omega^2+L*s*(T+lambda-1)*Omega-L*s*g^k*T*epsilon*lambda;

Is this possible?

I hope you will help me for this.

Thanks in advance.

taro

question_q1_11_28_2016.mw

 

 

How does one retrieve document properties of some target file.

I tried ..

with(DocumentTools):
Retrieve("c:\\Users\laptop22\Documents\Start2Test.mw", "GetDocumentProperty('all')")

however that ended in error

***************edit added****************
From the help pages

Why Apply Document Properties?

The Document Properties feature allows you to record data associated with your document, such as the author or date of creation. This data is not displayed in your document but could be read by an external processing tool.

It does say read by external processing tool, but Maple has the command Retrieve so I would think it is also possible within Maple, maybe not with Retrieve since it is specifically looking for labels.  But perhaps there is another way?

Is it possible to complie maplets into external java applications?

hi...why solve for this equation dos not answer?

thanks

4.mw
 

restart; dsys3 := {diff(w(x), x, x, x, x, x, x)+diff(w(x), x, x, x, x)+diff(w(x), x, x)+(1-2)*w(x) = -90, w(0) = 0, w(1) = 0, ((D@@1)(w))(0) = 0, ((D@@1)(w))(1) = 0, ((D@@2)(w))(0) = 0, ((D@@2)(w))(1) = 0}; dsol5 := dsolve(dsys3, numeric, abserr = .1, output = array([.5]))

array( 1 .. 2, 1 .. 1, [( 1, 1 ) = (array( 1 .. 7, [( 1 ) = (x), ( 2 ) = (w(x)), ( 3 ) = (diff(w(x), x)), ( 4 ) = (diff(diff(w(x), x), x)), ( 5 ) = (diff(diff(diff(w(x), x), x), x)), ( 6 ) = (diff(diff(diff(diff(w(x), x), x), x), x)), ( 7 ) = (diff(diff(diff(diff(diff(w(x), x), x), x), x), x))  ] )), ( 2, 1 ) = (array( 1 .. 1, 1 .. 7, [( 1, 7 ) = (HFloat(-1.3899459757465982e-7)), ( 1, 3 ) = (HFloat(4.5022670883498417e-8)), ( 1, 1 ) = (.5), ( 1, 6 ) = (HFloat(2.2858770405958895)), ( 1, 5 ) = (HFloat(2.6615438731474126e-8)), ( 1, 4 ) = (HFloat(-0.04747952956114616)), ( 1, 2 ) = (HFloat(0.0019672907400671725))  ] ))  ] )

(1)

"restart;w(x):=C1* (sinh(x))+C2* (cosh(x))+C3 *(sin(x))+C4 *(cos(x))+C5 *(sin(x))+C6 *(cos(x))+90"

proc (x) options operator, arrow; C1*sinh(x)+C2*cosh(x)+C3*sin(x)+C4*cos(x)+C5*sin(x)+C6*cos(x)+90 end proc

(2)

A1 := evalf(subs(x = 0, w(x)))

90.+1.*C2+1.*C4+1.*C6

(3)

A2 := evalf(subs(x = 1, w(x)))

1.175201194*C1+1.543080635*C2+.8414709848*C3+.5403023059*C4+.8414709848*C5+.5403023059*C6+90.

(4)

A3 := evalf(subs(x = 0, diff(w(x), x)))

1.*C1+1.*C3+1.*C5

(5)

A4 := evalf(subs(x = 1, diff(w(x), x)))

1.543080635*C1+1.175201194*C2+.5403023059*C3-.8414709848*C4+.5403023059*C5-.8414709848*C6

(6)

A5 := evalf(subs(x = 0, diff(w(x), x, x, x)))

1.*C1-1.*C3-1.*C5

(7)

A6 := evalf(subs(x = 1, diff(w(x), x, x, x)))

1.543080635*C1+1.175201194*C2-.5403023059*C3+.8414709848*C4-.5403023059*C5+.8414709848*C6

(8)

solve({A1, A2, A3, A4, A5, A6}, {C1, C2, C3, C4, C5, C6})

``

solve*{A5, A6, C1, C2, C3, C4, C5, C6, 1.*C2+1.*C4+1.*C6, 1.*C2*upsilon^2-1.*C4*kappa^2-1.*C6*varsigma^2, C1*sinh(upsilon)+C2*cosh(upsilon)+C3*sin(kappa)+C4*cos(kappa)+C5*sin(varsigma)+C6*cos(varsigma), C1*upsilon^2*sinh(upsilon)+C2*upsilon^2*cosh(upsilon)-1.*C3*kappa^2*sin(kappa)-1.*C4*kappa^2*cos(kappa)-1.*C5*varsigma^2*sin(varsigma)-1.*C6*varsigma^2*cos(varsigma)}

(9)

``

``

``


 

Download 4.mw

 

hi every body...

general solution of six order differential equation for example following equation

diff(w(x), x, x, x, x, x, x)+A*(diff(w(x), x, x, x, x))+B*(diff(w(x), x, x))+(-chi*omega^2+C)*w(x) = 0

is 

w := C1*sinh(upsilon*x)+C2*cosh(upsilon*x)+C3*sin(kappa*x)+C4*cos(kappa*x)+C5*sin(varsigma*x)+C6*cos(varsigma*x)

??

OR

w := C1*(cosh(upsilon*x)-sinh(upsilon*x))+C2*(cosh(upsilon*x)+sinh(upsilon*x))+C3*(cosh(kappa*x)-sinh(kappa*x))+C4*(cosh(kappa*x)+sinh(kappa*x))+C5*(cosh(varsigma*x)-sinh(varsigma*x))+C6*(cosh(varsigma*x)+sinh(varsigma*x))

or another form? is correct both of them or no??

please see maple attaced file.

please help me

thanks...

3.mw
 

restart; dsys3 := diff(w(x), x, x, x, x, x, x)+A*(diff(w(x), x, x, x, x))+B*(diff(w(x), x, x))+(-chi*omega^2+C)*w(x) = 0

diff(diff(diff(diff(diff(diff(w(x), x), x), x), x), x), x)+A*(diff(diff(diff(diff(w(x), x), x), x), x))+B*(diff(diff(w(x), x), x))+(-chi*omega^2+C)*w(x) = 0

(1)

dsol5 := dsolve(dsys3):

H := subs(36*B*A+108*chi*omega^2-108*C-8*A^3+12*sqrt(-12*A^3*chi*omega^2+81*chi^2*omega^4+54*A*B*chi*omega^2+12*A^3*C-3*A^2*B^2-162*C*chi*omega^2-54*A*B*C+12*B^3+81*C^2) = E, (4*I)*A^2*sqrt(3)-I*sqrt(3)*E^(2/3)-(12*I)*B*sqrt(3)-4*A^2-4*A*E^(1/3)-E^(2/3)+12*B = F, (4*I)*A^2*sqrt(3)-I*sqrt(3)*E^(2/3)-(12*I)*B*sqrt(3)+4*A^2+4*A*E^(1/3)+E^(2/3)-12*B = G, 4*A^2-2*A*E^(1/3)+E^(2/3)-12*B = S, rhs(dsol5))

 

_C1*exp(-(1/6)*3^(1/2)*(E^(1/3)*F)^(1/2)*x/E^(1/3))+_C2*exp((1/6)*3^(1/2)*(E^(1/3)*F)^(1/2)*x/E^(1/3))+_C3*exp(-(1/6)*(-3*E^(1/3)*G)^(1/2)*x/E^(1/3))+_C4*exp((1/6)*(-3*E^(1/3)*G)^(1/2)*x/E^(1/3))+_C5*exp(-(1/6)*6^(1/2)*(E^(1/3)*S)^(1/2)*x/E^(1/3))+_C6*exp((1/6)*6^(1/2)*(E^(1/3)*S)^(1/2)*x/E^(1/3))

(2)

convert(H, trig)

_C1*(cosh((1/6)*3^(1/2)*(E^(1/3)*F)^(1/2)*x/E^(1/3))-sinh((1/6)*3^(1/2)*(E^(1/3)*F)^(1/2)*x/E^(1/3)))+_C2*(cosh((1/6)*3^(1/2)*(E^(1/3)*F)^(1/2)*x/E^(1/3))+sinh((1/6)*3^(1/2)*(E^(1/3)*F)^(1/2)*x/E^(1/3)))+_C3*(cosh((1/6)*(-3*E^(1/3)*G)^(1/2)*x/E^(1/3))-sinh((1/6)*(-3*E^(1/3)*G)^(1/2)*x/E^(1/3)))+_C4*(cosh((1/6)*(-3*E^(1/3)*G)^(1/2)*x/E^(1/3))+sinh((1/6)*(-3*E^(1/3)*G)^(1/2)*x/E^(1/3)))+_C5*(cosh((1/6)*6^(1/2)*(E^(1/3)*S)^(1/2)*x/E^(1/3))-sinh((1/6)*6^(1/2)*(E^(1/3)*S)^(1/2)*x/E^(1/3)))+_C6*(cosh((1/6)*6^(1/2)*(E^(1/3)*S)^(1/2)*x/E^(1/3))+sinh((1/6)*6^(1/2)*(E^(1/3)*S)^(1/2)*x/E^(1/3)))

(3)

NULL

``


 

Download 3.mw

 

 

i wrote a procedure to  find some functions but at the end  of the procedure gives unexpected string error. i didn't find any way out.

Best regards. 

Download procedureA.mws

The DFT windowing functions in the SignalProcessing package seem to be inconsistent in the type of data they will accept, and the type they return.

BartlettHannWindow,  BlackmanHarrisWindow, BlackmanNuttallWindow,   BohmanWindow, CauchyWindow, CosineWindow, ExponentialWindow, FlatTopWindow,  GaussianWindow, HannPoissonWindow, ParzenWindow, PoissonWindow,  RectangleWindow, ReiszWindow, RiemannWindow, TaperedCosineWindow, TriangleWindow, TukeyWindow

accept Arrays, containing almost any data type (haven't tried them all!) as input. and always return a Vector[row].

But

BartlettWindow, BlackmanWindow, HammingWindow, HannWindow, KaiserWindow

require that the option datatype=float[8] be set in the Array() constructor, which is used as input and always return an hfarray.

Thus, for example

with(SignalProcessing);
sig:= Array( -50..50,
                        fill=1
                    ):
BartlettHannWindow(sig); # this works
BartlettWindow(sig);# this fails with datatype unsupported error

Very confusing!!!!

I am trying to solve the wave equation in polar coordinates.  The initial condition on u is given by f(r,theta) and the initial condition on u_t is zero.  The weight function is w(r).  I am not sure why it will not evaluate this as I know the solution remains finite on the domain (the unit disk).  Here is the code: 
 

Wave Equation in Polar Coordinates

restart; with(plots); addcoords(u_cylindrical, [u, r, theta], [r*cos(theta), r*sin(theta), u])

Example:

rho := 1; 1; c := 1; 1; w := proc (r) options operator, arrow; r end proc

1

 

1

 

proc (r) options operator, arrow; r end proc

(1)

f := proc (r, theta) options operator, arrow; 2.5*(1-r^2)*r*sin(theta) end proc

proc (r, theta) options operator, arrow; 2.5*(1-r^2)*r*sin(theta) end proc

(2)

assume('n', integer); 1; assume('m', integer)

lambda := proc (n, m) options operator, arrow; BesselJZeros(n, m)^2/rho^2 end proc;

proc (n, m) options operator, arrow; BesselJZeros(n, m)^2/rho^2 end proc

(3)

c0 := proc (m) options operator, arrow; (int(int(f(r, theta)*BesselJ(0, sqrt(lambda(0, m))*r)*w(r), theta = -Pi .. Pi), r = 0 .. rho))/(int(int(BesselJ(0, sqrt(lambda(0, m))*r)^2*w(r), theta = -Pi .. Pi), r = 0 .. rho)) end proc; 1; a := proc (n, m) options operator, arrow; (int(int(f(r, theta)*BesselJ(n, sqrt(lambda(n, m))*r)*cos(n*theta)*w(r), theta = -Pi .. Pi), r = 0 .. rho))/(int(int(BesselJ(n, sqrt(lambda(n, m))*r)^2*cos(n*theta)^2*w(r), theta = -Pi .. Pi), r = 0 .. rho)) end proc; 1; b := proc (n, m) options operator, arrow; (int(int(f(r, theta)*BesselJ(n, sqrt(lambda(n, m))*r)*sin(n*theta)*w(r), theta = -Pi .. Pi), r = 0 .. rho))/(int(int(BesselJ(n, sqrt(lambda(n, m))*r)^2*sin(n*theta)^2*w(r), theta = -Pi .. Pi), r = 0 .. rho)) end proc

proc (m) options operator, arrow; (int(int(f(r, theta)*BesselJ(0, sqrt(lambda(0, m))*r)*w(r), theta = -Pi .. Pi), r = 0 .. rho))/(int(int(BesselJ(0, sqrt(lambda(0, m))*r)^2*w(r), theta = -Pi .. Pi), r = 0 .. rho)) end proc

 

proc (n, m) options operator, arrow; (int(int(f(r, theta)*BesselJ(n, sqrt(lambda(n, m))*r)*cos(n*theta)*w(r), theta = -Pi .. Pi), r = 0 .. rho))/(int(int(BesselJ(n, sqrt(lambda(n, m))*r)^2*cos(n*theta)^2*w(r), theta = -Pi .. Pi), r = 0 .. rho)) end proc

 

proc (n, m) options operator, arrow; (int(int(f(r, theta)*BesselJ(n, sqrt(lambda(n, m))*r)*sin(n*theta)*w(r), theta = -Pi .. Pi), r = 0 .. rho))/(int(int(BesselJ(n, sqrt(lambda(n, m))*r)^2*sin(n*theta)^2*w(r), theta = -Pi .. Pi), r = 0 .. rho)) end proc

(4)

u := proc (n, m, r, theta, t) options operator, arrow; sum(BesselJ(0, sqrt(lambda(0, j))*r)*c0(j)*cos(sqrt(lambda(0, j))*c*t), j = 1 .. m)+sum(sum(BesselJ(i, sqrt(lambda(i, j))*r)*(a(i, j)*cos(i*theta)+b(i, j)*sin(i*theta))*cos(sqrt(lambda(i, j))*c*t), j = 1 .. m), i = 1 .. n) end proc

proc (n, m, r, theta, t) options operator, arrow; sum(BesselJ(0, sqrt(lambda(0, j))*r)*c0(j)*cos(sqrt(lambda(0, j))*c*t), j = 1 .. m)+sum(sum(BesselJ(i, sqrt(lambda(i, j))*r)*(a(i, j)*cos(i*theta)+b(i, j)*sin(i*theta))*cos(sqrt(lambda(i, j))*c*t), j = 1 .. m), i = 1 .. n) end proc

(5)

soln := evalf(u(3, 3, r, theta, t));

(Float(infinity)+Float(infinity)*I)*BesselJ(1., 3.831705970*r)*sin(theta)*cos(3.831705970*t)+(Float(infinity)+Float(infinity)*I)*BesselJ(1., 7.015586670*r)*sin(theta)*cos(7.015586670*t)+(Float(infinity)+Float(infinity)*I)*BesselJ(1., 10.17346814*r)*sin(theta)*cos(10.17346814*t)-0.3676566232e-9*BesselJ(2., 5.135622302*r)*sin(2.*theta)*cos(5.135622302*t)-0.1879633956e-10*BesselJ(2., 8.417244140*r)*sin(2.*theta)*cos(8.417244140*t)-0.5146823927e-10*BesselJ(2., 11.61984117*r)*sin(2.*theta)*cos(11.61984117*t)+(Float(infinity)+Float(infinity)*I)*BesselJ(3., 6.380161896*r)*sin(3.*theta)*cos(6.380161896*t)+(Float(infinity)+Float(infinity)*I)*BesselJ(3., 9.761023130*r)*sin(3.*theta)*cos(9.761023130*t)+(Float(infinity)+Float(infinity)*I)*BesselJ(3., 13.01520072*r)*sin(3.*theta)*cos(13.01520072*t)

(6)

plot3d(soln, r = 0 .. 1, theta = 0 .. 2*Pi, coords = u_cylindrical, axes = boxed)

NULL

NULL


 

Download Section_6.3.mw

Any assistance would be greatly appreciated. 

Hallo

I'm trying to plot several periods of this 2π-periodic function f (x) = 3x, x ∈]-π; π] with the following code which I got from an older post.

However, when using uneven multipla of PI as x it just gives me a verticle line. Can anyone shed some light to this or perhaps give a better solution?

Thanks in advance

Best regards

Thomas

 

 

In paper of Nail H. Ibragimov there is operator given at equation 2.10 which he call by name Euler-Lagrange operator. How I can use this operator in Maple to derive adjoint equations ?
I have attached JPEG in which I want to apply this operator to Lagrange identity "I" for adjoint equations.

I have to generate a code for carrying out the matrix form of the revised simplex method. I have a code in place but am struggling to convert the constraints into canonical form and introduce the penalty function. If anyone has any ideas I'd be very grateful!

Best Regards

Hello everyone,

The problem resides in the argument "l" (small l) in the function "ratio", more precisely in the function "expi" then "riskexpjs" then in "ratio", so after try-outs I noticed that, then maple couldn't execute the function plot as decribed in the script.

Best regards,

Hi,

I am trying to animate a ”shadow” on an object in Maple. I have parametrized the following surface

P:=(u,v)->[u,v,-(u^2+v^2)]

and the “sun”

Sun:=t->[5*cos(t),0,5*sin(t)]

Ant thus evaluating the “shadow” to be where the dotproduct

NP.Nsun

Is less the zero, i.e NP.Nsun<0. Where I get the following:

Sha(u,v,t):=-(2*u*cos(t))/sqrt(4*u^2+4*v^2+1)-sin(t)/sqrt(4*u^2+4*v^2+1)

My question is now, am I able to animate the shadow in a likewise manner as shown below

Animate( plot3d, [P(u,v),v=a..b,u=c..d,color=[f(u,v,t)<0]],t=0..T)?

thus using an implicit function as a colorfunction?

I have to prove the following:

So I do not need the explicit derivative of the function Psi(r,t) . The metric is:

ds^2=(1-rg/r)*dt^2-(1-rg/r)^(-1)*dr^2

I am in the case of a collapsing star that emit radiation during the collapsing.  And I do not need to have a rotating black hole so that the reason I dont have dt*dr term in the metric, and I fix theta and phi.  So if you look in the Maple file attach to this post, I don't manage to obtain what I need to prove the equality between the two aspect of the same calculation.

Plese, take into account that I am sort of novice with the Physcis package and that the question is not part of an exam.

Thank you in advance for your help. 

Mario Lemelin

dAlembertian.mw

 

 

I am trying to apply window functions from the SignalProcessing package to arrays. However, some window functions (e.g. Hann) appear to operate on a [0..N-1] index basis, others (e.g. Welch) work on [1..N].

I don't know how to make the latter ones work correctly, since after applying the windowing function the first entry in the array is not zero, as it should be.

Best regards

First 1016 1017 1018 1019 1020 1021 1022 Last Page 1018 of 2216