error with in diff...

dear all

am trying to do a task that Find all the roots of the equation (or three roots if there are more than three roots in the equation) by Newton's method f(x) = e^x^2 sin(x-5) accuracy = 10^-5 maple

and i wrote this code on maple

f := x -> exp(x^2)*sin(x - 5);
df := x -> evalf(diff(f(x), x));
x0 := -1.0;
tol := 0.00001;
for i to 3 do
x := x0;
n := 0;
while tol < abs(f(x)) do
x := x - f(x)/df(x);
n := n + 1;
end do;
printf("Root %d: %.5f (found in %d iterations)\n", i, x, n);
x0 := x + 1.0;
end do;
f := proc (x) options operator, arrow; exp(x^2)*sin(x-5) end proc

df := proc (x) options operator, arrow; evalf(diff(f(x), x))

end proc

x0 := -1.0

tol := 0.00001

x := -1.0

n := 0

am getting an error message

" Error, (in df) invalid input: diff received -1.0, which is not valid for its 2nd argument "

hope you can help me with this issue

strange characters in Maple's code editor on .mpl ...

in Maple 2023 one can do File->Open and select an .mpl file and that will automatically open in new window using code editor.  see Maple2023-CodingTools.pdf

One problem I saw right away on windows 10, is that the diagonstic window has funny character at the end of the messages. Here is screen shot

To see if you reproduce this, here is the code I used. Simply save this in foo.mpl file and then use Maple file->open to open it (must use 2023 only for this to work)

```A_class :=module()
option object;

#my variable
export c::integer;

export a::integer;

end module;
```

That is not all. If I simply shift the code up so the starting line in the file is not empty as above, the funny characters change to something else

Yet, it is the same exact code.  Can any one confirm this problem, and how to fix it so one can read the variable name?

I think I will stick to using notepad++ for my .mpl files for now.

I have some c# function that i want to use in maple, and I doing all according to this arcticle : https://www.mapleprimes.com/posts/38019-Calling-Out-To-C-From-Maple
but i still get this:
Any ideas what i should do?

Task insertion doesn't work anymore....

Hi MaplePrimes,

I've updated to the 2023 version of Maple. After the update I chose to remove older version folders in Windows.

Since then I cant't use my tasks any longer. I've re created the tasks and the are also shown in the Task Palette, but clicking on a task results in nothing. I can though create a new Task and after the creation all my tasks can then be used again.

Its like Maple doesn't recognize the correct Help Database from the beginning. I've reinstalled Maple 2023 two or three times to try to reset the whole installation to something from scratch. Nothing that I do seems to produce the desired result. Does anybody out there have a solution or suggestion to a probable solution?

I don't know of any file that I could attach to exemplify my problem. It's not a math/maple problem relating directly to the maple code language. My tasks themselves work fine once inserted in a document. It's the insertion itself that's the problem.

Thanks.

How to obtain more accuracy at discontinuous point...

Consider the worksheet below containing a function that I came across while studying Apostol's Calculus.

At the origin, this function has a defined directional derivative in all directions. It is not, however, continuous at the origin. We can see this by consider all points on the parabola x=y^2 except for the origin. The function takes on the value 1/2 on all such points but has value 0 at the origin and is thus discontinuous there.

My question is about a 3d plot of this function.

The plot seems a bit inaccurate because the ridge at the top extends all the way to the origin.

If I hadn't done the calculations to know this, this plot would not give me this information.

Is there a way to avoid this problem? Ie, to get more accuracy at points such as the origin here?

 > f := (x,y) -> piecewise(x=0, 0, x <> 0, x*y^2/(x^2+y^4))
 (1)
 > plot3d(f,-1..1,-1..1)
 > f(y^2,y)
 (2)
 >

Trouble getting Mantissa and Exponent...

Not getting Mantissa or Exponentb See Bottom

