Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

I currently have a 3D plot where the axes are Pn​, w, and the objective value (TM1, TM2, TM3 are all positive). I want to convert this into a 2D regional plot with Pn on the x-axis and w on the y-axis. How do I write the syntax for generating such a 2D region plot?

restart

with(Optimization); with(plots); with(LinearAlgebra)

_local(Pi)

Pi

(1)
 

TM1 := (Pn-.35)*(3.000000000-3.333333333*Pn)+.1115859938-.2510684861*w

(Pn-.35)*(3.000000000-3.333333333*Pn)+.1115859938-.2510684861*w

(2)

TM2 := (Pn-.348)*(2.996666666-3.333333333*Pn)+.1017286174-.2299240474*w

(Pn-.348)*(2.996666666-3.333333333*Pn)+.1017286174-.2299240474*w

(3)

TM3 := (Pn-.348)*(2.996666666-3.333333333*Pn)+.1018208882-.2301325952*w

(Pn-.348)*(2.996666666-3.333333333*Pn)+.1018208882-.2301325952*w

(4)

S1 := plot3d(TM1, Pn = 0 .. 1, w = 0 .. 1, orientation = [165, 75, 0], color = "SkyBlue"); S2 := plot3d(TM2, Pn = 0 .. 1, w = 0 .. 1, orientation = [165, 75, 0], color = "Yellow"); S3 := plot3d(TM3, Pn = 0 .. 1, w = 0 .. 1, orientation = [165, 75, 0], color = "Red")

display({S1, S2, S3})

 

``

Download Plot_3D_to_2D.mw

 

Hello Ladies and Genlemen :)

a[1]:=1;

a__1:=1;

is( a[1]=a__1) returns false.

OK ...so [] is a ist ; __ is just a double underscore .

I skim through the docs but nothing interresting for me.

so what are the whys and the wherefores of this difference ?

I must say that i have been using Maple since 1992 ! (Maple V.2)

I *always* used [] for indexing variables.

I  can't remember where/when __ was introduced...I am an old man now :)

Thank you very much and kind regards to all.

Jean-Michel

In the attached document (an excerpt from a larger document) is a call to the interactive plotbuilder.
The call is somewhere hidden in a document block but the document block with the redline is empty. Deleting the document block only moves the red line to another block. 

Executing the entire document (with !!!) starts the plot builder, execution step by step (with !) does not.

How to delete the call to the plotbuilder?

Interactive_plotbuilder.mw

I am trying to plot a 3D surface graph for my problem, and even though it's working, but the surface plot is not appearing at the base. Could anyone help me with the similar surface shade appearing at the base of the final output?

3D_shadow_at_the_base_Help.mw

Maplesoft Open Maple Java Programming Interface : Bug Report 1

Subject

-------------------------------------------------------------
FATAL ERROR in native method: Using JNIEnv in non-Java thread
-------------------------------------------------------------

Unexpected and apparently inconsistent threading behaviour.

Perhaps due to default callback semantics ?

Hello Maplesoft Support team,

Environment

* Maple: Maple 2024.2 (build used in our tests) Build ID #18723373
* OS: macOS (Apple Silicon / arm64) Sequoia 15.7.1 32 GB
* uname output from the failing machine: Darwin Mac-Mini.local 24.6.0 Darwin Kernel Version 24.6.0: Mon Aug 11 21:16:30 PDT 2025; root:xnu-11417.140.69.701.11~1/RELEASE_ARM64_T8132 arm64  
* JDK: openjdk 21.0.8 2025-07-15 LTS (Temurin 21.0.8+9)  
 
* Maple Java jars in use:
    * /Library/Frameworks/Maple.framework/Versions/2024/java/jopenmaple.jar
    * /Library/Frameworks/Maple.framework/Versions/2024/java/externalcall.jar
* Native libraries loaded from:
    * /Library/Frameworks/Maple.framework/Versions/2024/bin.APPLE_ARM64_MACOS

Exact java command used to run OpenMapleBug1:

java -Xcheck:jni --enable-native-access=ALL-UNNAMED -Xrs \  
  -cp .:/Library/Frameworks/Maple.framework/Versions/2024/java/jopenmaple.jar:/Library/Frameworks/Maple.framework/Versions/2024/java/externalcall.jar \  
  -Djava.library.path=/Library/Frameworks/Maple.framework/Versions/2024/bin.APPLE_ARM64_MACOS \  
  OpenMapleBug1  

Minimal Java reproducer:

import com.maplesoft.openmaple.*;
import com.maplesoft.externalcall.MapleException;
import java.util.*;

