MaplePrimes Questions

A polynomial divided by another polynomial of lower degree. I want to find the remainder and quotient. How do I get.

The question is what should I add to the numerator get perfect division when x-3 x  -12 x+19 is divided by x2+x-6.

I shd get the answer as 2x+5 to be added since the remainder is -2x-5.   (Note that x-3 x  -10 x+24 is excatly divided by 2+x-6.

Can any one state the code to get the answer.

Quotient ( ) and Remainder (  ) codes , i tried, donot know how to use them.

Thanks for help. Cheers. RK


I'm using Maple 2021, and my Euler-Lagrange equation is coming out with a R[0] term that should not be there. I want to know what is causing this error and how I can fix it.

restartNULL

Lagrangian

 

Leq := (1/2)*R^2*[-cosh(rho1(tau)^2)*(diff(t(tau), tau))^2+(diff(rho1(tau), tau))^2+sinh(rho1(tau)^2)*(diff(theta1(tau), tau))^2]+(1/2)*R^2*[-cosh(rho2(tau)^2)*(diff(t(tau), tau))^2+(diff(rho2(tau), tau))^2+sinh(rho2(tau)^2)*(diff(theta2(tau), tau))^2]-(1/2)*k*rho1(tau)^2-(1/2)*k*rho2(tau)^2-(1/2*(tanh(rho2(tau)-rho1(tau))+1))*(rho2(tau)-rho1(tau))^2; L := subs({diff(rho1(tau), tau) = var4, diff(rho2(tau), tau) = var6, diff(t(tau), tau) = var2, diff(theta1(tau), tau) = var8, diff(theta2(tau), tau) = var10, rho1(tau) = var3, rho2(tau) = var5, t(tau) = var1, theta1(tau) = var7, theta2(tau) = var9}, Leq)

(1/2)*R^2*[-cosh(rho1(tau)^2)*(diff(t(tau), tau))^2+(diff(rho1(tau), tau))^2+sinh(rho1(tau)^2)*(diff(theta1(tau), tau))^2]+(1/2)*R^2*[-cosh(rho2(tau)^2)*(diff(t(tau), tau))^2+(diff(rho2(tau), tau))^2+sinh(rho2(tau)^2)*(diff(theta2(tau), tau))^2]-(1/2)*k*rho1(tau)^2-(1/2)*k*rho2(tau)^2-(1/2)*(-tanh(-rho2(tau)+rho1(tau))+1)*(rho2(tau)-rho1(tau))^2

(1.1)

Time Equation

 

epr11 := diff(L, var2); epr12 := diff(L, var1); epr13 := subs({var1 = t(tau), var10 = diff(theta2(tau), tau), var2 = diff(t(tau), tau), var3 = rho1(tau), var4 = diff(rho1(tau), tau), var5 = rho2(tau), var6 = diff(rho2(tau), tau), var7 = theta1(tau), var8 = diff(theta1(tau), tau), var9 = theta2(tau)}, epr11); epr14 := subs({var1 = t(tau), var10 = diff(theta2(tau), tau), var2 = diff(t(tau), tau), var3 = rho1(tau), var4 = diff(rho1(tau), tau), var5 = rho2(tau), var6 = diff(rho2(tau), tau), var7 = theta1(tau), var8 = diff(theta1(tau), tau), var9 = theta2(tau)}, epr12); epr15 := diff(epr13, tau); teq := epr15-epr14 = 0

2*R*[0]+(1/2)*R^2*[-4*rho1(tau)*(diff(rho1(tau), tau))*sinh(rho1(tau)^2)*(diff(t(tau), tau))-2*cosh(rho1(tau)^2)*(diff(diff(t(tau), tau), tau))]+(1/2)*R^2*[-4*rho2(tau)*(diff(rho2(tau), tau))*sinh(rho2(tau)^2)*(diff(t(tau), tau))-2*cosh(rho2(tau)^2)*(diff(diff(t(tau), tau), tau))] = 0

(2.1)

NULL


 

Download Maple_Help_Example.mw

 

Dear All,

I'm wondering if there is a simple way to define, given a "module" that protects "e" as a global, to allow the user to write e[0], e[1], e[2], e[3], e[inf] such that I calculate with e[4] but I display e[inf]. And if I type in e[inf], it translates behind the curtain of the module e[inf] into e[4] such that I keep my indexes 0-4 for the handling of my entities.

I hope I made myself understood ;)

