MaplePrimes Questions

Should solution to a first order ode with IC not have any constant of integration in it? This is what the teacher said at school.

But Maple in this example returns a solution to first order Riccati ode with c1 still in the solution even though it is given IC.

How is this possible? This is problem from Differential equations and their applications, 3rd ed., M. Braun, Section 1.10. Page 80, problem #5

If dsolve was not able to resolve c1 from IC for some reason, should it not have returned any solution in this case? 

btw, I could not verify the solution on the ode itself using odetest, but may be assumptions are needed. Will try and see...

 

restart;

interface(version);

`Standard Worksheet Interface, Maple 2025.0, Linux, March 24 2025 Build ID 1909157`

SupportTools:-Version();

`The Customer Support Updates version in the MapleCloud is 19 and is the same as the version installed in this computer, created May 21, 2025, 13:44 hours Eastern Time.`

Physics:-Version();

 

`The "Physics Updates" version in the MapleCloud is 1873 and is the same as the version installed in this computer, created 2025, May 18, 21:44 hours Pacific Time.`

restart;

libname;

"/home/me/maple/toolbox/2025/Physics Updates/lib", "/home/me/maple/toolbox/2025/Maple Customer Support Updates/lib", "/home/me/maple2025/lib"

ode:=diff(y(x),x)=1+y(x)+y(x)^2*cos(x);
IC:=y(0)=0;
maple_sol:=dsolve([ode,IC]);

diff(y(x), x) = 1+y(x)+y(x)^2*cos(x)

y(0) = 0

y(x) = -(1/2)*csgn(sin((1/2)*x))*(MathieuS(-1, -2, arccos(cos((1/2)*x)))*csgn(sin((1/2)*x))*c__1+4*MathieuS(-1, -2, arccos(cos((1/2)*x)))*cos(x)*c__1-MathieuSPrime(-1, -2, arccos(cos((1/2)*x)))*csgn(sin((1/2)*x))*c__1-c__1*MathieuS(-1, -2, arccos(cos((1/2)*x)))+c__1*MathieuSPrime(-1, -2, arccos(cos((1/2)*x)))-MathieuCPrime(-1, -2, arccos(cos((1/2)*x)))*csgn(sin((1/2)*x))+MathieuC(-1, -2, arccos(cos((1/2)*x)))*csgn(sin((1/2)*x))+4*MathieuC(-1, -2, arccos(cos((1/2)*x)))*cos(x)+MathieuCPrime(-1, -2, arccos(cos((1/2)*x)))-MathieuC(-1, -2, arccos(cos((1/2)*x))))/((c__1*MathieuS(-1, -2, arccos(cos((1/2)*x)))-c__1*MathieuSPrime(-1, -2, arccos(cos((1/2)*x)))-MathieuCPrime(-1, -2, arccos(cos((1/2)*x)))+MathieuC(-1, -2, arccos(cos((1/2)*x))))*cos(x))

lprint(maple_sol);

y(x) = -1/2*csgn(sin(1/2*x))/(c__1*MathieuS(-1,-2,arccos(cos(1/2*x)))-c__1*
MathieuSPrime(-1,-2,arccos(cos(1/2*x)))-MathieuCPrime(-1,-2,arccos(cos(1/2*x)))
+MathieuC(-1,-2,arccos(cos(1/2*x))))*(MathieuS(-1,-2,arccos(cos(1/2*x)))*csgn(
sin(1/2*x))*c__1+4*MathieuS(-1,-2,arccos(cos(1/2*x)))*cos(x)*c__1-MathieuSPrime
(-1,-2,arccos(cos(1/2*x)))*csgn(sin(1/2*x))*c__1-c__1*MathieuS(-1,-2,arccos(cos
(1/2*x)))+c__1*MathieuSPrime(-1,-2,arccos(cos(1/2*x)))-MathieuCPrime(-1,-2,
arccos(cos(1/2*x)))*csgn(sin(1/2*x))+MathieuC(-1,-2,arccos(cos(1/2*x)))*csgn(
sin(1/2*x))+4*MathieuC(-1,-2,arccos(cos(1/2*x)))*cos(x)+MathieuCPrime(-1,-2,
arccos(cos(1/2*x)))-MathieuC(-1,-2,arccos(cos(1/2*x))))/cos(x)

 

 

