MaplePrimes Questions

Search Questions:

I would like to combine all the plots into a single figure. The curves S1, S2, and S3 represent the manufacturer’s profit as Ce​ varies, and S12, S22, and S33 represent the retailer’s profit for the same changes in Ce​. I want all of these displayed together in one plot using a dual y-axis: one axis for the manufacturer’s profit and the other for the retailer’s profit, with Ce on the x-axis. How to create such a dual-axis plot with appropriate scaling so that the differences between the curves are also clearly visible.

restart

with(Optimization); with(plots); with(Student[VectorCalculus]); with(LinearAlgebra)

``

_local(Pi)

Pi

(1)

`Π_12` := (0.1455251030e-2*Ce+.5352049476)*(0.369876310e-1-0.3638127575e-2*Ce)+(.8*(-.1671790360+1.121361872*Ce))*(0.1849381518e-1-0.1819063782e-2*Ce)-Ce*(0.1849381518e-1-0.1819063782e-2*Ce)

(0.1455251030e-2*Ce+.5352049476)*(0.369876310e-1-0.3638127575e-2*Ce)+(-.1337432288+.8970894976*Ce)*(0.1849381518e-1-0.1819063782e-2*Ce)-Ce*(0.1849381518e-1-0.1819063782e-2*Ce)

(2)

`Π_22` := (0.1455251030e-2*Ce+.5356096675)*(0.355258312e-1-0.3638127575e-2*Ce)+(.8*(-.1184158360+1.121361872*Ce))*(0.1776291535e-1-0.1819063782e-2*Ce)-Ce*(0.1776291535e-1-0.1819063782e-2*Ce)

(0.1455251030e-2*Ce+.5356096675)*(0.355258312e-1-0.3638127575e-2*Ce)+(-0.9473266880e-1+.8970894976*Ce)*(0.1776291535e-1-0.1819063782e-2*Ce)-Ce*(0.1776291535e-1-0.1819063782e-2*Ce)

(3)

`Π_32` := (0.1455251030e-2*Ce+.5356038465)*(0.355403838e-1-0.3638127575e-2*Ce)+(.8*(-.1179012835+1.121361872*Ce))*(0.1777019161e-1-0.1819063782e-2*Ce)-Ce*(0.1777019161e-1-0.1819063782e-2*Ce)

(0.1455251030e-2*Ce+.5356038465)*(0.355403838e-1-0.3638127575e-2*Ce)+(-0.9432102680e-1+.8970894976*Ce)*(0.1777019161e-1-0.1819063782e-2*Ce)-Ce*(0.1777019161e-1-0.1819063782e-2*Ce)

(4)

S12 := plot(`Π_12`, Ce = 0 .. 0.9e-1, color = [red], labels = ["Ce", "Manufacturer Profit"], labeldirections = ["horizontal", "vertical"], legend = [`#msubsup(mi("Pi"),mi("m"),mn("W"));`]); S22 := plot(`Π_22`, Ce = 0 .. 0.9e-1, color = [green], labels = ["Ce", "Manufacturer profit"], labeldirections = ["horizontal", "vertical"], legend = [`#msubsup(mi("Pi"),mi("m"),mn("D"));`]); S32 := plot(`Π_32`, Ce = 0 .. 0.9e-1, color = [blue], labels = ["Ce", "Manufacturer profit"], labeldirections = ["horizontal", "vertical"], legend = [`#msubsup(mi("Pi"),mi("m"),mn("S"));`])

 

 

 

`Π_1` := (-0.60726413e-1*Ce+.6173851967)*(0.1849381518e-1-0.1819063782e-2*Ce)-0.2500000000e-1*(0.1849381518e-1-0.1819063782e-2*Ce)^2

(-0.60726413e-1*Ce+.6173851967)*(0.1849381518e-1-0.1819063782e-2*Ce)-0.2500000000e-1*(0.1849381518e-1-0.1819063782e-2*Ce)^2

(5)

`Π_2` := (-0.60726413e-1*Ce+.5929853242)*(0.1776291535e-1-0.1819063782e-2*Ce)-0.2500000000e-1*(0.1776291535e-1-0.1819063782e-2*Ce)^2

