nm

8552 Reputation

19 Badges

12 years, 349 days

MaplePrimes Activity


These are questions asked by nm

Where do you think label="dontexpand" is coming from in the following? I never seen this before. Is this a bug?

When using PDEtools:-Solve no such error shows up. Worksheet below

998948

interface(version);

`Standard Worksheet Interface, Maple 2023.0, Windows 10, March 6 2023 Build ID 1689885`

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 1462 and is the same as the version installed in this computer, created 2023, June 10, 2:26 hours Pacific Time.`

restart;

998948

sol:=sum((-2*_R^2+1)/(6*_R^2+4*_R-1)*ln(y(x)/x-_R),_R = RootOf(2*_Z^3+2*_Z^2-_Z+1))-ln(x)-c[1] = 0;
solve(sol,y(x))

sum((-2*_R^2+1)*ln(y(x)/x-_R)/(6*_R^2+4*_R-1), _R = RootOf(2*_Z^3+2*_Z^2-_Z+1))-ln(x)-c[1] = 0

Error, (in solve) cannot solve expressions with sum((-2*_R^2+1)/(6*_R^2+4*_R-1)*ln(y(x)/x-_R),_R = RootOf(2*_Z^3+2*_Z^2-_Z+1,label = "dontexpand")) for y(x)

PDEtools:-Solve(sol,y(x))

y(x) = exp(-c[1])+_R*x

 

Download dontexpand_june_10_2023.mw

How can one set their own symbols for DynamicSystems continuoustimevar?  If I try to use DynamicSystems:-SystemOptions('continuoustimevar'=x): or DynamicSystems:-SystemOptions('continuoustimevar'=y): Maple complains that these letters are already assigned. Why can not one have their own choice of which letters to use?  Is there a workaround?


 

858904

interface(version);

`Standard Worksheet Interface, Maple 2023.0, Windows 10, March 6 2023 Build ID 1689885`

restart;

858904

DynamicSystems:-SystemOptions('continuoustimevar'=t):

restart;

858904

DynamicSystems:-SystemOptions('continuoustimevar'=x):

Error, (in DynamicSystems:-SystemOptions) cannot assign x to continuoustimevar, already assigned to statevariable

restart;

858904

DynamicSystems:-SystemOptions('continuoustimevar'=y):

Error, (in DynamicSystems:-SystemOptions) cannot assign y to continuoustimevar, already assigned to outputvariable

restart;

858904

DynamicSystems:-SystemOptions('continuoustimevar'=XXXXXX):

 


 

Download dynamics_june_9_2023.mw

 

When adding singsol=all to this ode in the first example, dsolve returns nothing. But it should have returned the general solution if it can not find singular solution. This is what it does always as can be seen from the second example given below.

Why did dsolve return nothing in the first example? Is this a bug?

319824

interface(version);

`Standard Worksheet Interface, Maple 2023.0, Windows 10, March 6 2023 Build ID 1689885`

restart;

319824

ode:=y(x)=x*diff(y(x),x)+ a*diff(y(x),x)/(sqrt(1+diff(y(x),x)^2));
sol_1:=dsolve(ode,y(x));
sol_2:=dsolve(ode,y(x),singsol=all);

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

y(x) = x*c__1+a*c__1/(c__1^2+1)^(1/2)

"sol_2 := "

ode:=diff(y(x),x)^2-(1+2*x*y(x))*diff(y(x),x)+2*x*y(x) = 0;
sol_1:=dsolve(ode,y(x));
sol_2:=dsolve(ode,y(x), singsol=all)

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

y(x) = c__1*exp(x^2), y(x) = x+c__1

y(x) = c__1*exp(x^2), y(x) = x+c__1

 

Download missing_sol.mw

I am surprised Maple could not do this integral. Any ideas how to make it do it?

restart;
integrand:=(ln(-x + sqrt(x^2 - 1))*x + sqrt(x^2 - 1))*x*sqrt(-x^2 + 1)/sqrt(x^2 - 1);
int(integrand,x)

For reference, another software gives

ClearAll[x]
integrand = (Log[-x + Sqrt[x^2 - 1]]*x + Sqrt[x^2 - 1])*x*Sqrt[-x^2 + 1]/Sqrt[x^2 - 1]
Integrate[integrand, x]

Which I verified to be correct.

Any workarounds? I tried assuming x>0 for example. Not sure what else to try now. I am sure with some pre-processing Maple can do it. 

Maple 2023

When running "C:\Program Files\Maple 2023\bin.X86_64_WINDOWS\cmaple.exe" on my application which makes plots and export them to ps, sometimes I get an exception

              "cannot locate postscript AFM files"

This happens on some plots. Not all. The strange thing, using the same exact run, but from the worksheet, it works fine and I get the .ps generated with no such error. This only happens when running from the command line. It happens here


try
   plotsetup(ps, plotoutput="plot.ps",plotoptions=noborder);
   print(p1);   
   plotsetup(default):
catch:
   print(StringTools:-FormatMessage( lastexception[2..-1] ));
end try;

where p1 above is a plot that was generated earlier OK with no error. I made sure there is no font settings on the plot or any extra options that might cause a problem.

I am not able to make MWE as this problem only shows deep inside my application and only when calling Maple from command line and only shows up on very few plots for some reason I do not understand.  When I made a small .mpl with same code used to make the plot, and run it from command line, the error do not show up. It only shows up when running the whole application from the command line. 

My question is: How does Maple find these postscript AFM files? It looks like the postscript driver used by command like Maple is older than the one used by the frontend/GUI and this is why this error only shows from the command line. Has anyone seen such a Maple error before? 

I have no idea where to find these AFM postscript files it says it can't find and what to do now. I am on windows 10.

Any suggestion what to lookfor and anything else I can do to help me find the cause of this?

If it is any help, here is the MWE I tried to reproduce this with. But this generated no error. Call this foo.mpl

foo:=proc()
local p1,ode,y,x;
   ode:=3*y(x)+x*diff(y(x),x) = 2*x^5;
   p1 := DEtools:-phaseportrait(ode,y(x),x=-1..5,[y(2)=1],y=-1000..1000):
   try
      plotsetup(ps, plotoutput=cat("C:/tmp/plot.ps"),plotoptions=noborder);
      print(p1);   # also tried without "display"
      plotsetup(default):
   catch:
      print(StringTools:-FormatMessage( lastexception[2..-1] ));
      print("Exception");
   end try;
end proc;

foo();

Then run 

 

C:\tmp>"C:\Program Files\Maple 2023\bin.X86_64_WINDOWS\cmaple.exe"  foo.mpl

No error. The error only shows in my large application.

                             "cannot locate postscript AFM files"

Will keep trying to make a MWE, but for 3 hrs now, no luck yet.

Update

I've added 

if lasterrorlocus<>'lasterrorlocus' then
                     print(lasterrorlocus);
                     showsource();
end if; 

Inside the catch, which print the exact location of the exception generated. It is at print(p1) as you see

again, same code runs with no problem from the worksheet. This only shows when running from command line. Will keep trying to make MWE...

First 11 12 13 14 15 16 17 Last Page 13 of 164