MaplePrimes Questions

I have Differential equation sytems as follow:

r := 10^(-2);k := 10^12;c1 := 5*10^(-11);c2 := 10^(-13);mu := 8;lambda := 4.16;a := 2*10^3;q := 300;s0 := 3*10^5;d := 10^(-3);rho := 10^(-12);gama := 10^2;delta := 10^4;b := 5*10^6;

eq1 := {N(0) = 2*10^10, P(0) = 5*10^7, Q(0) = 0, diff(N(t), t) = r*N(t)*(1 - N(t)/k) - c1*N(t)*P(t) - mu*N(t)*Q(t)/(a + Q(t)), diff(P(t), t) = s(t) + s0 - d*P(t) + rho*N(t)*P(t)/(gama + N(t)) - c2*N(t)*P(t) - delta*P(t)*Q(t)/(b + Q(t)), diff(Q(t), t) = q(t) - lambda*Q(t)}. I replace I with P.

N(t):The number of cancer cells; P(t): The number of immune cells (Healthy T-Lymphocuyes); Q(t): The amount of chemotherapeutic agent in bloodstream; q(t): Source terms standing for chemotherapy.

My question is how to get the first two figures below based on these information: q_infinity means constant chemotherapy infusion, while s_infinity means constant immunotherpy.


I got the plot for Q(t) as follow:

Please anyone has any suggestions to help. Thank you very much.

This is may be a philosophical question. But sometimes Maple suprises me when telling it to "simplify" expression. As in this example.




y*hypergeom([1/3, 2/3], [4/3], -y^3)


(2/9)*y*Pi*3^(1/2)*LegendreP(-1/3, -1/3, (-y^3+1)/(y^3+1))/((-y^3)^(1/6)*(y^3+1)^(1/3)*GAMMA(2/3))


For me, the original result is "simpler". (Not only smaller leaf count, but it has one special function, vs. two: Legendre and Gamma). But may be Maple considers hypergeom always more "complex" than any other?

That is why I use simplify(expr,size) because I am scared of simplify without any option, as I have little idea how it decides which is simpler.

Any thoughts from the experts on how Maple decided to simplify something when no option is used? What kinds of rules it uses to decide how to transform the expression?

Maple 2019.1



In the DE solution below I cannot convert the RootOf function to radicals.
macro(solve = allvalues@solve);
_EnvExplicit := true;
de := x^4*diff(y(x), x $ 2) + omega^2*y(x) = 0;
bc := y(a) = 0, y(b) = 0, D(y)(a) = 1;
dsol := (dsolve({bc, de}, {omega, y(x)}) assuming (0 < a, a < b));
convert(dsol, radical);
{omega = RootOf(tan(_Z)*_Z*b*_C2 - sin(-2*_B5*Pi + 2*Pi*_Z10 + 2*_B5*arccos(_Z*b*_C2/a) - arccos(_Z*b*_C2/a))*a)*b, y(x) = x*(-cos(RootOf(tan(_Z)*_Z*b*_C2 - sin(-2*_B5*Pi + 2*Pi*_Z10 + 2*_B5*arccos(_Z*b*_C2/a) - arccos(_Z*b*_C2/a))*a)*b/x)*sin(-2*_B5*Pi + 2*Pi*_Z10 + 2*_B5*arccos(RootOf(tan(_Z)*_Z*b*_C2 - sin(-2*_B5*Pi + 2*Pi*_Z10 + 2*_B5*arccos(_Z*b*_C2/a) - arccos(_Z*b*_C2/a))*a)*b*_C2/a) - arccos(RootOf(tan(_Z)*_Z*b*_C2 - sin(-2*_B5*Pi + 2*Pi*_Z10 + 2*_B5*arccos(_Z*b*_C2/a) - arccos(_Z*b*_C2/a))*a)*b*_C2/a))*a/(RootOf(tan(_Z)*_Z*b*_C2 - sin(-2*_B5*Pi + 2*Pi*_Z10 + 2*_B5*arccos(_Z*b*_C2/a) - arccos(_Z*b*_C2/a))*a)*b) + sin(RootOf(tan(_Z)*_Z*b*_C2 - sin(-2*_B5*Pi + 2*Pi*_Z10 + 2*_B5*arccos(_Z*b*_C2/a) - arccos(_Z*b*_C2/a))*a)*b/x)*_C2)}

Does anyone know how to convert the above expression to radicals?
I'm grateful.

In the DE solution below I cannot convert the RootOf function to radicals.

macro(solve = `@`(allvalues, solve))

_EnvExplicit := true

de := x^4*(diff(y(x), `$`(x, 2)))+omega^2*y(x) = 0

bc := y(a) = 0, y(b) = 0, (D(y))(a) = 1

dsol := `assuming`([dsolve({bc, de}, {omega, y(x)})], [a > 0, b > a])

convert(dsol, radical)