|\^/|     Maple 2022 (X86 64 LINUX)
._|\|   |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2022
<____ ____>  Waterloo Maple Inc.
|       Type ? for help.
# eqno = 10
> it := solve({
> 83.0 =  (57.9467777777778) * C_prev  + (-1.001) * C_ksteps  + (-67.1782222222222) * C_fat  + (-91.8695555555555) * C_carb  + (-24.4021555555556) * C_prot  + (-11.5003777777778) * C_fiber  + (-3.21432222222223) * C_sugar  + (-14.1697111111111) * C_saturated  + (-1.61272222222222) * C_fasted  + (1.01),
> 153.0 =  (-11.1222222222222) * C_prev  + (-1.001) * C_ksteps  + (99.9887777777778) * C_fat  + (22.2444444444444) * C_carb  + (48.3705444444444) * C_prot  + (17.2283222222222) * C_fiber  + (-5.21632222222223) * C_sugar  + (9.15358888888888) * C_saturated  + (0.389277777777778) * C_fasted  + (1.01),
> 84.0 =  (-17.1282222222222) * C_prev  + (-1.001) * C_ksteps  + (49.9387777777778) * C_fat  + (17.2394444444444) * C_carb  + (7.72994444444445) * C_prot  + (5.01612222222222) * C_fiber  + (29.8186777777778) * C_sugar  + (10.6550888888889) * C_saturated  + (1.39027777777778) * C_fasted  + (1.01),
> 78.0 =  (-8.11922222222223) * C_prev  + (0.) * C_ksteps  + (-23.1342222222222) * C_fat  + (16.2384444444445) * C_carb  + (-26.1038555555556) * C_prot  + (-12.7015777777778) * C_fiber  + (31.8206777777778) * C_sugar  + (6.05048888888888) * C_saturated  + (-1.61272222222222) * C_fasted  + (1.01),
> 87.0 =  (-8.11922222222223) * C_prev  + (3.003) * C_ksteps  + (-19.1302222222222) * C_fat  + (28.2504444444444) * C_carb  + (-16.4942555555556) * C_prot  + (-5.09397777777778) * C_fiber  + (6.79567777777777) * C_sugar  + (14.7591888888889) * C_saturated  + (-0.111222222222222) * C_fasted  + (1.01),
> 87.0 =  (37.9267777777778) * C_prev  + (-4.004) * C_ksteps  + (-48.1592222222222) * C_fat  + (-83.8615555555555) * C_carb  + (-6.08385555555555) * C_prot  + (0.611722222222222) * C_fiber  + (-58.0691222222222) * C_sugar  + (-20.0756111111111) * C_saturated  + (-1.61272222222222) * C_fasted  + (1.01),
> 133.0 =  (-17.1282222222222) * C_prev  + (3.003) * C_ksteps  + (-56.1672222222222) * C_fat  + (15.2374444444444) * C_carb  + (13.4356444444444) * C_prot  + (3.01412222222222) * C_fiber  + (13.8026777777778) * C_sugar  + (-12.2678111111111) * C_saturated  + (-0.111222222222222) * C_fasted  + (1.01),
> 78.0 =  (-11.1222222222222) * C_prev  + (1.001) * C_ksteps  + (52.9417777777778) * C_fat  + (-2.78055555555555) * C_carb  + (5.82804444444444) * C_prot  + (-0.589477777777777) * C_fiber  + (-39.5506222222222) * C_sugar  + (-0.0556111111111198) * C_saturated  + (4.39327777777778) * C_fasted  + (1.01),
> 84.0 =  (-23.1342222222222) * C_prev  + (0.) * C_ksteps  + (10.8997777777778) * C_fat  + (79.3014444444444) * C_carb  + (-2.28005555555555) * C_prot  + (4.01512222222222) * C_fiber  + (23.8126777777778) * C_sugar  + (5.95038888888888) * C_saturated  + (-1.11222222222222) * C_fasted  + (1.01) },
> [C_prev, C_ksteps, C_fat, C_carb,
>  C_prot, C_fiber, C_sugar, C_saturated,
>  C_fasted]);
16                              18
it := [[C_prev = -0.7676394482 x 10  , C_ksteps = 0.1095758760 x 10  ,

16                             16
C_fat = 0.7856937061 x 10  , C_carb = -0.5792833066 x 10  ,

17                             17
C_prot = -0.1954662069 x 10  , C_fiber = 0.3025217874 x 10  ,

15                                  17
C_sugar = 0.7496058869 x 10  , C_saturated = -0.1779505040 x 10  ,

18
C_fasted = -0.1062355291 x 10  ]]

> C_prev_V := it[1][1];
16
C_prev_V := C_prev = -0.7676394482 x 10

> C_prev_M := SFloatMantissa(C_prev_V);
16
C_prev_M := C_prev = -0.7676394482 x 10

> C_prev_E := SFloatExponent(C_prev_V);
16
C_prev_E := C_prev = -0.7676394482 x 10

> quit;
memory used=2.3MB, alloc=8.3MB, time=0.03

is it possible to identify mserver.exe in task man...

I always run with the option "create a new engine for each document". which is a very nice feature in Maple.

The problem is that, when I have say 5 worksheets open and running, and one of them them hangs, I need to kill mserver.,exe from the task manager which is running this worksheet.

