Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

I am trying to evaluate the following function for which I am getting a result 0. I just need to make sure the approach as well as result is correct or not. Thanks in advance. 
 

restart; Digits := 20; r := 5; Z := 0; KK := proc (phi) options operator, arrow; evalf(int(sin(phi)*sin(-arctan((p*cos(phi)+Z)/sqrt(p^2*sin(phi)^2+r^2)))*hypergeom([5/2, 3/2], [5/2], sin(-arctan((p*cos(phi)+Z)/sqrt(p^2*sin(phi)^2+r^2)))^2)/(p^2*sin(phi)^2+r)^2, p = -1 .. 1, numeric)) end proc; evalf(KK((1/6)*Pi))

0.

(1)

``


 

Download int(maple_prime).mw

I did change of variables as below:

 


 

``

restart

Error, invalid input: with expects its 1st argument, pname, to be of type {`module`, package}, but received shareman

 

``

UP := Int(1/2*(K__ux0*u0(x, y, t)^2+K__vx0*v0(x, y, t)^2+K__wx0*w0(x, y, t)^2+`K__φx0`*phi(x, y, t)^2+`K__ψx0`*psi(x, y, t)^2), y = 0 .. b)+Int(1/2*(K__uxa*u0(x, y, t)^2+K__vxa*v0(x, y, t)^2+K__wxa*w0(x, y, t)^2+`K__φxa`*phi(x, y, t)^2+`K__ψxa`*psi(x, y, t)^2), y = 0 .. b)+Int(1/2*(K__uy0*u0(x, y, t)^2+K__vyb*v0(x, y, t)^2+K__wyb*w0(x, y, t)^2+`K__φyb`*phi(x, y, t)^2+`K__ψy0`*psi(x, y, t)^2), x = 0 .. a)+Int(1/2*(K__uyb*u0(x, y, t)^2+K__vyb*v0(x, y, t)^2+K__wyb*w0(x, y, t)^2+`K__φyb`*phi(x, y, t)^2+`K__ψyb`*psi(x, y, t)^2), x = 0 .. a):

varchange := {t = a*tau*sqrt(rho/A__ref), x = (1/2)*a*(Zeta+1), y = (1/2)*b*(eta+1), phi(x, y, t) = h*`#mover(mi("φ",fontstyle = "normal"),mo("&uminus0;"))`(Zeta, eta, tau), psi(x, y, t) = h*`#mover(mi("ψ",fontstyle = "normal"),mo("&uminus0;"))`(Zeta, eta, tau), u0(x, y, t) = h*`#mover(mi("u"),mo("&uminus0;"))`(Zeta, eta, tau), v0(x, y, t) = h*`#mover(mi("v"),mo("&uminus0;"))`(Zeta, eta, tau), w0(x, y, t) = h*`#mover(mi("w"),mo("&uminus0;"))`(Zeta, eta, tau)}:

``

Ut := PDEtools:-dchange(varchange, UP, [`#mover(mi("u"),mo("&uminus0;"))`, `#mover(mi("v"),mo("&uminus0;"))`, `#mover(mi("w"),mo("&uminus0;"))`, `#mover(mi("φ",fontstyle = "normal"),mo("&uminus0;"))`, `#mover(mi("ψ",fontstyle = "normal"),mo("&uminus0;"))`, Zeta, eta, tau], params = [a, b, rho, A__ref]):

Ut

