Maple 2023 Questions and Posts

These are Posts and Questions associated with the product, Maple 2023

Executing the code in ?InvertedPendulum produces an error when

sysLin := Linearize(convert(sysEqs, list), [u(t)], [x(t), theta(t)], lin_point)

is executed. The problem is the line where EQ4 is assigned a value.

Something is wrong with the line where EQ4 is assigned a value. It is not executed.
It is like the mode changes to text for that line????

I reduced the order of two nonlinear equations and solved them numerically in this way. Why are the two results obtained the same?
directdsolve919.mw

I have a differential equation which I am looking for a series solution in inverse powers of r. I am doing this by matching inverse powers between the RHS and LHS of the differential equation and then finding the coefficient in the series solution that would solve this. I have written a little procedure which returns the coefficients, I am just curious if there is a command that will do this for me or if i can improve on this technique? I tried the Solve command in PDETools but it just kept evaluating and did not return an answer. 

Thanks in advance. 

 

EDIT: More detail provided in the first reply. 

coefficient_question.mw

I'm sure this has been asked and answered, but I can't find the correct MaplePrimes page on it. How does one generate an array plot where the plots are centered within each box and not left justified? I need to make a PDF out of the document with an array plot of 1 column and 2 rows. (The following is just an example.) 

Why can't the variables in my procedure be called? Omega1, Omega2, Q1, Q2 are all expressed in the form of local variables in the loop, why can't we solve the equation because there are too many variables? At the same time, I would like to ask how to output the results of Q1 and Q2?

equation915.mw

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

restart

with(Statistics)with(plots)with(Optimization)with(LinearAlgebra)

E[1] := 126*10^9E[2] := 11*10^9G[12] := 6.6*10^9G_0__12 := 10.1*10^9nu[12] := .28E_0__2 := 15.5*10^9

true_strain := [0, .406915, .710106, .989362, 1.28457, 1.53989, 1.86702, 2.21011, 2.625, 2.99202]; true_stress := [0, 46.0227*10^6, 81.8182*10^6, 109.091*10^6, 138.068*10^6, 163.636*10^6, 194.318*10^6, 219.886*10^6, 248.864*10^6, 267.614*10^6]; epsilon_dot := 10^(-4)

sigma_t := map(proc (epsilon) options operator, arrow; E[instantaneous]*(1-lambda[90*deg]*epsilon*(sum(P[i], i = 1 .. 10)-(sum(P[i]*exp(lambda[i]*epsilon/epsilon_dot), i = 1 .. 10)))/epsilon_dot)*epsilon end proc, true_strain)

``

obj := sum((sigma_t[i]-true_stress[i])^2, i = 1 .. 10)

indets(obj, name)

{E[instantaneous], P[1], P[2], P[3], P[4], P[5], P[6], P[7], P[8], P[9], P[10], lambda[1], lambda[2], lambda[3], lambda[4], lambda[5], lambda[6], lambda[7], lambda[8], lambda[9], lambda[10], lambda[90*deg]}

(1)

Optimization[Interactive](obj)

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

 

[Float(infinity), [E[instantaneous] = HFloat(1.0), P[1] = HFloat(1.0), P[2] = HFloat(1.0), P[3] = HFloat(1.0), P[4] = HFloat(1.0), P[5] = HFloat(1.0), P[6] = HFloat(1.0), P[7] = HFloat(1.0), P[8] = HFloat(1.0), P[9] = HFloat(1.0), P[10] = HFloat(1.0), lambda[1] = HFloat(1.0), lambda[2] = HFloat(1.0), lambda[3] = HFloat(1.0), lambda[4] = HFloat(1.0), lambda[5] = HFloat(1.0), lambda[6] = HFloat(1.0), lambda[7] = HFloat(1.0), lambda[8] = HFloat(1.0), lambda[9] = HFloat(1.0), lambda[10] = HFloat(1.0), lambda[90*deg] = HFloat(1.0)]]

(2)
 

NULL

Download 90As4.mw

Change the length of the pendulum to achieve the analysis of the pendulum frequency change, but I scan the frequency of the two images do not correspond to each other, what is the problem?

sweep.mw

I am attempting to obtain an equation for battery discharge.

I have data from a battery that will supply 25 amps for 210 minutes. I want to fit this to an equation and then try to adjust the curve to match a battery that will supply 25 amps for 160 minutes.

Here is what I have:

restart; with(Statistics):

## Amps
A := Vector([444, 218, 74,312/10,209/10,119/10,625/100]):
## Time until battery discharges to 10.5 volts
T := Vector([5,15,60,3*60,5*60,10*60,20*60]):
f := x -> a*exp(1-x/b); f(x)
eqset := {seq(T[idx] - f(A[idx]), idx=1..7)}
sol := NonlinearFit(a*exp(1-x/b),A, T, x)
evalf(subs(x=A[6],sol))
P1 := plot(A,T): P2 := plot(sol,x=0..450): plots[display]({P1,P2})

I want the 'knee' of the fitted curve to more closely match the measured data.

How do I do this?

Singular points appear in the solution and rendering of this program. If the data does not converge when taking a short time step, what should I do if I want to cross the singular point and continue drawing the image?solve826.mw

Hey!

I am having difficulties inputting in text and math mode in my Maple 2023 document. It was working fine in the beginning, but all of a sudden the problem occured. I was restarting maple initially which would temporarily solve the problem, now I cannot input anything after restart. I am doing exam excercises and have been copy/pasting text from a pdf into the document. 

I have tried to install Maple 2024 and open the file but to no avail.  Any help/ pointers would be greatly appreciated.

The attached file -

ml.mw

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.

Verification_known_T_R_30_07_2024.mw That`s the worksheet.

For some strange reason the command simplify doesn`t work. Beforehand it managed to simplify quite bulky expressions.

Thank you in advance!

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

I have a thirder order ODE with non polynomial coefficients and I naively thought to try dsolve for fun to see what happens and Maple returned DESol with a second order differential equation and an arbitrary coefficient. I know Maple outputs DESol when it cannot find a solution similar to RootOf but the arbitrary constant is what is throwing me off. 

I am unsure how to interpret this, if a particular solution is found I could reduce the order and see how I could get with the second order ODE but maple doesn't produce a particular solution when I run that command. 

DESol_Question.mw

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