## least square curve fitting ...

can someone help me curve fitting these parameeters...i only got 1 for all of this 90As4.mw

 >
 >
 >
 >
 >
 >
 >
 >
 (1)
 >
 The solution was obtained with the following warning:   no iterations performed as initial point satisfies first-order conditions
 (2)

## How to stop truncating?...

How do I stop truncation in Maple 2023?  Everything was working fine yesterday but today all of a sudden all assignments are truncated to only 10 digits.

If:

```with(Units) :

a_Terra := 149598023.*Unit(km) :
A_Luna := 0.136 :
L_Sol := 3.75E28*Unit(lm) :
S_sphere := r -> 4*Pi*r^2 :

J_Luna := A_Luna*L_Sol/S_sphere(a_Terra) :
```

Then:

"" gives ""

but

"" gives ""

"" without "`evalf`" also provides a truncated number instead of showing the "`Pi`" for an exact value.  So something is wrong in the assignment settings.

Somehow the settings must have changed for how assignments are stored. The answer is irrational with a factor of "`1/Pi`" and so should not be truncated for calculations.  "`a_Terra`" is assigned with 9 significant digits ("" km) which I am wondering if maybe why "`evalf`" is truncating to 10 digits (though it should round and not truncate in that case) but it wasn't doing this before.

"Tools --> Options --> Precision" hasn't changed is set globally to round screen display to 32 decimal places and to round calculation to 64 significant digits.

## arcsecond versus arcsecant...

Is there a way to reassign the arcsecant function "arcsec()" as "asec()" so that "arcsec" can be assigned to the arcsecond unit "Unit(arcsec)"?

Ideally, I would like all of the inverse trigonometric functions to use the shorter notation "asec()" instead of "arcsec()".  I usually do this as aliases, i.e. "alias(asin = arcsin) : alias(asec = arcsec) :" but this won't allow reusing "arcsec" for a unit instead.

Example error for Maple 2023:

```alias(asec = arcsec) :
AddUnit(astronomical_unit, context = astronomy, default = true, prefix = SI, conversion = 149597870700*m) : # https://en.wikipedia.org/wiki/astronomical_unit
AddUnit(second, context = angle, spelling = arcsecond, plural = arcseconds, symbol = arcsec, prefix = SI_negative) :

AddUnit(parsec, context = astronomy, default = true, prefix = SI, conversion = AU/tan(arcsec)) ; # https://en.wikipedia.org/wiki/Parsec#Calculating_the_value_of_a_parsec```

"Pi/648000" has to be used instead of "arcsec" here when defining the parsec since "arcsec" is already reserved for the arcsecant function, even with "alias(asec = arcsec) ;".

Correction: it looks like the parsec was redefined by the IAU in 2012 as exactly "648000*AU/Pi" without any tangents (or sines) in the definition (so the angle subtended by 1 AU at 1 PC is actually 0.999999999992" not 1").  Both "astronomical_unit" and "parsec" have the wrong values in Maple 2023 which need to be corrected manually.  But the conflict between arcseconds and arcsecants remains the same.

https://iau.org/static/resolutions/IAU2015_English.pdf

https://iopscience.iop.org/article/10.3847/0004-6256/152/2/41

## trouble installing Syrup...

I am trying to install Syrup in my home computer (I have it installed in my work computer).  I followed the instructions in the Readme file:

From Standard Maple:
Open the file Syrup-Installer.mla.
To do so, use File -> Open, choose file type
"Maple Library Archive (.mla)", select the file, and
click "Open".

Everything seemed to work and the help page opened up:  But, it is not the syrup help page.  furthermore, when I type ?Syrup, it doesn't open it either.

When I try to run a worksheet that uses Syrup (that works on my work computer), I get these errors:

I"m going to reboot now and try again.

Jorge

## solve elliptic PDEs...

As Maple is not equipped to handle numerical solutions of elliptic PDEs, can anyone help top solve PDEs by finite differences or any other numerical solver?

pde.mw

## Can I convert InlinePlot(P3) back to a regular plo...

See attached worksheet in Maple 2023.

This example is taken from the Maple help page. I want to 'zoom in' on a plot3d object. The only way I have found was from responses [1] on the maple primes forum. It uses InlinePlot and the scale option to perform the 'zoom in'. Since InlinePlot generates the plot in terms of XML there is no graphic out, only a text based output. In order to reconstitute the InlinePlot as a plot object I can view visually I need to use some additional commands from the DocumentTool package. This is all great but the output, which in our case is P3, is not a plot object and therefore cannot be exported as a png. Is there a way to convert the InlinePlot with the scaling applied back to a typical plot object so I can export it as a .png, using Export("output_plot.png",P3,base=worksheetdir)?