(-0.60726413e-1*Ce+.5929853242)*(0.1776291535e-1-0.1819063782e-2*Ce)-0.2500000000e-1*(0.1776291535e-1-0.1819063782e-2*Ce)^2

(6)

`Π_3` := (-0.60726413e-1*Ce+.5932282299)*(0.1777019161e-1-0.1819063782e-2*Ce)-0.2500000000e-1*(0.1777019161e-1-0.1819063782e-2*Ce)^2

(-0.60726413e-1*Ce+.5932282299)*(0.1777019161e-1-0.1819063782e-2*Ce)-0.2500000000e-1*(0.1777019161e-1-0.1819063782e-2*Ce)^2

(7)

S1 := plot(`Π_1`, Ce = 0 .. 0.9e-1, color = [yellow], labels = ["Ce", "Retailer profit"], labeldirections = ["horizontal", "vertical"], legend = [`#msubsup(mi("Pi"),mi("r"),mn("W"));`]); S2 := plot(`Π_2`, Ce = 0 .. 0.9e-1, color = [black], labels = ["Ce", "Retailer  profit"], labeldirections = ["horizontal", "vertical"], legend = [`#msubsup(mi("Pi"),mi("r"),mn("D"));`]); S3 := plot(`Π_3`, Ce = 0 .. 0.9e-1, color = [grey], labels = ["Ce", "Retailer profit"], labeldirections = ["horizontal", "vertical"], legend = [`#msubsup(mi("Pi"),mi("r"),mn("S"));`])

 

 

 

dualaxisplot(plot(`Π_22`, Ce = 0 .. 0.9e-1, color = ["red"], labels = ["Ce", "Manufacturer profit"], labeldirections = ["horizontal", "vertical"], legend = [`#msubsup(mi("Pi"),mi("m"),mn("D"));`]), plot(`Π_2`, Ce = 0 .. 0.9e-1, color = ["green"], labels = ["Ce", "Retailer profit"], labeldirections = ["horizontal", "vertical"], legend = [`#msubsup(mi("Pi"),mi("r"),mn("D"));`]), title = "fairnes cost Comparison")

 

display({S1, S12, S2, S22, S3, S32})

 
 

``

Download All_plots_Combined.mw

I am working in Maple 2025:

I executed the following code:

restart:
p:=int(x ** 3 + 2 * x, x);

Maple replied with:

(x^2 + 2)^2/4

I was expecting :

x^4/4+x^2

Did Maple do this integration incorrectly?

Hello! I have a simple system of linear ODEs and I am trying to solve them much like the above link ODEs were solved but I keep getting a pesky problem and no matter what I do, I can't seem to make Maple happy! Could someone take a look & see what I am doing wrong.

Thank you.

Download SimpleMarsEntryAndAeroBrakingModel.mw

I am a newbie Maple user. I am trying to learn how to work with Maple. I would like to view some of the underlying Maple source code; for example the code behind Students[Calculus1]:-InversePlot.

I have tried the following, but all I get back is module() ... end module.

restart
kernelopts(opaquemodules=false);
with(Student[Calculus1]);
interface(verboseproc=3);
eval(Student[Calculus1]:-InversePlot);

Is there a way to do this?

Thanks

I tried this combination of transfer functions, and it appears that the PhasePlot isn't correct.  Does anyone have any suggestions on what might be causing the issue? 

What_do_I_have_wrong_Phase_Plot.zip

How to do this with differential geometry for a vectorfield like this one ?
But lets start easier , with straight arrows 

please give me a link to find the best presentation about maple? i am looking for it but nothing intrested found 

Dear sir here not matching the table values in the given pdf and if the Bc ((D(D(f)))(1) = 0) is also not satisfying 

thin_film_base_paper_comparision.mw

restart;
with(PDEtools):
with(plots):
with(LinearAlgebra):

A1 := 1:

# A2: Density coefficient
A2 := 1:

# A3: Thermal conductivity coefficient (Maxwell model)
A3 := 1:

# A4: Heat capacity coefficient  
A4 := 1:

# A5: Electrical conductivity coefficient (Maxwell model)
A5 := 1:
 

 