{omega = RootOf(tan(_Z)*_Z*b*_C2-sin(-2*_B5*Pi+2*Pi*_Z10+2*_B5*arccos(_Z*b*_C2/a)-arccos(_Z*b*_C2/a))*a)*b, y(x) = x*(-cos(RootOf(tan(_Z)*_Z*b*_C2-sin(-2*_B5*Pi+2*Pi*_Z10+2*_B5*arccos(_Z*b*_C2/a)-arccos(_Z*b*_C2/a))*a)*b/x)*sin(-2*_B5*Pi+2*Pi*_Z10+2*_B5*arccos(RootOf(tan(_Z)*_Z*b*_C2-sin(-2*_B5*Pi+2*Pi*_Z10+2*_B5*arccos(_Z*b*_C2/a)-arccos(_Z*b*_C2/a))*a)*b*_C2/a)-arccos(RootOf(tan(_Z)*_Z*b*_C2-sin(-2*_B5*Pi+2*Pi*_Z10+2*_B5*arccos(_Z*b*_C2/a)-arccos(_Z*b*_C2/a))*a)*b*_C2/a))*a/(RootOf(tan(_Z)*_Z*b*_C2-sin(-2*_B5*Pi+2*Pi*_Z10+2*_B5*arccos(_Z*b*_C2/a)-arccos(_Z*b*_C2/a))*a)*b)+sin(RootOf(tan(_Z)*_Z*b*_C2-sin(-2*_B5*Pi+2*Pi*_Z10+2*_B5*arccos(_Z*b*_C2/a)-arccos(_Z*b*_C2/a))*a)*b/x)*_C2)}


Does anyone know how to convert the above expression to radicals?
I'm grateful.





I have just made a bar graph in

and i would like to set it to be logscaled, but could not find an option in the documentation, or a way of using a logplot to get similar functionality

The video component is going to save me alot of hassle in that I was previously building external java applications for audio visual analysis purposes, with the downside of course being that I didnt have maple code at my disposal. 

I read in the manual for the video component that I can provide a HTTP address for which a video is located, which would mean i could probably stream an IP camera, but I can I use the localhost IP address with some sort of extension that directs to the I/O of a webcamera connected to my local machine?

Hi all, how to write description, suggestions for method (procedure) like image below. I tried searching for a solution but can't. Thank you very much

Is there extendable combinatorics experiment architect system design

such as new method can combine or use with old method and find relationship between them , these kind of big data system design in combinatorics experiment design?


I have made a worksheet showing how a variable, from an ode varies with time 

I would like to make similar graphs for y',y'',y''' etc and i couldn't think of how to do it.

Additionally I wanted to plot a bar graph of  y^(i)(1000)-lim(t approaches 1000 from below of y) any ideas oin how to do that?


I am playing around with certain "simple" integrals, and came across this strange behavior in Maple. Maple is able to integrate sin(x)^(1/2)*cos(x)^3, but not sin(x)^(1/3)*cos(x)^3. Any idea why?

int(sin(x)^(1/2)*cos(x)^3, x)



int(sin(x)^(1/3)*cos(x)^3, x)

int(sin(x)^(1/3)*cos(x)^3, x)



I am not able to understand why this ODE is quadrature. It is first order ODE of second degree. Solving for y'(x) gives two ODE's. Only one of these two ODE's is quadrature and the second is Abel.

So  why and how did odesdvisor come to conclusion that it is  quadrature? Did it pick the first ODE that comes from solving for y'(x)?

Note that from help, quadrature is ODE (for first order) is one which
the ODE is of first order and the right hand sides below depend only on x or y(x)

And the above definition only applied here for one of the 2 ODE's embeded inside this first order ODE of second degree. So I am just trying to understand the logic behind this result of odeadvisor

ode:= (x^2-a*y(x))*diff(y(x),x)^2-2*x*y(x)*diff(y(x),x) = 0;

(x^2-a*y(x))*(diff(y(x), x))^2-2*x*y(x)*(diff(y(x), x)) = 0



odes:=[solve(ode,diff(y(x),x))]; #solve for y' we get 2 first order ODE's

[0, -2*x*y(x)/(a*y(x)-x^2)]

DEtools:-odeadvisor(diff(y(x),x)=odes[1]); #find type of first one


DEtools:-odeadvisor(diff(y(x),x)=odes[2]); #find type of second one

[[_homogeneous, `class G`], _rational, [_Abel, `2nd type`, `class A`]]


btw, the above is just one example. I have many more. below show one more such example

#example 2

ode:=diff(y(x),x)^3-(2*x+y(x)^2)*diff(y(x),x)^2+(x^2-y(x)^2+2*x*y(x)^2)*diff(y(x),x)-(x^2-y(x)^2)*y(x)^2 = 0;

(diff(y(x), x))^3-(2*x+y(x)^2)*(diff(y(x), x))^2+(x^2-y(x)^2+2*x*y(x)^2)*(diff(y(x), x))-(x^2-y(x)^2)*y(x)^2 = 0



odes:=[solve(ode,diff(y(x),x))]; #solve for y' we get 3 first order ODE's