Download why_c_in_solution_may_23_2025.mw

Suppose we have two equations, and all parameters involved are assumed to be positive. Is there a systematic way or syntax to determine whether C1>C2​ or vice versa? Additionally, can we derive specific conditions under which C1>C2​ holds

Sheet: Q_greater.mw

I have just started to use Maple workbook (*.maple). In the workbook, there are 4 worksheets: "main.mw","calc1.mw","calc2.mw","calc3.mw". In "main.mw", I plot variables saved from "calc?.mw". This works. However, when I make changes in one of the worksheet "calc?.mw" and get the new expressions for the variables, they are not updated in "main.mw". I deleted the variables being changed but "main.mw" still run and show the old expressions of these variables.

How do I refresh so that "main.mw" will show the updated variables from "calc?.mw"?

Thanks.

Hi,

I’ve [K] & [M] matrices in sparse format for FE code. How do I convert them to be able to do eigensolution?

restart;

with(LinearAlgebra);

stiffness_data := ImportMatrix("d:/Simulation_1_STIF1.csv");

stiffness_matrix := Matrix(max(stiffness_data[() .. (), 1]), max(stiffness_data[() .. (), 2]), sparse = [seq([stiffness_data[i, 1], stiffness_data[i, 2], stiffness_data[i, 3]], i = 1 .. nops(stiffness_data))]);

Error, (in Matrix) argument `sparse = [[1, 1, 328.0000000], [1, 5, -20434.40000], [5, 1, -20434.40000]]` is incorrect or out of order

Even if I try with a simple matrix example it gave an error.

with(LinearAlgebra);

A := Matrix(5, 5, sparse = [[1, 1, 328.0], [1, 5, -20434.4], [5, 1, -20434.4]]);

Error, (in Matrix) argument `sparse = [[1, 1, 328.0], [1, 5, -20434.4], [5, 1, -20434.4]]` is incorrect or out of order

Please help.

Thanks,

Shashi

Trying to produce two different font sizes within a plot title.  I can achieve it with Typesetting but I'm getting brackets and fluff I don't want.  Any other ideas?

For example

with(Typesetting):
plot(x^2, title = [cat(mtext("sort of", font = "TimesNewRoman", size = 30), mtext("works", size = 10))])

Dear Power Users,

This is probably a simple question for you but I am stuck. In the attached worksheet I would like to plot (the plot is called P5) a vector with units (mm) against a vector without units. This didn't work out, so I removed the units from the vector with units, and this plotted but after the conversion the numeric values are no longer in mm but inches. How can I correct this?

Thank you in advance for your time and willingness to help.

testSheetHorseShoe.mw

Hello,

I have a few questions.

  1. When using ordered list, it keeps getting out of order. It will do 1, 2, then 5, 6 sometimes. If I tried to delete incorrectly numbered list, instead of restarting from the correct order, it will keep incrementing.
  2. How do I create a indented bullet list?
  3. Documentation for Maple 2025 doesn't seem to be up to date. I am looking to use "Tabkey" to indent text. It seems really difficult to get it done. Where do I find "Format>Tab Navigation"?
    1. https://www.maplesoft.com/support/help/Maple/view.aspx?path=worksheet/documenting/tabkey

Thanks for the help.

in some of my function i have a big problem which i can't plot thus function even i know what is the shape of plot, i have two type of ploting directly giving parameter and using explor but for this kind of plot we can't use explor so i have to give the function directly parameter but is wasting my time a lot and i can't get my plot even spending a days by changing parameter one by one, my questions is this how i can plot this kind of function without bieng a singular i need this function to be non singular is not importan about the parameter can be any number 
thanks for any help 

plots-long_term_.mw

the shape of plot must be like this but must have two of them 

Dear all

I get error when solving Riccati equation. I want to get six different solution. 

ricatti_equation.mw

thank you for your help

In the attached file, I want to restrict the indices of the summation to gcd(m,n)=1. How does this work?

test.mw

I’m trying to plot a 3D surface in Maple with variables l and m. I used numerical substitution to evaluate the function and the results are real and positive. However, when I plot the function over a range of l and m, the graph shows complex (imaginary) values instead.