# Default parameter values (can be varied in studies)
M := 0:               # Magnetic field parameter
               # Unsteadiness parameter  
lambda_val := 0.5:      # Film thickness parameter (β²)
R := 0:               # Radiation parameter
A_star := 0.5:          # Heat source parameter
B_star := 0.5:          # Heat sink parameter
Ec := 0:              # Eckert number
Pr := 1:            # Prandtl number

OdeSys := A1 * diff(f(eta), eta, eta, eta) +
                     A2 * lambda_val * (f(eta) * diff(f(eta), eta, eta) -
                     diff(f(eta), eta)^2 - S * diff(f(eta), eta) -
                     (S * eta/2) * diff(f(eta), eta, eta)) -
                     M * A5 * diff(f(eta), eta) = 0,(A3 + (4/3)*R) * diff(theta(eta), eta, eta) -
                   Pr * A4 * lambda_val * ((S/2) * (3*theta(eta) + eta*diff(theta(eta), eta)) +
                   2*diff(f(eta), eta)*theta(eta) - f(eta)*diff(theta(eta), eta)) +
                   lambda_val * (B_star * theta(eta) + A_star * diff(f(eta), eta)) = 0;

diff(diff(diff(f(eta), eta), eta), eta)+.5*f(eta)*(diff(diff(f(eta), eta), eta))-.5*(diff(f(eta), eta))^2-.5*S*(diff(f(eta), eta))-.2500000000*S*eta*(diff(diff(f(eta), eta), eta)) = 0, diff(diff(theta(eta), eta), eta)-.2500000000*S*(3*theta(eta)+eta*(diff(theta(eta), eta)))-1.0*(diff(f(eta), eta))*theta(eta)+.5*f(eta)*(diff(theta(eta), eta))+.25*theta(eta)+.25*(diff(f(eta), eta)) = 0

(1)

 

# Boundary conditions
    Cond :=f(0) = 0, D(f)(0) = 1, theta(0) = 1, f(1) = S/2,  D(theta)(1) = 0:
#(D(D(f)))(1) = 0:

SVals := [1, 1.2, 1.4, 1.6,1.8]:



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

interface(rtablesize = 100); interface(displayprecision = 6); Matrix([[Y, Nu, Nu, Nu, Nu, Nu], seq([k, seq([-(eval(diff(theta(eta), eta), Ans[j]))(k)][], j = 1 .. numelems(SVals))], k = 0)]); interface(rtablesize = 10); interface(displayprecision = -1)

Matrix(%id = 36893490264274272116)

(2)
 

 

Download thin_film_base_paper_comparision.mw
fin_base_paper.pdf

I want to change all `\infty` with `+\infty`. I tried

s := StringTools:-SubstituteAll(s, "\\infty", "+\\infty")

Then,  `-\\infty` to `- + \\infty`. How can I replace \infty with +\infty but keep -\infty unchanged?

How can I isolate the positive terms on one side and the negative terms on the other? Is there a systematic way to split and rearrange the expression so that I can determine the conditions under which L is positive or negative?

restart

``

L := simplify(-rho0*(-Cn*Cr*alpha*d*rho0+Cr*Pr*alpha*d*rho0-Cr*alpha*d*delta*rho0+Ce*alpha*d*delta+Cr*alpha*d*rho0-Crm*alpha*d*delta+Pr*alpha*d*delta-alpha*c*d*delta-alpha*delta*g*i2-Ce*alpha*d-Ce*d*delta-2*Cn*alpha*rho0+Crm*alpha*d-Pr*alpha*d+2*Pr*alpha*rho0+2*a*alpha*delta+alpha*c*d-alpha*c*delta-2*alpha*delta*rho0+alpha*g*i2+Ce*d-2*a*alpha+alpha*c+2*alpha*rho0)/(Cr*alpha*d*delta*rho0^2-Cr*alpha*d*rho0^2+2*alpha*delta*rho0^2-2*alpha*rho0^2-d*delta^2+2*d*delta-d)) = 0