Int((1/2)*((1/2)*K__ux0*h^2*`#mover(mi("u"),mo("&uminus0;"))`(Zeta, eta, tau)^2+(1/2)*K__vx0*h^2*`#mover(mi("v"),mo("&uminus0;"))`(Zeta, eta, tau)^2+(1/2)*K__wx0*h^2*`#mover(mi("w"),mo("&uminus0;"))`(Zeta, eta, tau)^2+(1/2)*`K__φx0`*h^2*`#mover(mi("φ",fontstyle = "normal"),mo("&uminus0;"))`(Zeta, eta, tau)^2+(1/2)*`K__ψx0`*h^2*`#mover(mi("ψ",fontstyle = "normal"),mo("&uminus0;"))`(Zeta, eta, tau)^2)*b, eta = -1 .. 1)+Int((1/2)*((1/2)*K__uxa*h^2*`#mover(mi("u"),mo("&uminus0;"))`(Zeta, eta, tau)^2+(1/2)*K__vxa*h^2*`#mover(mi("v"),mo("&uminus0;"))`(Zeta, eta, tau)^2+(1/2)*K__wxa*h^2*`#mover(mi("w"),mo("&uminus0;"))`(Zeta, eta, tau)^2+(1/2)*`K__φxa`*h^2*`#mover(mi("φ",fontstyle = "normal"),mo("&uminus0;"))`(Zeta, eta, tau)^2+(1/2)*`K__ψxa`*h^2*`#mover(mi("ψ",fontstyle = "normal"),mo("&uminus0;"))`(Zeta, eta, tau)^2)*b, eta = -1 .. 1)+Int((1/2)*((1/2)*K__uy0*h^2*`#mover(mi("u"),mo("&uminus0;"))`(Zeta, eta, tau)^2+(1/2)*K__vyb*h^2*`#mover(mi("v"),mo("&uminus0;"))`(Zeta, eta, tau)^2+(1/2)*K__wyb*h^2*`#mover(mi("w"),mo("&uminus0;"))`(Zeta, eta, tau)^2+(1/2)*`K__φyb`*h^2*`#mover(mi("φ",fontstyle = "normal"),mo("&uminus0;"))`(Zeta, eta, tau)^2+(1/2)*`K__ψy0`*h^2*`#mover(mi("ψ",fontstyle = "normal"),mo("&uminus0;"))`(Zeta, eta, tau)^2)*a, Zeta = -1 .. 1)+Int((1/2)*((1/2)*K__uyb*h^2*`#mover(mi("u"),mo("&uminus0;"))`(Zeta, eta, tau)^2+(1/2)*K__vyb*h^2*`#mover(mi("v"),mo("&uminus0;"))`(Zeta, eta, tau)^2+(1/2)*K__wyb*h^2*`#mover(mi("w"),mo("&uminus0;"))`(Zeta, eta, tau)^2+(1/2)*`K__φyb`*h^2*`#mover(mi("φ",fontstyle = "normal"),mo("&uminus0;"))`(Zeta, eta, tau)^2+(1/2)*`K__ψyb`*h^2*`#mover(mi("ψ",fontstyle = "normal"),mo("&uminus0;"))`(Zeta, eta, tau)^2)*a, Zeta = -1 .. 1)

(1)

simplify(Ut)

(1/4)*(b*(Int(K__ux0*`#mover(mi("u"),mo("&uminus0;"))`(Zeta, _a, tau)^2+K__vx0*`#mover(mi("v"),mo("&uminus0;"))`(Zeta, _a, tau)^2+K__wx0*`#mover(mi("w"),mo("&uminus0;"))`(Zeta, _a, tau)^2+`K__φx0`*`#mover(mi("φ",fontstyle = "normal"),mo("&uminus0;"))`(Zeta, _a, tau)^2+`K__ψx0`*`#mover(mi("ψ",fontstyle = "normal"),mo("&uminus0;"))`(Zeta, _a, tau)^2, _a = -1 .. 1))+b*(Int(K__uxa*`#mover(mi("u"),mo("&uminus0;"))`(Zeta, _a, tau)^2+K__vxa*`#mover(mi("v"),mo("&uminus0;"))`(Zeta, _a, tau)^2+K__wxa*`#mover(mi("w"),mo("&uminus0;"))`(Zeta, _a, tau)^2+`K__φxa`*`#mover(mi("φ",fontstyle = "normal"),mo("&uminus0;"))`(Zeta, _a, tau)^2+`K__ψxa`*`#mover(mi("ψ",fontstyle = "normal"),mo("&uminus0;"))`(Zeta, _a, tau)^2, _a = -1 .. 1))+a*(Int(K__uy0*`#mover(mi("u"),mo("&uminus0;"))`(_a, eta, tau)^2+K__vyb*`#mover(mi("v"),mo("&uminus0;"))`(_a, eta, tau)^2+K__wyb*`#mover(mi("w"),mo("&uminus0;"))`(_a, eta, tau)^2+`K__φyb`*`#mover(mi("φ",fontstyle = "normal"),mo("&uminus0;"))`(_a, eta, tau)^2+`K__ψy0`*`#mover(mi("ψ",fontstyle = "normal"),mo("&uminus0;"))`(_a, eta, tau)^2, _a = -1 .. 1)+Int(K__uyb*`#mover(mi("u"),mo("&uminus0;"))`(_a, eta, tau)^2+K__vyb*`#mover(mi("v"),mo("&uminus0;"))`(_a, eta, tau)^2+K__wyb*`#mover(mi("w"),mo("&uminus0;"))`(_a, eta, tau)^2+`K__φyb`*`#mover(mi("φ",fontstyle = "normal"),mo("&uminus0;"))`(_a, eta, tau)^2+`K__ψyb`*`#mover(mi("ψ",fontstyle = "normal"),mo("&uminus0;"))`(_a, eta, tau)^2, _a = -1 .. 1)))*h^2

(2)

``

``


 

Download simplifyss.mw

 

But I amezed when I use simplify command deteriorate my eq.

 

Why?

UPDATE