public class OpenMapleBug1
{
    public static void main(String[] args) throws Exception
    {
        String[] mapleArgs = { "java" };

        try
        {
            Engine engine = new Engine(mapleArgs, new EngineCallBacksDefault(), null, null);
            String expr1 = "diff( tan( x )/exp( x ), x );";
            String expr2 = "u_general := sum(B[n] * sin(n*Pi*x/L) * exp(-alpha*(n*Pi/L)^2*t), n=1..infinity);";
            System.out.println("Evaluating: " + expr1);
            engine.evaluate(expr1);
            System.out.println("Evaluating: " + expr2);
            engine.evaluate(expr2);
            System.out.println("Success");
        }
        catch (MapleException e)
        {
            System.out.println("Error: " + e);
            e.printStackTrace();
        }
    }
}

Observed Behaviour

Two calls are made to OpenMaple. The first succeeds:

Evaluating: diff( tan( x )/exp( x ), x );
(1+tan(x)^2)/exp(x)-tan(x)/exp(x)

The second fails (cf. OpenMapleBug2 (which is actually my main line of investigation); also submitted).

Evaluating: u_general := sum(B[n] * sin(n*Pi*x/L) * exp(-alpha*(n*Pi/L)^2*t), n=1..infinity);

FATAL ERROR in native method: Using JNIEnv in non-Java thread
zsh: abort      java -Xcheck:jni --enable-native-access=ALL-UNNAMED -Xrs -cp    OpenMapleBug1

=========================================
Suggested actions for Maplesoft engineers
=========================================

* Reproduce on macOS Apple Silicon using the provided reproducer and command line.
* Check whether this regression is present on other platforms (x86 mac, Linux) and JDK versions.
* Provide a fix for Maple 2024.2 (and Maple 2025.x if applicable).

Thank-you.

 

Maplesoft Open Maple Java Programming Interface : Bug Report 2

Subject

Native crash (SIGSEGV) in libmaple.dylib when evaluating symbolic sum with indexed coefficients (B[n]) — macOS Apple Silicon — Maple 2024.2

Hello Maplesoft Support team,

I’m reporting a native crash (SIGSEGV) inside libmaple.dylib that occurs when evaluating a symbolic sum containing indexed symbolic coefficients (for example B[n]) via the Maple Java Engine API (jopenmaple). The crash aborts the JVM and produces hs_err_pid34602.log. This is available: email me to receive it.. Rewriting the indexed symbol as a function (for example B(n)) avoids the crash, which suggests a native bug in Maple’s handling of indexed symbolic objects during summation/conversion/evaluation.

Please find environment, exact commands, a minimal reproducer, hs_err_pid34602.log (email), and suggested tests and actions below.

Environment

* Maple: Maple 2024.2 (build used in our tests) Build ID #18723373

* OS: macOS (Apple Silicon / arm64) Sequoia 15.7.1 32 GB
    * uname output from the failing machine: Darwin Mac-Mini.local 24.6.0 Darwin Kernel Version 24.6.0: Mon Aug 11 21:16:30 PDT 2025; root:xnu-11417.140.69.701.11~1/RELEASE_ARM64_T8132 arm64  

JDK: openjdk 21.0.8 2025-07-15 LTS
OpenJDK Runtime Environment Temurin-21.0.8+9 (build 21.0.8+9-LTS)
OpenJDK 64-Bit Server VM Temurin-21.0.8+9 (build 21.0.8+9-LTS, mixed mode, sharing)

Maple Java jars in use:
    * /Library/Frameworks/Maple.framework/Versions/2024/java/jopenmaple.jar
    * /Library/Frameworks/Maple.framework/Versions/2024/java/externalcall.jar

Native libraries loaded from:
    * /Library/Frameworks/Maple.framework/Versions/2024/bin.APPLE_ARM64_MACOS

Exact java command used to run MinimalSumTest2:

java -Xcheck:jni --enable-native-access=ALL-UNNAMED -Xrs \  
  -cp .:/Library/Frameworks/Maple.framework/Versions/2024/java/jopenmaple.jar:/Library/Frameworks/Maple.framework/Versions/2024/java/externalcall.jar \  

  -Djava.library.path=/Library/Frameworks/Maple.framework/Versions/2024/bin.APPLE_ARM64_MACOS \  
  MinimalSumTest2  

Note: Adding -Xss100M did not make any apparent difference.


Minimal Java reproducer (attach as MinimalSumTest2.java):

// MinimalSumTest2.java