can_I_convert_InlinePlot(P3)_back_to_a_regular_plot_object_so_I_can_export_it_as_a_png.mw

## Is this a bug or does Maple hate me? ...

I am running Maple 2023 - yes I should update - and I found a weird "bug" if you could call it that. For different versions of the Physics package I am getting different answers on the same problem.

This is what I was getting when I run Version 1410:

 > restart;
 > with(Physics):

 > Physics:-Version()
 (1)
 > Setup(mathematicalnotation=true):
 > g_[arbitrary]:
 (2)
 > LG :=(g_[~mu,~nu]*Ricci[mu,nu])*sqrt(-%g_[determinant]);
 (3)
 > SG:=Intc(LG,X)
 (4)
 > EQ:=Fundiff(SG,%g_[~delta,~gamma])/sqrt(-%g_[determinant])
 (5)
 > Simplify(subs(%g_=g_,EQ))
 (6)
 >
 >

And this is what I get if I used the latet update for 2023, Version 1683:

 > restart;
 > with(Physics):
 > Physics:-Version();
 (1)
 > Setup(mathematicalnotation=true):
 > g_[arbitrary]:
 (2)
 > LG :=(g_[~mu,~nu]*Ricci[mu,nu])*sqrt(-%g_[determinant]);
 (3)
 > SG:=Intc(LG,X)
 (4)
 > EQ:=Fundiff(SG,%g_[~delta,~gamma])/sqrt(-%g_[determinant])
 (5)
 > Simplify(subs(%g_=g_,EQ))
 (6)
 >

Strange right? I bring this up because it makes me wonder about potential errors in other computations...

The answer - equation 6 - in 1410 is the correct answer. This is simply a derivation of the Einstein Tensor.

## why do i have a problem?...

I`m trying execute the example of Deeplearnig:

with(DeepLearning);
v1 := Vector(8, i -> i, datatype = float[8]);
v2 := Vector(8, [-1.0, 1.0, 5.0, 11.0, 19.0, 29.0, 41.0, 55.0], datatype = float[8]);
model := Sequential([DenseLayer(1, inputshape = [1])]);
model := Vector(2, {(1) = Typesetting:-mi("`DeepLearning

Model`"), (2) = Typesetting:-mi("`<keras.engine.sequential.Se\

quential object at 0x000001C5B6520700>`")})

model:-Compile(optimizer = "sgd", loss = "mean_squared_error");
model:-Fit(v1, v2, epochs = 500);
"<Python object: <keras.callbacks.History object at 0x000001C5CC\

EE9DE0>>"

convert("<Python object: <keras.callbacks.History object at 0x000001C5CCEE9DE0>>", 'symbol');
<Python object: <keras.callbacks.History object at 0x000001C5CCE\

E9DE0>>

model:-Predict([10]);

But, finally, there is this error:

Error, (in Predict) AttributeError: 'CatchOutErr' object has no attribute 'flush'

['Traceback (most recent call last):\n', '  File "C:\\Program Files\\Maple 2023\\Python.X86_64_WINDOWS\\lib\\site-packages\\keras\\utils\\traceback_utils.py", line 70, in error_handler\n    raise e.with_traceback(filtered_tb) from None\n', '  File "C:\\Program Files\\Maple 2023\\Python.X86_64_WINDOWS\\lib\\site-packages\\keras\\utils\\io_utils.py", line 80, in print_msg\n    sys.stdout.flush()\n', "AttributeError: 'CatchOutErr' object has no attribute 'flush'\n"]

What`s is happening?

Thanks!

## Avoiding the "roots of complex number"...

Hello,

I'm encountering an issue with the "roots of complex number" message while running my Maple code. Maple seems unable to solve this problem for me.

I would greatly appreciate any ideas or suggestions that could help me resolve this error.

Vib-code.mw

## How do I solve an invalid subscript selector in my...

I keep getting an error: invalid subscript selector on specifically this part of my code:

MuligIndgange := subsop(RemoveList\[i\]=NULL, MuligIndgange).
Whenever I comment out the MuligIndgange := part it works.

I can't for the life of me see why it's happening, and whenever I use this code outside my proc it works aswell.

Any help is appreciated, and if you need more context I'll be happy to give it.

for i to numelems(MuligIndgange) do
if M1[MuligIndgange[i][1], MuligIndgange[i][2]] =/= 0 then
RemoveList := [op(RemoveList), i];
end if;
end do;
for i from numelems(RemoveList) by -1 to 1 do
MuligIndgange := subsop(RemoveList[i] = NULL, MuligIndgange);
end do;