Thanks for checking. I verify I get the error and made screen shots below

When I add the convert() command, the error goes away. Here is screen shot

 

I am using Maple 2017, student version, on windows 7, 64 bit, home edition.

 

Original post

This is using Maple 2017 on windows.

With the following input, Maple pdsolve gives an error

pde:=diff(u(x,t),t)=k*diff(u(x,t),x$2);
bc:=D[1](u)(0,t)=0,D[1](u)(L,t)=0:
assume(L>0):
ic:=u(x,0)=piecewise(0<x and x<=L/2,0,L/2<x and x<L,1):
sol:=pdsolve([pde,bc,ic],u(x,t)):

However, if I add one line to convert the piecewise function above to piecewise, then pdsolve no longer gives an error. So the following input works

restart;
pde:=diff(u(x,t),t)=k*diff(u(x,t),x$2);
bc:=D[1](u)(0,t)=0,D[1](u)(L,t)=0:
assume(L>0):
ic:=u(x,0)=piecewise(0<x and x<=L/2,0,L/2<x and x<L,1):
ic:=convert(ic,piecewise,x):
sol:=pdsolve([pde,bc,ic],u(x,t)):

 

Notice the extra line. Why does one have to convert piecewise to piecewise to make pdsolve accept the input?

sorry did not write down the error message and I am writing this from school library PC. But if you try the first case, you'll see the error.

 

Hi! I have the system of differential equations

restart; with(plots); with(DEtools);

a := 1;

deq1 := u(s)*(diff(varphi(s), s, s))+2*(diff(u(s), s))*(diff(varphi(s), s))+sin(varphi(s)) = 0;

deq2 := diff(u(s), s, s)-u(s)*(diff(varphi(s), s))^2-cos(varphi(s))+a*(u(s)-1) = 0;

sol := dsolve({deq1, deq2, u(0) = 1, varphi(0) = (1/4)*Pi, (D(u))(0) = 0, (D(varphi))(0) = 0}, {u(s), varphi(s)}, numeric)

 

which is perfectly solved, but I need to convert it to Cartesian coordinates and draw a plot, so what I tried is

x := u(s)*sin(varphi(s));

y := -u(s)*cos(varphi(s));

plot([x, y, s = 0 .. 20])

 

But I'm getting an error "Warning, expecting only range variable s in expressions [u(s)*sin(varphi(s)), -u(s)*cos(varphi(s))] to be plotted but found names [u, varphi]"

I don't know why is this happens if I have a solution. For example, I can get solution for 2 seconds:

sol(2)

[s = 2., u(s) = 2.33095721668252, diff(u(s), s) = 1.02513293353371, varphi(s) = .213677391510693, diff(varphi(s), s) = -.242430995691885]

 

I posted my question at here https://math.stackexchange.com/questions/2314488/how-can-i-find-maximum-and-minimum-modulus-of-a-complex-number.
With Mathematica, I got min is 22/5. This result is different from my solution by hand.

Repeat my problem. Let be the number z so that $|z+1| + 4|z-1| = 25$. Find the greastest and the least of the modulus of $z$. How can I find greastest and the least of modulus of z with Maple.

How can we find ricci tensor of a metric attaced in given file that involve two unknown functions phi(r) and nu(r).metric.mw

i have an optimization problem, i want to maximize an expression using assumption, what should i do?


 

restart:with(Optimization):

M1:=Matrix((1,4),[sqrt(p),0,0,sqrt(1-p)]);

M1 := Matrix(1, 4, {(1, 1) = p^(1/2), (1, 2) = 0, (1, 3) = 0, (1, 4) = (1-p)^(1/2)})

(1)

M2:=Matrix((1,4),[cos(theta[1])*cos(theta[2]),exp(I*phi[1])*sin(theta[1])*cos(theta[2]),exp(I*phi[2])*sin(theta[2])*cos(theta[1]),exp(I*(phi[1]+phi[2]))*sin(theta[1])*sin(theta[2])])^+;

M2 := Matrix(4, 1, {(1, 1) = cos(theta[1])*cos(theta[2]), (2, 1) = exp(I*phi[1])*sin(theta[1])*cos(theta[2]), (3, 1) = exp(I*phi[2])*sin(theta[2])*cos(theta[1]), (4, 1) = exp(I*(phi[1]+phi[2]))*sin(theta[1])*sin(theta[2])})

(2)

#Real:=rhs(op(op(2,Re(M1.M2))));

PP:=Re(M1.M2)(1,1);

Re(p^(1/2)*cos(theta[1])*cos(theta[2])+(1-p)^(1/2)*exp(I*(phi[1]+phi[2]))*sin(theta[1])*sin(theta[2]))

(3)

maximize(PP) assuming 0<p ,p<1;