most of the times I end up killing the wrong mserver.exe. I can sometimes guess by the CPU it is using. But if I have two running with high CPU it is not possible guess.

There is no ID or anything associated with the name. It will be nice if each process has in its name an ID which is also displayed in the worksheet bottom bar so one knows. This ID could be simply some random number. So the display will show  mserver-13847,exe ,   mserver-82739,exe and so on. And this name will be automtically displayed at the bottom bar of the worksheet where all time used, cpu used and memory used and so on is now displayed.  This will be a nice feature to add to Maple.

If this is not possible, how about just displaying the PID (process ID)  of the mserver.exe connected to the worksheet in the bottom bar? This will also work, as task manager/details lists a processes with the PID there, so it will make it easy to find.

Meanwhile, while waiting for Maple 2033 to hopefully implement this feature, does anyone know of a method to help find which mserver.,exe is connected to which specific worksheet?

Windows 10.

Some unit questions about angles...

Q1: In the above, why can I only convert radians to radians. Or: Why does the menu "Chose unit" not offer arcdeg?

Q2: In the above, why is nothing happening when I enter arcdeg in the field "Enter Unit"?

Q3: How to change the displayed symbol for arcdeg to ° (in the attachment are failed attempts)?

arcdeg.mw

Surface of Revolution...

Hi,

How to determinate cartesian equation of Surface of revolution S ( obtained by rotation of curve around line

) and how to illustrat it geometricly ?

Thanks
QuestionRev.mw

int displays large output on the screen on same co...

Do others see this problem? I do not understand what is going on. I am seeing this problem on many integrals

```restart;
int(integrand)
#Large output displayed
#echo the input
int(...)
#Large output displayed
#echo the input
int(...)
#echo the input only. Large output gone
int(...)
#echo the input only. Large output gone

restart;
int(...)
#Large output displayed
#echo the input
int(...)
#echo the input only. Large output gone
int(...)
#echo the input only. Large output gone

```

In all the above, it is the same command used.

i.e. first time (sometimes needs two times), Maple displays large out. But looking at the end of this output, the very last line, we see the same integral/command is returned.

But second time and any attempt after that, it no longer gives that large output, but returns back/echos the command on the screen only.

Attached is worksheet showing this. This is new behaviour in Maple 2023 and I am baffled by it. Do others see it? Why does it happen. I will report it if others confirm it. I just wanted to make sure first it is not just me seeing this.

Is it possible the large output is side effect and is being printed by error to the screen by internal Maple code? But why does it stop the second/third time?

 > interface(version);

 > restart;
 > int((b*g*x+a*g)^2/(A+B*ln(e*(b*x+a)/(d*x+c))),x)

 > int((b*g*x+a*g)^2/(A+B*ln(e*(d*x+c)/(b*x+a))),x)

Warning, if e is meant to be the exponential e, use command/symbol completion or palettes to enter this special symbol, or use the exp function

Warning, if e is meant to be the exponential e, use command/symbol completion or palettes to enter this special symbol, or use the exp function

Warning, if e is meant to be the exponential e, use command/symbol completion or palettes to enter this special symbol, or use the exp function

Warning, if e is meant to be the exponential e, use command/symbol completion or palettes to enter this special symbol, or use the exp function

Warning, if e is meant to be the exponential e, use command/symbol completion or palettes to enter this special symbol, or use the exp function

 > int((b*g*x+a*g)^2/(A+B*ln(e*(d*x+c)/(b*x+a))),x)

 > int((b*g*x+a*g)^2/(A+B*ln(e*(d*x+c)/(b*x+a))),x)

 > int((b*g*x+a*g)^2/(A+B*ln(e*(d*x+c)/(b*x+a))),x)

 > restart;
 > int((b*g*x+a*g)^2/(A+B*ln(e*(d*x+c)/(b*x+a))),x)

Warning, if e is meant to be the exponential e, use command/symbol completion or palettes to enter this special symbol, or use the exp function

Warning, if e is meant to be the exponential e, use command/symbol completion or palettes to enter this special symbol, or use the exp function

Warning, if e is meant to be the exponential e, use command/symbol completion or palettes to enter this special symbol, or use the exp function

Warning, if e is meant to be the exponential e, use command/symbol completion or palettes to enter this special symbol, or use the exp function

Warning, if e is meant to be the exponential e, use command/symbol completion or palettes to enter this special symbol, or use the exp function

 > int((b*g*x+a*g)^2/(A+B*ln(e*(d*x+c)/(b*x+a))),x)

 >
 >

Update

Do you want to see something more bizzar? Try this command on same integral