I was woundering if there is some way with the standard "TypeSetting Module" ?

Sincerely

Ivar 

How can I achieve something like this (i.e. an output in a worksheet)?

It is important that the variables of the lables match the columns.

In the attached file is a typical dataset. A display of row lables would be optional.

Context: Easier interpretation (of the structure) of a Jacobian and subsequent manual solving the equations of interest that correspond to the rows.

 

Labels_for_sparse.mw

Hi!

I would like Maple to show the full solution method to this pde.  How do I do this?

 

Show_Solution_to_NLPDE.mw

Hello my friends
Please help me solve the integration problem in the attached Maple code below (why was the integration not done in u[4]?) ... Thank you very much

``

u[1] :=  1/3*t^3*x + 2*t*x + (-1)*0.7522527780*t^(3/2)*x + (-1)*0.1719434922*t^(7/2)*x + (-1)*0.01587301587*t^7*x + (-1)*0.1333333333*t^5*x

(1/3)*t^3*x+2*t*x-.7522527780*t^(3/2)*x-.1719434922*t^(7/2)*x-0.1587301587e-1*t^7*x-.1333333333*t^5*x

(1)

u[2] := subs(t=Tau,u[1]);

(1/3)*Tau^3*x+2*Tau*x-.7522527780*Tau^(3/2)*x-.1719434922*Tau^(7/2)*x-0.1587301587e-1*Tau^7*x-.1333333333*Tau^5*x

(2)

u[3]:= int(u[2],Tau = 0 .. t);

t^2*x+0.8333333333e-1*t^4*x-0.2222222222e-1*t^6*x-0.1984126984e-2*t^8*x-.3009011112*t^(5/2)*x-0.3820966493e-1*x*t^(9/2)

(3)

u[4]:= int((t-Tau)^(-0.5)*u[2],Tau = 0 .. t);

int(((1/3)*Tau^3*x+2*Tau*x-.7522527780*Tau^(3/2)*x-.1719434922*Tau^(7/2)*x-0.1587301587e-1*Tau^7*x-.1333333333*Tau^5*x)/(t-Tau)^.5, Tau = 0 .. t)

(4)

``

Download help.mw

When displaying two tubeplots together, we may specify their colors at will, as long as they are different colors!  For instance, specifying red and green works correctly, but specifying red and red results in red and black!

See the attached worksheet.  Interestingly, when displaying the contents of the worksheet on this website, the colors are rendered correctly!  So don't go with what you see on this web page; look inside the worksheet instead.

restart;

kernelopts(version);

`Maple 2022.1, X86 64 LINUX, May 26 2022, Build ID 1619613`

with(plots):

Two intersecting tori colored red and green -- works as expected:

display(
        tubeplot([cos(t), 0, sin(t)], t=-Pi..Pi, radius=0.2),
        tubeplot([cos(t), sin(t), 0], t=-Pi..Pi, radius=0.2),
style=surface, color=[red,green]);

When we set both colors to red, one of the surfaces is painted black!  Why?

Please note: This website displays the colors corectly as red and red.  But

within the worksheet the colors are read and black.

display(
        tubeplot([cos(t), 0, sin(t)], t=-Pi..Pi, radius=0.2),
        tubeplot([cos(t), sin(t), 0], t=-Pi..Pi, radius=0.2),
style=surface, color=[red,red]);

Specifying colors as red/red within the tubeplots still produces red/black!