Error, (in assuming) when calling 'maximize'. Received: 'invalid input: `minimize/continuous` expects its 2nd argument, yFP, to be of type {name, list(name)}, but received `theta[1]` = -infinity'

 

 


 

Download optimize.mw

I have final project to make a media for learning mathematic using maple. But I'm so confused to make a net of cuboid, anybody can help me? please :D

It is evident that by repeated applications of the double-angle and product trigonometric identities, one may transform any monomial of the form sin(x)^p * cos(y)^q, where p and q are positive integers, to a linear combination of only first powers of sines and cosines.

Example 1:  The monomial  4*sin(x)*cos(y)^2 is equivalent to

 

Example 2: The monomial 16*sin(x)^2*cos(y)^3 is equivalent to             

How does one write a Maple procedure to do that transformation in the general case of sin(x)^p * cos(y)^q?

 

Dear All,

Please, could anyone point me out how to draw the beautiful Apollonian Gasket using Maple?

Thank you.

Very kind wishes,

Wang Zhe

We just posted a submission to the Maple Application Center that I thought people might be interested in. Mathematics for Chemistry isn't a typical application - it's an e-book, written in Maple by J.F. Ogilvie. It covers both standard mathematics topics chemistry students are expected to know,  such as calculus and linear algebra, as well as chemistry-specific topics like chemical equilbrium, quantum chemistry, and nuclear-magnetic-resonance spectra.

There's lots of interesting content on the Application Center, and the range of topics is always fascinating, but it's not every day I see an entire e-book come across my desk(top)!

If you are interested, you can find it on the Application Center, here: Mathematics for Chemistry

eithne

Hello!

I crwated a polyhedron from by grouping vertices to faces, and faces to a shell. My goal is to convert the obtained object into a polyhedron, which behaves similarly as e.g. Archimedean solids generated by Maple. Is it possible? Thank you in advance!

Bests,

Andrzej

hello. how can i solve this integral. thank you

I have an update below

I am student, and bought Maple student version 2017 and went through verification and activation with no probems and been using Maple for number of days.

But few days ago, I disconnected my internet service provider, and so now I have no access to the internet from my home PC where I installed Maple (I am writing this from  library)

Now at home, when I start Maple, I get a message saying that my licence will expire in 10 or 9  days or so. I do not understand this messge. Why it comes up now and did not come up before when I had internet access? 

Does one need to be connected to the internet all the time to use Maple? What if one does not have internet access?

I did remove one monitor from my PC also. Do you think Maple detected change in PC (one less monitor) and now it thinks this is new PC? But this makes no sense.

How do I tell Maple I have activated my Maple if I do not have internet access?

Update

After installing Maple 2017.1, now each time I disconnect from the internet, I am not able to start Maple !  I get this error

 

When I connect to the internet and try again, Maple comes up OK and it works. (it does NOT ask me to activate). I have allready activated OK before. This message only comes up when I am not connected to the internet.

This tells me Maple is trying to connect to the internet each time for some reason to verify my installation? But when if I do not want to be connected to the internet and still use Maple?

I never installed beta Maple or anything like this before. What to do to make Maple start without being connected to the internet? I did not change my PC.

 

 

While preparing for a recent webinar, I ran across something that didn't behave the same way in Maple 2017 as it did in previous releases. In particular, it was the failure of the over-dot notation for t-derivatives to display with the over-dot. Turns out that this is due to a change in behavior of typesetting that was detailed in the What's New page for Maple 2017, a page I had looked at many times in the last few months, but apparently didn't comprehend fully. The details are below.

Prior to Maple 2017, under the aegis of extended typesetting, the following two lines of code would alert Maple that the over-dot notation for t-derivatives should be used in the output display.

However, this changed in Maple 2017. Extended typesetting is now the default, but these two lines of code are no longer sufficient to induce Maple to display the over-dot in output. Indeed, we would now have

as output. The change is documented in the following paragraph

lifted from the help page 

Thus, it now takes the additional command

to induce Maple to display the over-dot notation in output.

I must confess that, even though I pored over the "What's New" pages for Maple 2017, I completely missed the import of this change to typesetting. I stumbled over the issue while preparing for an upcoming webinar, and frantically sent out help calls to the developers back in the building. Fortunately, I was quickly set straight on the matter, but was disappointed in my own reading of all the implications of the typesetting changes in Maple 2017. So perhaps this note will alert other users to the changes, and to the help page wherein one finds those essential bits of information needed to complete the tasks we set for ourselves.

And one more thing - I was cautioned that the "= true" was essential. Without it, the command would act as a query, echoing the present state of the setting, and not making the desired change to the setting.
 

First 946 947 948 949 950 951 952 Last Page 948 of 2215