public class MinimalSumTest2
{
    public static void main(String[] args)
    {
        String[] mapleArgs = new String[] { "java" }; // some versions require this
        com.maplesoft.openmaple.Engine engine = null;
        try
        {
            System.out.println("Creating Engine...");
            engine = new com.maplesoft.openmaple.Engine(
                mapleArgs,
                new com.maplesoft.openmaple.EngineCallBacksDefault(),
                null,
                null
            );

            // assign with ":" to suppress printing (should avoid large marshalled result)
            String assignSuppressed = "u_test := sum(B[n]*sin(n*Pi*x/L)*exp(-alpha*(n*Pi/L)^2*t), n=1..100):";
            System.out.println("Evaluating (suppressed): " + assignSuppressed);
            engine.evaluate(assignSuppressed);
            System.out.println("Assigned (suppressed) OK");

            System.out.println("Done.");
        } catch (Throwable t)
        {
            System.err.println("Unexpected throwable (may be native crash):");
            t.printStackTrace();
            // If a SIGSEGV occurs, JVM may abort before this runs; look for hs_err_pid*.log
        } finally
        {
            // no stop() method available
        }
    }

}

Observed Behavior

* JVM aborts with SIGSEGV in native code (libmaple.dylib). The hs_err log shows frames in:
    * libmaple.dylib : errorJmp(_ThreadLocalData*) / extIsNumeric
    * libjopenmaple.jnilib : newAlgebraic / Java_com_maplesoft_openmaple_Engine_evaluate

* Using B(n) (function form) instead of B[n] or substituting numeric coefficients avoids the crash.

Attached crash evidence

* hs_err_pid34602.log is available: email me to receive it.
* Please use the full hs_err file for diagnostics; it contains native frames, thread state and loaded libraries.

Suggested quick tests to run (please include pass/fail for each):

1. Replace indexed form with function form:
    * B := n -> b^n: u := sum(B(n)*sin(...), n=1..100): — does this crash?
2. Reduce N (small upper bound):
    * sum(B[n]*sin(...), n=1..10): — crash or not?
3. Use a table in place of indexed name: Btab := table():  
4. for k from 1 to 100 do Btab[k] := b || k od:  
5. sum(Btab[n]*sin(...), n=1..100):  
6. Pre-substitute a simple expression for B[n] before summing:
    * sum(subs(B[n]=1/n, B[n]*sin(...)), n=1..100):
7. Try same reproducer on a non-Apple-Silicon mac or Linux (if available) and with JDK 17.

Suggested cause (based on hs_err frames):

* Crash appears to occur in native routines that check numeric-ness / build algebraic objects (functions such as extIsNumeric and newAlgebraic). This indicates a bug in Maple’s native handling/conversion of indexed symbolic objects in sum/convert/evaluate code paths.

Temporary workarounds
* Use function form: B := n -> ... and B(n) in sums rather than B[n].
* Substitute definitions for B[n] before summation (client-side or via subs) so that the sum does not carry an indexed symbolic name into the conversion step.
* Build sums client-side (Java/Clojure) or use explicit truncated numeric sums when possible.

Files to attach (recommended)
* hs_err_pid*.log (full file)
* MinimalSumTest.java (the Java reproducer above)
* README_cmd.txt (contains exact javac and java commands used)
* java_version.txt (output of java --version)
* maplesoft_jars_list.txt (paths to jopenmaple.jar and externalcall.jar used)

=========================================

Suggested actions for Maplesoft engineers
=========================================

* Email me to receive the error log file produced for the crash.
* Reproduce on macOS Apple Silicon using the provided reproducer and command line.
* Inspect handling of indexed name objects inside summation/conversion code paths — particularly code interacting with extIsNumeric, newAlgebraic, and conversion routines invoked by Engine.evaluate.
* Check whether this regression is present on other platforms (x86 mac, Linux) and JDK versions.
* Provide either a patch that prevents this conversion path from dereferencing invalid memory, or return a safe Maple-level error for unsupported symbolic forms.

Thank-you.


 

I have this code

