MaplePrimes Questions

Hi senior, I am using Maple 2022 version. I am facing a issue regrading opening of maple worksheet. If connected with wifi then maple worksheet will open and work properly, while i disconnected the internet, maple crashed and pop up a message to activate license again..

How do we truncate a polynomial in Maple, that is, obtain only the terms of degree <= n?

For example, if 

P(x)=x^2+2*x^3+x^6

then the truncation [P(x)]4 is

P(x)=x^2+2*x^3

and the truncation [P(x)]is

P(x)=x^2

dAlmbert ode has the form

 

Also from Maple own help page, it agrees with Wikipedia and says:

 

Now, given this ode

ode:=y(x)=ln(cos(diff(y(x),x)))+diff(y(x),x)*tan(diff(y(x),x));
eval(ode,diff(y(x),x)=p)

Then clearly the above is not dAlmbert. Right? it is missing the x. But odeadvisor says it is:

restart;
ode:=y(x)=ln(cos(diff(y(x),x)))+diff(y(x),x)*tan(diff(y(x),x));
DEtools:-odeadvisor(ode)

What Am I missing here?

Update

These are the rules I know about this ode. For y=x f(p)+ g(p). 

g(p) can be zero, yes, but in this case, f(p) has to be nonlinear in p for it to be dAlembert (else it will be either separable or linear.

I did not think f(p) can be zero and it remains dAlermber, even if g(p) remains nonlinear in p. So y=g(p) can not be dAlembert, even if g(p) is nonlinear.

May be Maple uses its own definition of dAlembert?. I do not know. This will be new definition to me. Is there a reference that mentions this case of y=g(p) classified as dAlembert for nonlinear g?

Maple 2022.1 on windows 10


Using plot3d(..., style=surfacecontour, ...) or contourplot3d(...) displays wrong level curves when some axis are switched to a log mode.

Example:

restart:

interface(version)

`Standard Worksheet Interface, Maple 2015.2, Mac OS X, December 21 2015 Build ID 1097895`

(1)

X := (0.4000000000e-4*(-R+80.00))/(R*(0.4e-1+M__a)):

plot3d(X, R=0..10, M__a=10^0..10^4, style=surfacecontour, color=gold)

 

plot3d(X, R=0..10, M__a=10^0..10^4, axis[2]=[mode=log], axis[3]=[mode=log], style=surfacecontour, color=gold)

 

plots:-display(
  plots:-contourplot3d(X, R=0..10, M__a=10^0..10^4, axis[2]=[mode=log], axis[3]=[mode=log], color=red),
  plot3d(X, R=0..10, M__a=10^0..10^4, style=surface, color=gold)
)

 

 

Download WrongLevelCurves.mw

 

The problem is not dramatic because there is a workaround.
 

restart:

interface(version)

`Standard Worksheet Interface, Maple 2015.2, Mac OS X, December 21 2015 Build ID 1097895`

(1)

X := (0.4000000000e-4*(-R+80.00))/(R*(0.4e-1+M__a)):

fig := plot3d(X, R=0..10, M__a=10^0..10^4, style=surfacecontour, color=gold):
Tr  := plottools:-transform((x, y, z) -> [x, log[10](y), log[10](z)]):
plots:-display(Tr(fig), axis[2]=[tickmarks=[seq(i=10^i, i=0..4)]], axis[3]=[tickmarks=[seq(i=nprintf("%1.0e", 10.^i), i=-7..-1)]])

 

 

Download WrongLevelCurves_Workaround.mw

 

I've attached a maple file (.mw). After solving the first order condition of SW expression, I tried to obtain an optimal point for en. To do that I used solve API, and obtained a solution in rootof. I want to comment on the relationship of en with other parameters like A, theta, zeta, etc. Therefore, I want to understand the interpretation of rootof and how analytically I can simplify it further if possible.

restart

SW := (1/6)*a*(8*sqrt(epsilon[n]*theta[n]*a)*Zeta[n]+3*a*tau-3*a)+(1/3)*e[n]*(-beta[n]*e[n]^2+3*delta[n]*A+4*sqrt(e[n]*theta[n]*A))

(1/6)*a*(8*(varepsilon[n]*theta[n]*a)^(1/2)*Zeta[n]+3*a*tau-3*a)+(1/3)*e[n]*(-beta[n]*e[n]^2+3*delta[n]*A+4*(e[n]*theta[n]*A)^(1/2))

(1)

``

NULL

Opt_effort_FOC := diff(SW, e[n])

-(1/3)*beta[n]*e[n]^2+delta[n]*A+(4/3)*(e[n]*theta[n]*A)^(1/2)+(1/3)*e[n]*(-2*beta[n]*e[n]+2*theta[n]*A/(e[n]*theta[n]*A)^(1/2))

(2)

``

NULL

solve(Opt_effort_FOC = 0, e[n])

RootOf(-A^3*delta[n]*theta[n]^2-2*A^2*_Z*theta[n]^2+_Z^4*beta[n])^2/(theta[n]*A)

(3)

NULL

``

Download RootOf_maple.mw

I know that this is a stupid question but I cannot find how to do the dyadic product of two matrix. Those matrix could be two tensor matrix and I need to do this multiplication:

Thank you in advance for your help.

Mario

Hello,

    I am regularly using tabled data for things like material properties, or other tabled look-up data from induustry or custom datasets.

    I have not used workbooks within Maple and yet see that exel files or other data sets can be "connected(?)" in the workbook tree.  Is this helpful?

    What is the best practice view of connecting to DB data and looking up variables that repeat project to project or worksheet to worksheet - without pulling into memory the full datasets for each ref call?

All thoughts appreciated.   

P.S., Tables vs. dataframes are a slight confusing matter also.  The access to the cell info seems different based on dataframe/table/matrix type.  I have no problems with matrix element access.

Thanks,
Bill

"object at address is binary"

                                                          

The following code is attempting to pass 'debug' through 2 procedures

p1 := proc(a, b, {debug::truefalse := false}) print("p1", debug); a + b; end proc;
p2 := proc(a, b, {debug::truefalse := false}) print("p2", debug); p1(a, b, 'debug' = true); end proc;
p2(1, 2, 'debug' = true);

The result I get is 
 

                           "p2", true

                          "p1", false

                               3

How can I get the value of debug in my call statement to p2 to be passed to p1?

Thanks

Hi 

I wanna export data from maple to excel and I tried this:

ExcelTools:-Export(op([1, 1], plots:-display( convert( ans1[12..14,3], list))));

I was expecting 4 columns including z vector and 3 columns from ans1[12..14,3] but got only 2 columns.Case1_Revised_080922.mw

Please any help?

when i try to save my program maple is close, crashing. how can i fix this?

Hello dear

please guide me how to solve linearly system in explicit form.

In this purpose of this problem is to find  w1, w2 w3  as symblic solution in Matrix form. and I hope that in the futher the vairiables consist of w1 ... wn and will still be applied in those simplied form or explicit form.

Thank you

_____________code________________________________________________________________

Vector[column](3, [0.85*((phi__cs*beta__s*f__con) . (D__pile*w__1)) + Vector[column](1, [-5/6*H - 5/8*P]), 0.85*((phi__cs*beta__s*f__con) . (D__pile*w__2)) + Vector[column](1, [5/6*H - 5/8*P]), 0.85*((phi__cs*beta__s*f__con) . (D__pile*w__3)) + Vector[column](1, [1/2*H - 3/8*P])])

In solving the brachistochrone for a fine string of length L under the pull of g passing through the point (0,0) and (a,b) using the euler-lagange method,I stumble on this non-linear relation:

C*sinh(mu*g*a/C)=L

which I need to solve for C.

Maple give me the famous RootOf:

RootOf(A*exp(_Z)^2 - 2*_Z*L*exp(_Z) - A)

where A = mu*g*a

Can it be solve for C or am I force to use numeric method?

Thank you in advance for your help.

Mario

hello Dear

I am new here I am not clear about Loop in Maple, I am stuck here.

Please correct and guide me 

thank you

input

 

Loop

Expect result

-------------------------------------------Code--------------------------------

KTe := Matrix(3, 1, [[Matrix(4, 4, [[216, -288, -216, 288], [-288, 384, 288, -384], [-216, 288, 216, -288], [288, -384, -288, 384]])], [Matrix(4, 4, [[216, 288, -216, -288], [288, 384, -288, -384], [-216, -288, 216, 288], [-288, -384, 288, 384]])], [Matrix(4, 4, [[500, 0, -500, 0], [0, 0, 0, 0], [-500, 0, 500, 0], [0, 0, 0, 0]])]]);
DOFe := Matrix(3, 4, [[1, 2, 3, 4], [3, 4, 5, 6], [5, 6, 1, 2]]);
with(ListTools);


with(LinearAlgebra);
nn1 := Row(DOFe, 1);
                      nn1 := [1, 2, 3, 4]

KG1 := Matrix(6, 6);


KG := Matrix(3, 1);

for k from 1 to 3  for i from 1 to 4 do      for j from 1 to 4 do    nn:=Row(DOFe,k):   KG1[nn1[i],nn1[j]]:=(KTe[k[],1])[i,j]    end do  end do   KG[k,1]:=KG1[k] end do;
 

Is there a way to print points that have additional information that can be probed when mousing over the points?

I have an array of arrays with information in each element including the point: [x,y1,y2,R1, R2, R3, R4]

Where y1 and y2 are different values to graph per x(different plots)  and Rk are records for the data(other info that goes along with them such as day of week, rainfall on that day, etc). The different graphs might have different scales so it would be nice if they handled scaling effectively(e.g., |y1| < 1 and y2 > 3430).

I have about 50k points so it has to be relatively fast... as it's already taking a few minutes to process the data in to the array from a file using fopen and readline(not sure why so slow as I'm just using a few parses and cats to put it in an array but probably is being slowed by not being able to pre-allocate the array.

First 159 160 161 162 163 164 165 Last Page 161 of 2308