-2*((((-(1/2)*rho0*Cr-(1/2)*Crm-(1/2)*c+(1/2)*Ce+(1/2)*Pr)*delta-(1/2)*Cr*(Cn-Pr-1)*rho0+(1/2)*Crm+(1/2)*c-(1/2)*Ce-(1/2)*Pr)*d+(-(1/2)*i2*g+a-rho0-(1/2)*c)*delta+(-Cn+Pr+1)*rho0+(1/2)*i2*g-a+(1/2)*c)*alpha-(1/2)*d*Ce*(delta-1))*rho0/((rho0^2*(Cr*d+2)*alpha-d*(delta-1))*(delta-1)) = 0

(1)
 

``

Download Positive_Negative_Isolation.mw

 

I'm Hi,looking to make this exercise dynamic by animating the trajectories and displaying the velocity vector. Do you have any ideas to help me build this pedagogical scenario within the Maple environment? Many thanks in advance.

mX(m, isumSD_TOT) := isumSD_REG; 
is changed to: 
mX := (m, isumSD_TOT) -> isumSD_REG;

This clobbers the Matrix mRegResTot. I can't fix it for the Matrix in the lower part. No clue why. 
The syntax works normally inside the do loops. Maple is changing the code if there is a variable that is passed as the first parm, but only outside a do loop. 

Code snippet duplicating 
_________________________________________________________________________________________

restart;
with(Statistics);
with(ArrayTools);
with(LinearAlgebra);
with(plots);
with(plottools);
with(ExcelTools);

mX := Matrix(20, 9);
iDreg := 1;
itSD_DREG := 2;
isumSD_REG := 3;
iDres := 4;
itSD_DRES := 5;
isumSD_RES := 6;
iDtot := 7;
itSD_DTOT := 8;
isumSD_TOT := 9;
for m to 20 do  # Load the matrix with values from 1 to 9. 
    mX(m, iDreg) := iDreg;
    mX(m, itSD_DREG) := itSD_DREG;
    mX(m, isumSD_REG) := isumSD_REG;
    mX(m, iDres) := iDres;
    mX(m, itSD_DRES) := itSD_DRES;
    mX(m, isumSD_RES) := isumSD_RES;
    mX(m, iDtot) := iDtot;
    mX(m, itSD_DTOT) := itSD_DTOT;
    mX(m, isumSD_TOT) := isumSD_TOT;
end do;
mX; # Show the Matrix is loaded. 
mX(5, isumSD_TOT) := itSD_DREG;  #change the last cell in the 5th row. 
mX; # Show the Matrix has row 5 column 9 changed to a 2. 
for m to 5 do #Load the first 5 rows of column 9 to a value of 1.
    mX(m, isumSD_TOT) := iDreg;
end do;
mX; # Show that the Matrix values were changed. 
m := 5;
mX(m, isumSD_TOT) := isumSD_REG;   # See syntax changed to:   mX := (m, isumSD_TOT) -> isumSD_REG;
mX;  # Show that the Matrix has been clobbered. 

 

Why are characters printed with additional back ticks when decimal HTML code is used (see output (3) below). lprint((3)) does not print them.

Looks like an exception. Is there a reason for that? Can it be used for something?

With HTML entitiy

`‰`

`‰`

(1)

With HTML hex code

`‰`

`‰`

(2)

With HTML decimal code

`‰`

`‰`

(3)
 

 

Download back_ticks_with_decimal_code.mw

Good afternoon.

Here is (what appears to be) a simple assignment problem that involves scheduling 3 jobs through 2 machines, and I wish to minimize the total time required to complete all 3 jobs. Each job must be processed first on machine #1 before going to machine #2,and each machine can only handle one job at a time.

I have determined the optimal sequence to minimize the makespan (i.e., the completion time of the last job on machine #2) using a manual method and I was wondering if someone could review this (please see attached) and recommend a structured LP method or let me know if such a procedure exists in Maple's Optimization package.

Any help will be appreciated! 

Thanks for reading.

MaplePrimes_Nov_4.mw

HeunC(-4*b, 4*b, 2, 8*b^2, -8*b^2 - _c[2] + 1, (-r + 2*b)/(2*b))
Is there a simple way in Maple to determine whether the following confluent Heun function terminates or when it terminates?

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