## Can't Locate Setting For Behavior...

Simple question (I'm sure) here.  I have one worksheet where the variable does not show up in the ouput of an assignment like this:

whereas I was expecting the output to include the variable being assigned like this in most other worksheets:

I am having some difficulting locating the cause (and therefore the setting) to have the behavior set back to including the variable name in the ouput.  Thanks in advance for your help.

## To overlay one column graph on top of another...

Is it possible overlay one column graph on top of another ? And if, how do I do it?

Regards

## Optional parameter naming...

I have a repetative set of parameter names used in procedures in a package. I settled on making all optional inputs in the format {name::type:=something}. Originally I wanted to use non capitalised names for the optional inputs. But the names clash with Maple commands. I have all sorts of quicky abbreviations like prnt etc. These are both messy and tacky. For many of my choices I would seem to have to use capitalised naming to give a meaningful name. The problem here is these names are used in other Maple packages. So sooner or later there is going to be a clash.

Is there a way a of handling this? Like can I defiine package parameter names? Or should I just stick with my abbreviations?

I read somewhere about this problem in the help years ago. I think Basis was the example used in different packages GroebinerBasis and Polynomial package and using PackageName:-Basis to avoid the clash with both loaded. But that is more a command level handling.

 > restart
 >
 > illegal:=proc(x,y,{Point:=[symbol=solidcircle,colour=purple]},{Line:=[colour=green,thickness=2]},{Colour:="Blue"},{Scale:=5},{Print:="y"}) print("1 Point= ",Point);  #I currently use points print("2 Line= ",Line);   #                 linetype print("3 Colour=  ",Colour); #              clr     this has nothing to do with plotting colour print("4 Scale= ",Scale);   #               scl    print("5 Print= ",Print);   #               prnt Scale*x/y end proc
 >
 (1)
 > illegal(3,7)
 (2)
 > illegal(3,7,line=[linestyle=dash,colour=black,thickness=4])
 (3)

## What initial conditions am I missing?...

I've been writing this code to simulate the orbit of Venus in a simple 2D polar plot, but it keeps telling me that I have insufficient initial conditions, here is the code:

restart:with(Physics):with(VariationalCalculus):with(plots):with(plottools):

R[V] := 0.72*AU: #`starting radius for venus`

AU := 1: #`astronomical unit`

G := 6.674*10^(-11): #`gravitational constant`

m[S] := (333*10^3)*m[E]: #`mass of the sun`

m[V] := 0.815*m[E]: #`mass of venus`

m[E] := 1: #`mass of the earth`

x[V] := t -> r[V](t)*cos(theta[V](t)): #`x-coordinate`

y[V] := t -> r[V](t)*sin(theta[V](t)): #` y-coordinate`

x[VP] := t -> diff(x[V](t), t): #` x-velocity`

y[VP] := t -> diff(y[V](t), t): #`y-velocity`

T[V] := m[V]*simplify(x[VP](t)^2 + y[VP](t)^2)/2: #`kinetic energy of the system`

V[V] := (-G)*m[V]*m[S]*1/r[V](t): #`potential energy of the system`

L[V] := T[V] - V[V]; #`lagrangian of the system`

EL[Vr] := diff(L[V], r[V](t)) - diff(diff(L[V], diff(r[V](t), t)), t) = 0: #` e-l for the r-coordinate`

EL[`Vtheta;`] := diff(L[V], theta[V](t)) - diff(diff(L[V], diff(theta[V](t), t)), t) = 0: #`e-l for the theta-coordinate`

EL[V] := [EL[Vr], EL[`Vtheta;`]]; #` system of equations`

F[V] := G*m[V]*m[S]*1/R[V]^2: #`gravitational force for venus starting position`

omega[V] := sqrt(F[V]*R[V]*1/m[V])*1/R[V]: #`angular velocity for venus starting position`

IC[V] := [r[V](0) = R[V], D(r[V])(0) = 0, theta[V](0) = 0, D(theta[V])(0) = omega[V]]; #`initial conditions, r-position, r-velocity, theta-position, theta-velocity`

SOL := dsolve(EL[V], IC[V], [r[V](t), theta[V](t)], numeric, output = listprocedure); #`numerical solution`

Error, (in dsolve/numeric/type_check) insufficient initial/boundary value information for procedure defined problem

I have included both the initial values for r,dr/dt, theta and dtheta/dt.

I'm not sure what other initial conditions I could be missing?