Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

I am a beginner to Maple and I have to plot a three variable function with Maple.

The function I have to graph is a solution to a two dimensional and time dependent PDE which makes it three variables :

sol:= exp^{i*t}*sin(10*x)*sin(4*y)

Where the variables range is :  x=0..Pi, y=0..Pi,t=0..1

 

How do i solve and plot differential equations with fractional order in maple with five different fractional order

Hi,
I am a beginner in Maple. I want to calculate an integral [int(dx)=int(d_phi/sqrt(F(phi)))] and then plot phi vs x. But I do not know the commands.
Integral.mw

These two results seem contradictory:

  1. The first one means the type real doesn't exist, which can be easily verified by looking to the help(type) page, 
  2. Given the definition of '::' ( from help(coloncolon`) 'The  "::" operator serves several purposes in Maple, all related to types.') the second one suggests that real is a known type (for there is no error returned).
restart
f := x -> `if`(x::real, x, I*x):
f(3)
Error, (in f) type `real` does not exist
g := x -> is(x::real);
g(3), g(3*I)
                              true, false

Does assuming transforming "real" into a property in function g explains why it returns true?

Thank in advance for your explanations

(
Bulk questions:

Why doesn't real type exist, whereas complex type does?
From help(complex):
General complex numbers are numbers of the form x + I*y, where x and y are integers, rationals, or floats. In the general complex number case, if either x or y is a floating-point number, then an automatic conversion takes place, coercing both x and y into type float.
seems to mean that the complex is built upon floats and not reals.
But the dictionnary says
complex: adj. 1. of, involving, or of the form of a complex number, consisting of a real and an imaginary part, either of which may be zero. 2.- n. another term for a simplicial complex. Sometimes, however, less is required of a complex than of a simplicial complex. 3. (Group theory) an archaic term for a subset of a group.
real: adj.  1. involving or consisting of real numbers alone, having no imaginary part, or imaginary part equal to zero.  2. (as substantive) a real number.
The dictionnary doesn't mention floating point number but real ones, whereas the help pages do the opposite.

Why some numbers are considered as types whereas others are properties?
For instance, help(property) says that property rational is related to parent property real, but rational is also a type.
)

Applying Maple 2023's dsolve to the ODE shown below yields the solution y(t)=0 which is obviously incorrect.  Maple 2021 and earlier used to give a nonzero (albeit not very useful) answer.

restart;

F := (t-1)*(t-2)/(t^2+1)^3*(Heaviside(t-2)-Heaviside(t-1));

(t-1)*(t-2)*(Heaviside(t-2)-Heaviside(t-1))/(t^2+1)^3

plot(F, t=0..4);

de := diff(y(t),t,t) + diff(y(t),t) = F;

diff(diff(y(t), t), t)+diff(y(t), t) = (t-1)*(t-2)*(Heaviside(t-2)-Heaviside(t-1))/(t^2+1)^3

ic := y(0)=0, D(y)(0)=0;

y(0) = 0, (D(y))(0) = 0

Huh?

dsolve({de,ic}, y(t));

y(t) = 0

Specifying method=laplace will make that work, but how is an

unsuspecting user to know that what's obtained above is incorrect?

Download dsolve-bug.mw

I have a problem. Maple wants to create and a palette, I can add content and icons to the palette, but as soon as I restart Maple, the palette content has disappeared and says that Maple cannot find the added icons.

I have used the method described in Maple Help.

Is there anyone who can help?

Kind regards

Dear sir ,

I have implemented Dsolve method the code was executed, but i need to apply Kellor Box method to solve the ODES 

Please can any one help how to implement? 

because there is no post regarding the Kellor box method. 

restart; with(plots)

``

S := 1; Rd := .1; delta := .1; Hs := 1; Sc := .1; Pr := 6.8; n := 1; Rc := .1; E := .1; M := 1

NULL

 

OdeSys := a1*(diff(f(eta), eta, eta, eta, eta))/a2-S*(3*(diff(f(eta), eta, eta))+eta*(diff(f(eta), eta, eta, eta))+(diff(f(eta), eta))*(diff(f(eta), eta, eta))-f(eta)*(diff(f(eta), eta, eta, eta)))-a5*M*(diff(f(eta), eta, eta))/a2-a1*Kp*(diff(f(eta), eta, eta))/a2 = 0, (a4+4*Rd)*(diff(Theta(eta), eta, eta))+12*Rd*delta*((diff(Theta(eta), eta))*(diff(Theta(eta), eta))+Theta(eta)*(diff(Theta(eta), eta, eta)))+Hs*Theta(eta)-a3*Pr*S*(diff(Theta(eta), eta))*(eta-f(eta)) = 0, diff(Phi(eta), eta, eta)-S*Sc*(diff(Phi(eta), eta))*(eta-f(eta))-Sc*Rc*(1+delta*Theta(eta))^n*Phi(eta)*exp(-E/(1+delta*Theta(eta))) = 0; Cond := f(0) = 0, ((D@@2)(f))(0) = 0, (D(Theta))(0) = 0, (D(Phi))(0) = 0, f(1) = 1, (D(f))(1) = 0, Theta(1) = 1, Phi(1) = 1

   

KpVals := [1, 2, 3, 4]

for j to numelems(KpVals) do Ans[j] := dsolve(eval([OdeSys, Cond], Kp = KpVals[j]), numeric, output = listprocedure) end do

 

with(plots):
 cols := [red, blue, black,green]:

 plotA:= display
  ( [ seq
      ( odeplot
        ( Ans[k],[eta,(f(eta))],
          eta=0..1,
          color=cols[k]
        ),
        k=1..numelems(KpVals)
      )
    ],linestyle = "solid",
    'axes'= 'boxed',labels=[eta,'f(eta)'],labelfont=[TIMES,BOLD,16]
  );
 

with(plots):
  cols := [red, blue, black,green]:

plotB:= display( [ seq( odeplot
        ( Ans[k],[eta,Theta(eta)],
          eta=0..1,
          color=cols[k]
        ),
        k=1..numelems(KpVals)
      )
    ],linestyle = "solid",
    'axes'= 'boxed',labels=[eta,'Phi(eta)'],labelfont=[TIMES,BOLD,16]
  );

 

 

with(plots):
  cols := [red, blue, black,green]:

plotC:= display( [ seq( odeplot
        ( Ans[k],[eta,Phi(eta)],
          eta=0..1,
          color=cols[k]
        ),
        k=1..numelems(KpVals)
      )
    ],linestyle = "solid",
    'axes'= 'boxed',labels=[eta,'Phi(eta)'],labelfont=[TIMES,BOLD,16]
  );

 

with(plots):
 cols := [red, blue, black,green]:

 plotA:= display
  ( [ seq
      ( odeplot
        ( Ans[k],[eta,(diff(f(eta),eta))],
          eta=0..1,
          color=cols[k]
        ),
        k=1..numelems(KpVals)
      )
    ],linestyle = "solid",
    'axes'= 'boxed',labels=[eta,"f '(eta)"],labelfont=[TIMES,BOLD,16]
  );

 

 

 

Download kellor_box_method.mw

Is there an equivalent to Pivot Table in Excel?
I'm working on some investing data, and am using Maple to gather information from various sources and using DataFrame to combine all the data. I could export the dataframe and open in Excel or other spreadsheet and use the Pivot table to summarize the data, but is there an easy way to do all of it in Maple?

Thanks

Good evening,could you please help me to find the values of Phi[2],Phi[3],Phi[4],....

The right hand side of the for loop is the equation i need.Is this maple code correct.

rps1.mw

Hi,I am looking to construct a histogram in an aesthetic manner with bins. The Histogram command does not provide an optimal output. Any suggestions? Thanks QHistogram.mw


Assuming u and v are both real, I want to prove this equality.

int(Dirac(u-v), [u, v])  = min(u, v)

To be clear, I don't want to verify is this equality is true, but I want (I would like) to do is to get its rhs by using ad hoc transformations of its lhs.

Under the same assumptions, how can I do the same thing for this equality?

int(Dirac(u+v-1), [u, v]) = max(u+v-1, 0)


Thanks in advance

many times I have an expression with constant of integrations in it and need to integrate., So need to make sure to add a new constant of integration which is not already used.

Currently I do this

restart;
sol:=x-_C1*x+_C3*x^2;
myconstants:=indets(sol,And(symbol, suffixed(_C, nonnegint)));
map(X->String(X),myconstants);
map(X->X[3..],%);
map(X->:-parse(X),%);
n:=max(%);
new_constant:=_C||(n+1);

This make _C4 as the new constant. 

This assumes all constants have form _Cn which is what I use. It finds all _Cn's then converts each to string, then remove _C part from the string leaving the number, then find the maximum one and adds 1 to it to generate new constant to use,

Is there a better way to do this? Even though the above works, I have feeling there might be better way.

Hi,

I am using Maple 2023 on a Mac. When I issue the following commands

with(plots);
for j to 10 do
    pl || j := plot(sin(j*x)^j, x = 0 .. 5);
end do;
display([pl || (1 .. 10)], insequence = true);

I used to get an animation but also some controls: I could easily repeat, reverse, change FPS, etc. Now I seem to have to go Format_>Plot->Animate->Play. Has there been a change in Maple or have set some preference to this awkward form? I admit I have not been using Maple a lot these last couple of years.

3*alpha*a^2*B*cos(3*Phi)/(4*omega[0])-f*cos(Phi)/(2*omega[0]) = sigma*a-3*alpha*a*B^2/omega[0]-3*alpha*a^3/(8*omega[0])

I would like to get a (necessary and sufficient) condition on real parameters a, b, and c for which there exists (at least) one non-negative solution to 9*x**4 + c < 9*a*(x - 1) + 3*b*(x**2 - 1) + c*x**3
A convenient way to formulate this is using quantifiers. Unfortunately, if I run 

QuantifierElimination:-QuantifierEliminate(:-exists([x],:-And(x>=0,9*x^4+c<9*a*(x-1)+3*b*(x^2-1)+c*x^3)));

Maple will simply output 

Error, (in RootFinding:-RSGateway:-refine_uni_tri) invalid input: RootFinding:-RSGateway:-try_refine_iso_tri expects its 1st argument, box, to be of type nonemptylist([rational, rational]), but received [8019*x^2+(-9*v__2^2-96552*v__2-279834912)*x+49*v__2^3+78318*v__2^2-387436932*v__2+121801800168, v__2^4+2052*v__2^3-5536296*v__2^2+3575222064*v__2-710903793888]

As an alternative method, one can execute 

RealDomain:-solve([x >= 0, 9*x**4 + c < 9*a*(x - 1) + 3*b*(x**2 - 1) + c*x**3], 'parameters' = {a, b, c});
Warning,  computation interrupted

Regretfully, this time the computation is not done in several minutes (so one may have to abort it manually). 

So, what is the proper approach to the above problem in Maple (without any a priori knowledge, if possible)?

1 2 3 4 5 6 7 Last Page 1 of 2087