display(
        tubeplot([cos(t), 0, sin(t)], t=-Pi..Pi, radius=0.2, color=red),
        tubeplot([cos(t), sin(t), 0], t=-Pi..Pi, radius=0.2, color=red),
style=surface);

Download mw.mw

PS: As a workaround, we may replace the red & red specification with
COLOR(RGB, 1, 0, 0) and
COLOR(RGB, 1, 0, 0.01)
which are different enough to make Maple happy, but produce essentially the same red color.

Hello everyone,

I am trying to solve a simple nonlinear 4 variable function with NLPsolve giving real values ranges for the variables but the NLPsolve gives "non numerical" result. Find attached the worksheet.CoreOptimization.mw

Am I doing something wrong?

Regards,

Cata

I have a mixture function of power fractional along with natural log, where both contain x variable. Can I use Maple to extract the x variable to one side of the formula?

What is the correct way to write the explicit solution before calling odetest to verify it on an ode? is it

   sol:= y(x)= the RHS  (1)

or

   sol:= y(x) - the RHS = 0 (2)

I am asking because Maple sometimes gives very different result from odetest depending on which form the explicit solution is written. It is very hard to keep trying different forms each time.  Here is an example below.

Maple 2022.1 on windows 10.   Is this a bug? I do not think it should  make a difference, but it does and I have no idea why. Is there an option or way to make sure the same result is obtained each time regardless how the explicit soltion is written?

I have a theory as to why this might happen: When using (1) odetest sees y(x) on the LHS on its own, and then uses odetest  code internally designed for explicit solution testing.

When using (2), it sees y(x) not on its own on the LHS and it assumes this is then an implicit solution and uses odetest code internally meant for implicit solution testing, hence the difference in output.
 

restart;

ode:=sqrt(y(x))+(1+x)*diff(y(x),x)=0:
ic:=y(0) = 1:
mysol:=y(x)=1/4*(ln(1+x)-2)^2:
odetest(mysol,ode);

csgn(ln(1+x)-2)*ln((1+x)^(1/2))-csgn(ln(1+x)-2)+ln((1+x)^(1/2))-1

odetest((lhs-rhs)(mysol) = 0,ode);

y(x)^(1/2)+(1/2)*ln(1+x)-1

 

 


 

Download why_different_result.mw

Any way to write a function to get a RandomPlanar connected graph

That I have function say RandomPlanar(n,m) where n is the number of vertices and m is optional parameter and is the number of edges 

How to find if all the rows in a matrix are unique and return true if unique and false if not

That is their are no duplicate rows 

Also without another post 

If given two matricies A and B how to find if they are same like what i mean is as equal here is

A and B have the same rows but they may be in rows can be jumbled imples

A:=Matrix(3, 3, [[1, 2, 3], [3, 2, 1], [4, 6, 5]])

B:=Matrix(3, 3, [[3, 2, 1], [1, 2, 3], [4, 6, 5]])

They have the same rows exactly but in jumbled order then I say they are equal then return true. 

That is i have function RowEqual(A,B) gives TRUE if same by above condition and FALSE is not

Maple 2021.
I expect after exporting to pdf view of page with plot like on fig. 1.

It means with font=[TIMES, ROMAN, 12] as in maine text.
But I obtaned this view of page on pdf (fig. 2) with smaller font-size.

In previouse versions there are no the problem like this.
Dear community, how to fix this annoying inconvenience?

 fig. 1.  fig. 2.

What I want to achieve with a command is the following image, in which the elements of a matrix that are not zero are displayed in black

This can be accomplished with the Browse Matrix Dialouge, but I want to make such images part of the worksheet. (Display of the full matrix is important.)
Context: Re-execution of worksheets will allow for quick verification of changes in Jacobians.

I have a closed curve(parameterized by t) with self intersection and I'd like to locate the x-y coordinates of the intersection. fslolve only returns 1 intersection. I've tried to use a finite step method but it is way to slow even with rough stepping and becomes very inaccurate. Does maple have anything built in to handle this?

First 16 17 18 19 20 21 22 Last Page 18 of 2154