This seems very strange to me and has been quite frustrating. I’ve tried many different approaches to resolve the issue, but nothing has worked so far.

Why is this happening? How can the function evaluate to real numbers with direct substitution, but show complex values during plotting?

Any suggestions or explanations would be greatly appreciated. Thank you!
gra423_Omega.mw

This seems rediculous to have to ask. I just want to display a plane. The plot is used in other plots so I gave it a name. I get "length of output exceed 1000000" and the plot does not display. I then have to "display" the plot name "display(plt0)" to see it. I had tried geom3d but found if infuriating, (maybe I am missing something there).

An I missing something simple here?

restart

NULL

with(plots)

pln := x-2*y+3*z

x-2*y+3*z

(1)

NULL

display(implicitplot3d(pln, x = -3 .. 3, y = -3 .. 3, z = -3 .. 3, style = patchnogrid, transparency = .6))

 

NULL

NULL

plt0 := display(implicitplot3d(pln, x = -3 .. 3, y = -3 .. 3, z = -3 .. 3, style = patchnogrid, transparency = .6))

`[Length of output exceeds limit of 1000000]`

(2)

display(plt0)

 

Intended use

NULL

Download 2025-05-18_Q_display_a_simple_plane.mw

In the attached file, I was unable to calculate the limit values ​​L and M. Please help me.

test.mw

Same exact code. When adding Physics:-Setup(assumingusesAssume = true):  before, now pdsolve do not give solution.

Removing Physics:-Setup(assumingusesAssume = true): now it works.

Why? Should not solution be returned in both cases?

interface(version);

`Standard Worksheet Interface, Maple 2025.0, Linux, March 24 2025 Build ID 1909157`

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 1872 and is the same as the version installed in this computer, created 2025, May 17, 22:58 hours Pacific Time.`

SupportTools:-Version();

`The Customer Support Updates version in the MapleCloud is 17 and is the same as the version installed in this computer, created May 5, 2025, 12:37 hours Eastern Time.`

restart;

Example 1. Adding Physics:-Setup(assumingusesAssume = true): makes pdsolve fail

 

Physics:-Setup(assumingusesAssume = true):

pde := diff(u(r, t), t) = k*diff(u(r, t), r$2):
ic  := u(r,0)=r*f(r):
bc  := u(0,t)=0,u(a,t)=a*phi(t):
sol:= pdsolve({pde, ic, bc}, u(r, t));

 

 

Example 2. Same code but removing Physics:-Setup(assumingusesAssume = true): makes it work

 

restart;

pde := diff(u(r, t), t) = k*diff(u(r, t), r$2):
ic  := u(r,0)=r*f(r):
bc  := u(0,t)=0,u(a,t)=a*phi(t):
sol:= pdsolve({pde, ic, bc}, u(r, t));

u(r, t) = Sum(2*sin(n*Pi*r/a)*exp(-k*Pi^2*n^2*t/a^2)*(Int(r*(-phi(0)+f(r))*sin(n*Pi*r/a), r = 0 .. a))/a, n = 1 .. infinity)+Int(Sum(2*sin(n*Pi*r/a)*exp(-k*Pi^2*n^2*(t-tau)/a^2)*(diff(phi(tau), tau))*a*(-1)^n/(n*Pi), n = 1 .. infinity), tau = 0 .. t)+r*phi(t)

 


 

Download pdsolve_fail_when_adding_assuming.mw

I'm currently working on applying a specific method to solve a nonlinear equation. However, I've encountered a recurring issue: during the process, I often cannot determine certain parameters, which forces me to abandon the solution or switch to a different method. This has happened multiple times and is disrupting my goal of applying all intended methods consistently to a single equation.

In particular, I’m struggling to identify the correct parameters for U(ξ), which are essential for the solution. This challenge is not limited to one method I’ve faced similar problems in previous attempts, and I’m unsure why these parameters cannot be derived in some cases.

My question is: How can I manage this issue effectively? Is there a reliable way to predict or determine whether the necessary parameters will emerge correctly before fully applying a method?

I would greatly appreciate any insights or strategies you could share to help me handle this problem more systematically.

Thank you in advance for your support.

runing.mw

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