MaplePrimes Questions

Dear Sir/Madam, I am new in maple and willing to use an old (yet tested) Maple V code. The program first evaluates two integrals numerically, which depend on the values of "d" and "s" (user-defined), and then computes the values of a cumulative distribution function. The problem is that, when running the code on Maple 2018, the evalf(Int) of the first integrand (named "ex1") results in "Float (undefined)". I would really appreciate your help. Thank you in advance.


#Maple V program

assume(x, real, y, real, c1, real, c2, real);
d := 3:
s := .9:
f1:= unapply(ex1,x,y):



I get the same result here where I expected a difference to be acknowledged by the split command. Is there a more efficient way of handling this problem other than the substitution for another character, followed by executing the split  command, then substituting the substituted character with the original ?(here ":")


StringTools['Split']("fdsg543656fgh:576fghs:dsfg::657ufdgdsg", "::")

["fdsg543656fgh", "576fghs", "dsfg", "", "657ufdgdsg"]


StringTools['Split']("fdsg543656fgh:576fghs:dsfg::657ufdgdsg", ":")

["fdsg543656fgh", "576fghs", "dsfg", "", "657ufdgdsg"]






How can I set Maple 2019 so that all inputs are of the color red?

I am using a Lenovo Notebook 64-bit.


Thank you, Jan Drösler


Plot the "moment curve" f(t)=(t,t^2,t^3) over the interval 1≤t≤2 and a tangent line at the point when t=1. Include both plots in the same display, with the moment curve red and the tangent line blue.

Plot the boundary of the rectangle with bounds 1≤x≤4 and 2≤y≤3 by parametrizing and plotting all four boundary segments in the same display


How do I simplify KdV equation in Maple by using =fxt))xx)?)



   I am by using =2*difffxtxx)
    My aim is to get the form
   diff((f*(diff(f, x, t))-(diff(f, x))*(diff(f, t))+f*(diff(f, x, x, x))-4*(diff(f, x, x, x))*(diff(f, x))+3*(diff(f, x, x))^2)/f^2, x) = 0



restart; with(PDEtools); with(DEtools)


alias(u = u(x, t)); declare(u(x, t)); alias(f = f(x, t)); declare(f(x, t))



` u`(x, t)*`will now be displayed as`*u


u, f


` f`(x, t)*`will now be displayed as`*f


KdV := diff(u, t)+6*u.(diff(u, x))+diff(u, x, x, x) = 0

diff(u, t)+6*(u.(diff(u, x)))+diff(diff(diff(u, x), x), x) = 0


KdV_f := eval(KdV, u = 2*(diff(ln(f), x, x)))

2*(diff(diff(diff(f, t), x), x))/f-2*(diff(diff(f, x), x))*(diff(f, t))/f^2-4*(diff(f, x))*(diff(diff(f, t), x))/f^2+4*(diff(f, x))^2*(diff(f, t))/f^3+6*((2*(diff(diff(f, x), x))/f-2*(diff(f, x))^2/f^2).(2*(diff(diff(diff(f, x), x), x))/f-6*(diff(diff(f, x), x))*(diff(f, x))/f^2+4*(diff(f, x))^3/f^3))+2*(diff(diff(diff(diff(diff(f, x), x), x), x), x))/f-10*(diff(diff(diff(diff(f, x), x), x), x))*(diff(f, x))/f^2+40*(diff(diff(diff(f, x), x), x))*(diff(f, x))^2/f^3-20*(diff(diff(diff(f, x), x), x))*(diff(diff(f, x), x))/f^2-120*(diff(diff(f, x), x))*(diff(f, x))^3/f^4+60*(diff(diff(f, x), x))^2*(diff(f, x))/f^3+48*(diff(f, x))^5/f^5 = 0


df := collect(KdV_f, f)

6*((2*(diff(diff(f, x), x))/f-2*(diff(f, x))^2/f^2).(2*(diff(diff(diff(f, x), x), x))/f-6*(diff(diff(f, x), x))*(diff(f, x))/f^2+4*(diff(f, x))^3/f^3))+(2*(diff(diff(diff(f, t), x), x))+2*(diff(diff(diff(diff(diff(f, x), x), x), x), x)))/f+(-2*(diff(diff(f, x), x))*(diff(f, t))-20*(diff(diff(diff(f, x), x), x))*(diff(diff(f, x), x))-4*(diff(f, x))*(diff(diff(f, t), x))-10*(diff(diff(diff(diff(f, x), x), x), x))*(diff(f, x)))/f^2+(60*(diff(diff(f, x), x))^2*(diff(f, x))+4*(diff(f, x))^2*(diff(f, t))+40*(diff(diff(diff(f, x), x), x))*(diff(f, x))^2)/f^3-120*(diff(diff(f, x), x))*(diff(f, x))^3/f^4+48*(diff(f, x))^5/f^5 = 0


factor(simplify(df, size))