[y(x)^2, x+y(x), x-y(x)]

DEtools:-odeadvisor(diff(y(x),x)=odes[1]); #find type of first one


DEtools:-odeadvisor(diff(y(x),x)=odes[2]); #find type of second one

[[_linear, `class A`]]

DEtools:-odeadvisor(diff(y(x),x)=odes[3]); #find type of third one

[[_linear, `class A`]]




Maple 2019.1


I gave up. Spend 40 minutes trying everything and can't figure the right syntax. 

I need to use indets to obtain all occurrences of specific function in expression. Such as sin() or cos() or ln(), etc...

The indets commands has the form indets(expression, type).

But what is the type of ln ? It is of function type. But this picks up all other functions in the expression. I tried specfun and could not make it work. For example


I want  to obtain  {ln(y),ln(x+y)^2}

I tried


and many more. Since indets needs a name of a type in the second argument, then what is the type name for ln or sin or cos, etc... I can't use indential, it did not work, since it is not a symbol I am looking for. I could use patmatch, but I am trying to learn indets for all these things.

Do I need to use subsindets for this? I still do not know how to use subsindets.

Maple 2019.1

hi i did this in maple and i get an error when i try to solve the system of equation  :


h_f := 300;
h_a := 1000;
T_f := 1500 + 273;
T_a := 30 + 273;
k_r := 15;
k_s := 70;
Ra := 5;
Rf := 6.05;
Rc := 6;

Lap1 := Laplacian(T_r(r, theta), polar[r, theta]);
Lap2 := Laplacian(T_s(r, theta), polar[r, theta]);
Bc_r := k_r*eval(Gradient(T_r(r, theta), polar[r, theta])[1], r = 5) = h_a*(T_r(5, theta) - T_a);
Bc_s := k_s*eval(Gradient(T_s(r, theta), polar[r, theta])[1], r = 6.05) = h_f*(T_s(6.05, theta) - T_f);
systemThermal_r := Lap1 = 0;
systemThermal_s := Lap2 = 0;
Bc1_rs := eval(T_r(r, theta), r = 6) = eval(T_s(r, theta), r = 6);
Bc2_rs := k_r*eval(Gradient(T_r(r, theta), polar[r, theta])[1], r = 6) = -k_s*eval(Gradient(T_s(r, theta), polar[r, theta])[1], r = 6);
pdsolve([systemThermal_r, systemThermal_s, Bc_r, Bc_s, Bc1_rs, Bc2_rs]);
Error, (in PDEtools:-Library:-NormalizeBoundaryConditions) unable to isolate the functions {T_r(5, theta), T_r(6, theta), T_s(6, theta), T_s(6.05, theta), (D[1](T_r))(5, theta), (D[1](T_r))(6, theta), (D[1](T_s))(6, theta), (D[1](T_s))(6.05, theta)} in the given boundary conditions {15*(D[1](T_r))(5, theta) = 1000*T_r(5, theta)-303000, 15*(D[1](T_r))(6, theta) = -70*(D[1](T_s))(6, theta), 70*(D[1](T_s))(6.05, theta) = 300*T_s(6.05, theta)-531900, T_r(6, theta) = T_s(6, theta)}

Hello. I'm plotting in polar coordinates. I use to build an expression

polarplot(MF(t), t = 0 .. 2*Pi, color = black, linestyle = 1, thickness = 3, coordinateview = [0 .. 11, 0 .. Pi], axesfont = ["TIMES", "ROMAN", 20], scaling = CONSTRAINED)

At the top there is a lot of empty space. Are there any settings that will allow you to remove the empty space and build only the part of the grid where the graph is located?

I like using Record in Maple. It allows me to collect related variables to pass around inside one object. (Like with Pascal or Ada records or C struct).

But I find myself copying the record definition over and over everywhere I want to use the same specific record layout.

Is there a way to define specific record layout somewhere, may be as a type and give it a name, and then in each proc I want to make a variable of this record type, just tell Maple that this variable is a record of that type so I do not have to explicity define the record there each time? 

Here is a simple example to make it more clear

foo:=proc() #some proc that uses same Record layout
   local S;
   S:-name:="joe doe 1";
   return S;
end proc:

boo:=proc() #another proc that wants to use same Record layout
   local S;
   S:-name:="joe doe 2";
   return S;
end proc:


These proc's can be anywhere, such as inside package or module, either local or exported.

I just want to avoid having to type   S:=Record('name','age');   Each time. I want to tell Maple that a local variable is of this specific Record layout, without having to type the layout explicitly.

This way, when I add new field to this Record,  I just have to do it in one place and not in 10 places in the code. 

I think I need to add a new type? But do not know how to do this.  I hope the question is clear. If not, will add more information.


How can I fix the error of ChangeOfVariables: Error, (in Student:-MultivariateCalculus:-ChangeOfVariables) unable to solve the change-of-variables equations for the original variables ?


First 382 383 384 385 386 387 388 Last Page 384 of 2155