restart;
with(geometry);
with(StringTools);
interface(worksheetdir);
currentdir(%);
toX := e -> latex(e, 'output' = 'string');
s := toX(e);
s := StringTools:-Substitute(s, "[", "(");
s := StringTools:-Substitute(s, "]", ")");
s := StringTools:-SubstituteAll(s, ",", ";");
s := StringTools:-SubstituteAll(s, "\\frac", "\\dfrac");
s := StringTools:-SubstituteAll(s, "-\\infty", "#@#");
s := StringTools:-SubstituteAll(%, "\\infty", "+\\infty");
s := StringTools:-SubstituteAll(%, "#@#", "-\\infty");
printf("\\documentclass[12pt]{article}\n");
printf("\\usepackage{amsmath,amssymb}\n");
printf("\\usepackage{enumitem}\n");
printf("\\begin{document}\n\n");
f := x -> (x^2 + 4*x + 7)/(x + 1);
df := simplify(diff(f(x), x));
cuctri := sort([solve(df = 0, x)], key = evalf);
g := simplify(diff(df, x));
xcd := rhs(solve([df = 0, g(x) < 0], x)[1]);
xct := rhs(solve([df = 0, 0 < g(x)], x)[1]);
ycd := simplify(f(xcd));
yct := simplify(f(xct));
mycd := coordinates(point(A, xcd, ycd));
myct := coordinates(point(B, xct, yct));
L := [cat("Let a function be given: $y = ", toX(f(x)), "$."), cat("Its derivative is: $y' = ", toX(df), "$."), cat("The maximum point of the graph  $ ", toX(mycd), "$.")];

printf("\\begin{enumerate}[label=\\arabic*)]\n");
for item in L do
    printf("\\item %s\n", item);
end do;
printf("\\end{enumerate}\n\n");

I got

\documentclass[12pt]{article}
\usepackage{amsmath,amssymb}
\usepackage{enumitem}
\begin{document}

\begin{enumerate}[label=\arabic*)]
\item Let a function be given: $y = \frac{x^{2}+4 x +7}{x +1}$.
\item Its derivative is: $y' = \frac{x^{2}+2 x -3}{\left(x +1\right)^{2}}$.
\item The maximum point of the graph  $ [-3, -2]$.
\end{enumerate}

I want to $ (-3; -2)$, not $ [-3, -2]$. How can I make the function toX apply to the whole document?

I tried

restart;
with(geometry);
with(StringTools);
interface(worksheetdir);
currentdir(%);
toX := proc(e) local s; s := latex(e, 'output' = 'string'); s := Substitute(s, "[", "("); s := Substitute(s, "]", ")"); s := SubstituteAll(s, ",", ";"); s := SubstituteAll(s, "\\frac", "\\dfrac"); s := SubstituteAll(s, "-\\infty", "#@#"); s := SubstituteAll(s, "\\infty", "+\\infty"); s := SubstituteAll(s, "#@#", "-\\infty"); return s; end proc;
printf("\\documentclass[12pt]{article}\n");
printf("\\usepackage{amsmath,amssymb}\n");
printf("\\usepackage{enumitem}\n");
printf("\\begin{document}\n\n");
f := x -> (x^2 + 4*x + 7)/(x + 1);
df := simplify(diff(f(x), x));
cuctri := sort([solve(df = 0, x)], key = evalf);
g := simplify(diff(df, x));
xcd := rhs(solve([df = 0, g(x) < 0], x)[1]);
xct := rhs(solve([df = 0, 0 < g(x)], x)[1]);
ycd := simplify(f(xcd));
yct := simplify(f(xct));
mycd := coordinates(point(A, xcd, ycd));
myct := coordinates(point(B, xct, yct));
L := [cat("Let a function be given: $y = ", toX(f(x)), "$."), cat("Its derivative is: $y' = ", toX(df), "$."), cat("The maximum point of the graph  $ ", toX(mycd), "$.")];
printf("\\begin{enumerate}[label=\\arabic*)]\n");
for item in L do
    printf("\\item %s\n", item);
end do;
printf("\\end{enumerate}\n\n");

and got the 

 

\begin{enumerate}[label=\arabic*)]
\item Let a function be given: $y = \dfrac{x^{2}+4 x +7}{x +1}$.
\item Its derivative is: $y' = \dfrac{x^{2}+2 x -3}{\left(x +1\right)^{2}}$.
\item The maximum point of the graph  $ (-3; -2)$.
\end{enumerate}

 

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)

`&Pi;_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)

`&Pi;_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)

`&Pi;_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(`&Pi;_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(`&Pi;_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(`&Pi;_32`, Ce = 0 .. 0.9e-1, color = [blue], labels = ["Ce", "Manufacturer profit"], labeldirections = ["horizontal", "vertical"], legend = [`#msubsup(mi("Pi"),mi("m"),mn("S"));`])

 

 

 

`&Pi;_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)

`&Pi;_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)

`&Pi;_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(`&Pi;_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(`&Pi;_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(`&Pi;_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(`&Pi;_22`, Ce = 0 .. 0.9e-1, color = ["red"], labels = ["Ce", "Manufacturer profit"], labeldirections = ["horizontal", "vertical"], legend = [`#msubsup(mi("Pi"),mi("m"),mn("D"));`]), plot(`&Pi;_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

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

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