2*(12*(((diff(diff(f, x), x))*f-(diff(f, x))^2)/f^2.(((diff(diff(diff(f, x), x), x))*f^2-3*(diff(diff(f, x), x))*(diff(f, x))*f+2*(diff(f, x))^3)/f^3))*f^5+f^4*(diff(diff(diff(f, t), x), x))+f^4*(diff(diff(diff(diff(diff(f, x), x), x), x), x))-f^3*(diff(diff(f, x), x))*(diff(f, t))-10*f^3*(diff(diff(f, x), x))*(diff(diff(diff(f, x), x), x))-2*f^3*(diff(f, x))*(diff(diff(f, t), x))-5*f^3*(diff(f, x))*(diff(diff(diff(diff(f, x), x), x), x))+30*f^2*(diff(diff(f, x), x))^2*(diff(f, x))+2*f^2*(diff(f, t))*(diff(f, x))^2+20*f^2*(diff(diff(diff(f, x), x), x))*(diff(f, x))^2-60*(diff(diff(f, x), x))*(diff(f, x))^3*f+24*(diff(f, x))^5)/f^5 = 0







Download KdV_simplify

Is there lifting function for polynomials or algebra use?

expect input a list univariate polynomial , then output a list of polynomials of two variables.

it should be the reverse operation of projection.

Which library has this function in maple 12 or maple 2015?

I am a beginner of MapleSim. I study the MapleSim User Guide. I follow the Tutor 8:Modeling Hydraulic System. But the following issue occurs, as shown in the picture. I bet I follow the guide carefully.

Also, I find that if I open the User's Guide example,Chapter 6, Analysis of Simple Hydraulic System Network, which is the standard example,I simulate it and it works well. But if I delete the probe, and attach a probe at the same place , selecting same values to measure, and simulate again, it failed, giving the same error description. I need your help,please.



I am trying to write a metric in Maple 2019, using the Physics package in Cartesian coordinates. I know that there is already a pre-installed way in which to set the coordinates to Cartesian, namely, if we have something like 


or similarly, using the Coordiantes calling sequence, such that we may define something like


yet, if I am not mistaken, this gives the coordinates in the following form: {x,y,z,t}, yet I seek to define the metric in the following, perhaps more arbitrary coordinate system, {x1,x2,x3,t}. Is there any way to setup the coordinate system to read like the set I just described, such that I can then take a norm of these three spatial coordaintes to be |x|? Any help would be greatly appreciated. 

   It would seem that the option style = planar  of DrawGraph()    is  failure when some graphs are planar.
   For example: 

treeof5:=[NonIsomorphicGraphs(5,4,output= graphs,outputform=graph,restrictto = connected )]:
DrawGraph ~ (treeof5, stylesheet=[vertexborder=false,vertexpadding=20]);


We know tree is planar graph obviously. But when I add the option style = planar ,  drawing of the first tree of list displays an error :
Error, (in GraphTheory:-Graph) vertex 1 cannot be its own neighbour in list of neighbours

I did not find any reason to explain. 

How do I find integer solutions to this non-linear equation:


8= 7(x^2+y^2+z^2)+2x+4y-8z.


Tried isolve and it wasn't working. (I guess too many variables?)


Also, if f(x,y,z) is the RHS, how do I write a loop that finds integer solutions to f(x,y,z)=c for |x|,|y|,|z|< N, say?

Suppose that a given population can be divided into two parts, those who have a given disease and can infect others, and those who do not have it but susceptible. Assume that y the proportion of infectious individuals then the rate of spread dy/dt is proportional to the number of contacts and can be described as

dy/dt=8/9y(1/9-y), y(0)=y0

Where y > 0 is a function of t,  is the initial proportion of infectious individuals.

  1. Use MAPLE and sketch a direction field for your differential equation and include a sufficient number of solution curves and include the graph into your answer sheet.

(3 marks)

  1. Find all the equilibrium solutions and determine whether they are asymptotically stable or unstable.

(4 marks)

  1. Solve the above initial value problem and verify that the conclusions you reached in part(ii) are correct.

(5 marks)

Everytime I try to run my for loops, all the code I wish to be iterated over has to be on the same line/paragraph as the original for statement. I also have to end the for loop on the same line/paragraph otherwise maple returns an error saying my for loop is unterminated?

Is there some tool I should be using to format my code that I'm not aware of?

My array is as such


(Array A is then filled with values)


Then Maple outputs all the values of the Array and not the sum of them all? What am I doing wrong? Any help is appreciated.

sourcesamples := [evalf(-1-sqrt(7)), -2, 1, evalf(-1 + sqrt(7)), 2];
templatesamples := [A, evalf(-1-sqrt(7)), A, -2, A, 1, A, evalf(-1 + sqrt(7)), A, 2, A];
samples := [-4, evalf(-1-sqrt(7)), -3, -2, 0, 1, evalf(3/2), evalf(-1 + sqrt(7)), evalf(9/5), 2, 3]

want to insert value alternatively according to the template and neighbor values


Some inserted values come from


(round(evalf(-1+sqrt(7)),0) + 1)/2;
(2 + 1)/2

(round(evalf(-1+sqrt(7)),1) + 2)/2;
(1.6 + 2)/2

how to generalize this method into general case function instead of manual inesrt?

First 376 377 378 379 380 381 382 Last Page 378 of 2211