```restart;
res:=int((b*g*x+a*g)^2/(A+B*ln(e*(b*x+a)/(d*x+c))),x,method=_RETURNVERBOSE)
```

It prints to the screen results with ~ all over. But this seems to be internal leaked output and not part of the actual output returned.

By issuing the command as follows instead

```restart;
res:=int((b*g*x+a*g)^2/(A+B*ln(e*(b*x+a)/(d*x+c))),x,method=_RETURNVERBOSE):
```

notice the at the end!  I still see the same output as above printed displayed.

This tells me this is a leaked printout from an internal integration function.

Could others confirm this?

Latex in ShowSolution...

How would I produce output from ShowSolution in Latex form?

For example, if I run the following command.

\$ maple2022/bin/maple -q problem.mpl

where problem.mpl is the following:

with(Student[Calculus1]):
ShowSolution(Diff(ln(x),x));

I get the following output.

Differentiation Steps
Diff(ln(x),x)
▫    1. Apply the natural logarithm rule
◦ Recall the definition of the natural logarithm rule
Diff(ln(x),x) = x^(-1)
This gives:
x^(-1)

I want the solver to show the steps in Latex form. How can I achieve this?

why Maple 2023 return "undefined" embbeded inside ...

First issue I see in Maple 2023 integrate

Example 1

```restart;
int( (e*x+d)^(3/2)*(c*x^2+a)^(3/2),x)
```

Example 2

```restart;
int((1+x)^(3/2)*(x^2-x+1)^(3/2),x);
```

Example 3

```restart;
int((c*x^4+b*x^2)^(3/2)/x^(3/2),x)
```

Worksheet below for 2023 and also for 2022.2 showing this did not have this problem in 2022.2. Internally for me, this cause other problem when post-processing this, that is why I found it. Any one knows what caused it?  Maple 2022.2 result is much longer, but it does have this "undefined" issue in the result.

 > interface(version);

 > restart;
 > int( (e*x+d)^(3/2)*(c*x^2+a)^(3/2),x)

 > restart;
 > int((1+x)^(3/2)*(x^2-x+1)^(3/2),x);

 > restart;
 > int((c*x^4+b*x^2)^(3/2)/x^(3/2),x)

 >

 > interface(version);

 > restart;
 > int( (e*x+d)^(3/2)*(c*x^2+a)^(3/2),x)

 > restart;
 > int((1+x)^(3/2)*(x^2-x+1)^(3/2),x);

 >

PDF Manuals for 2023?...

When will the PDF Maple User Manual be released for Maple 2023. Also I hope the Programming guide is updated too as it is still at 2020.

Maple 2023 networktool installation problem...

I know that this is not really a question regarding core Maple package, but I am running into problems during the installation process.

After having upgraded Maple networktools as mentioned, I am unable to run the activation program due to an error.

"Java Virtual Machine Launcher: Error: Could not create the Java Virtual Machine."

I've never had that problem before in previous versions. There was no Java installed on the (virtual) server, so I installed the latest OpenJDK to check if that solved the problem.

Unfortunately it didn't.

Any hints would be appreciated.

Windows Server 2012R2

Are there any bugs in eval['recurse'], applyrule, ...

The command for doing syntactical exact-match substitutions is subs, however, subs applies transformation rules throughout an expression only once. The documentation of eval claims that the (recursive) evaluation is repeated until either the result does not change, the documentation of applyrule claims that applyrule … applies the rules until no rule can be applied any more, and the documentation of MmaTranslator[Mma][ReplaceRepeated] claims that the single ReplaceRepeated command performs replacements until expression no longer changes.
So, if I comprehend correctly,

```restart;
x := [[[[]]]]: # Remove empty lists from x repeatedly.
(*⒈*) eval['recurse'](x, [[] = 'NULL']);
(*⒉*) applyrule([[] = 'NULL'], x);
(*⒊*) MmaTranslator:-Mma:-ReplaceRepeated(x, [[] = NULL])
```

should all return `NULL`, but in fact,

```eval['recurse'](x, [[] = 'NULL']);
=
[[[[]]]]

applyrule([[] = 'NULL'], x);
Error, (in PatternMatching:-AlgStruct:-TableLookup) invalid input: unknown uses a 1st argument, x, which is missing
MmaTranslator:-Mma:-ReplaceRepeated(x, [[] = NULL]);
=
() = ()

```

In other words, none of these replacements is feasible.

Have I missed something? (It seems to me that an explicit procedural `do...until` loop can be actually avoidable here!)

 5 6 7 8 9 10 11 Last Page 7 of 2213
﻿