MaplePrimes Questions

So I have this Maple document that I worked on yesterday, and now when I open it it just opens as the start-up screen where I can choose between document and worksheet mode. I can see that the file is much larger (900 kb) than an empty document, so it should definitely have the data still in there, but opening it with a text editor I couldn't manage to fix my issue. Does anyone have any tips? I have a back-up of the file (from the restore backup menu), but most of the content is not there, so it would be very helpful to get this one fixed.

Exercises.mw
Thanks in advance, 
Kristian.

The problem arose while playing with inscribed circles, as in this post. If anyone is interested, try to find a circle of maximum radius inscribed between the curves
x1^2 + 2*x2^2 - 1 = 0 and (x1 - sin(x1))^2 + (x2 - sin(x2))^2 - 1 = 0.

Curve graphs.

 

By using the second order ODE and its solution how i can get thus changing Rule?  i am looking for equation (8) by assumption of the paper he did, there is a trick but i don't know

 

idea.mw

I see here 
https://mathematica.stackexchange.com/questions/306634/how-can-i-use-dihedralangle-to-get-correct-result/306638?noredirect=1#comment751373_306638

Let $S.ABCD$ be a pyramid, $ABCD$ is a square with $AB = 1$. The line $SA$ perpendicular to the plane $ABC$. 

Calculate dihedral angle of two halfplanes `SBC` and `SCD` if: $SA = 1$, $SA = \dfrac{\sqrt{2}}{2}$.  I tried
restart;
with(Student:-MultivariateCalculus);
a := 1;
h := 1;
pA := [0, 0, 0];
pB := [a, 0, 0];
pC := [a, a, 0];
pD := [0, a, 0];
pS := [0, 0, h];

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?

Dear Power Users, Dataframes are a powerful tool within Maple. However, when I have 'undefined' in cells "Aggregate" or "DataSummary" does not provide answers. However, when I use "Statistics:-Mean" with the additional option "ignore=true" I can get an answer for one column (see attached worksheet). Adding "ignore" to aggregate apparently does not work. What is the method for ignoring the undefined data? In Excel when a cell is blank it will be ignored. Thank you for any help given.MP_Aggregate.mw

Hello. I am trying to use the Remove() command to remove a column of a dataframe. I applied the command like its shown in the help section and I get an error. I don't see how I am applying this command incorrectly. Where am I going wrong? Below is a screenshot of the error output and the .mw file used to generate the output.

Remove_a_column_from_a_dataframe.mw

I attempted to create a phase plot using the Odeplot command in Maple, but the resulting plot isn't as smooth as I'd like. To improve the smoothness, I tried increasing the numpoints parameter to 20,000, but this resulted in the error message: [Length of output exceeds limit of 1000000]. What adjustments should I make to obtain a smoother phase plot without encountering this error?

 

restart;
r := 1;
b := 1;
c := 0.01;
a := 0.36;
mu := 0.4;
beta := 0.75;

sys := {diff(x(t), t) = r*x(t) - b*x(t)^2 - c*x(t)*y(t) - beta*x(t)*y(t)/(a + x(t)), diff(y(t), t) = -mu*y(t) + beta*x(t)*y(t)/(a + x(t))};
 
ics := {x(0) = 0.2, y(0) = 0.05};

sol := dsolve(sys union ics, {x(t), y(t)}, numeric, range = 0 .. 20000, maxfun = 0, output = listprocedure, abserr = 0.1e-7, relerr = 0.1e-7)

with(DEtools);
DEplot3d(sys, {x(t), y(t)}, t = 0 .. 20000, [[x(0) = 0.2, y(0) = 0.05]], maxfun = 0, numpoints = 35000, thickness = 1, linestyle = solid);
 

 

 

 

with(plots);
phaseplot := odeplot(sol, [x(t), y(t)], 0 .. 20000, numpoints = 10000, color = red, thickness = 2, axes = boxed, gridlines, title = "Phase-space Diagram");

 

 

Download extra_steps.mw

Dear All,

I am facing some problems. This kind of error has been shown "Error, (in Engine:-Dispatch) badly formed input to solve: not fully algebraic"

eqn1 := {((1+1/beta).(diff(f(eta), eta, eta, eta))-(1+F[s]).((diff(f(eta), eta))^2)+(diff(f(eta), eta, eta)).f(eta)+M.(A-(diff(f(eta), eta)))-1/(R.D[a]).(diff(f(eta), eta)) = 0, diff(theta(eta), eta, eta)+4/3.N.(diff((1+(K-1).theta(eta))^3.(diff(theta(eta), eta)), eta)))+Pr.f(eta).(diff(theta(eta), eta))+(1+1/beta).Pr.Ec.((diff(f(eta), eta, eta))^2)+M.Ec.((diff(f(eta), eta)-A)^2) = 0, f(0) = 0, theta(0) = 1+alpha.(D(theta))(0), theta(10) = 0, (D(f))(0) = 1+(1+1/beta).lambda.(D(D(f)))(0), (D(f))(10) = 0};
;
sys1 := eval(eqn1, {A = 1, Ec = .2, K = 2.5, M = .5, N = .5, Pr = 6.5, R = 1, alpha = .5, beta = 2, lambda = .5, D[a] = .3, F[s] = 1});
sol1 := dsolve(sys1, numeric);
Error, (in Engine:-Dispatch) badly formed input to solve: not fully algebraic
with(plots);
t1 := odeplot(sol1, [eta, diff(f(eta), eta)], eta = 0 .. 10, numpoints = 65, thickness = 0, color = green, linestyle = solid);
plots[plots:-display]({t1})

MAXR.mw

If I have an equation:

-2*a[0]*((x^3*a[1] + 42)*diff(y(x), x, x) - 6*y(x)*x*a[1])*sqrt(-a[0]*(a[1]^2 + 3)) - 3*x^2*((1/3*a[1]^3 + a[0] + a[1])*x + (8*a[1]^2 + 24)*a[0])*diff(y(x), x, x)

I want to obtain a differential algebraic equation for y(x)without the parameters a[1] and a[0]. My idea is to first compute the derivative of U to get:

V:=-2*a[0]*(3*x^2*a[1]*diff(y(x), x, x) + (x^3*a[1] + 42)*diff(y(x), x, x, x) - 6*diff(y(x), x)*x*a[1] - 6*a[1]*y(x))*sqrt(-a[0]*(a[1]^2 + 3)) - 6*x*((1/3*a[1]^3 + a[0] + a[1])*x + (8*a[1]^2 + 24)*a[0])*diff(y(x), x, x) - 3*x^2*(1/3*a[1]^3 + a[0] + a[1])*diff(y(x), x, x) - 3*x^2*((1/3*a[1]^3 + a[0] + a[1])*x + (8*a[1]^2 + 24)*a[0])*diff(y(x), x, x, x)

Then, compute the resultant: resultant(U,V,a[0]). However, since a[0] is algebraic, we cannot compute the resultant directly. I want to substitute:

algsubs((−a[0](a[1]2+3))2=c2,U)

Then, eliminate c, a[0], and a[1] using the resultant. However, I find that this substitution command does not work. Is there a method to help eliminate the parameters a[0]and a[1]?

This expression is easy i think but i can't get any results with same shape  how i can simplify to the same equation in the paper

i am looking for equation 9 and every thing is clear how i can get

mp1.mw

Hello,

I'm having trouble updating an old Maple package to work with the latest version of Maple. In the package, there are several commands that modify predefined procedures and then rename them (see the example below). I need to save all these new procedures to a text file so I can further modify them and better understand their functionality. How can I achieve this?

d_remset := subs(`class`=`d_class`,`remseta`=`d_remseta`,`premas`=`d_premas`,op(`remset`)):

remset is a procedure previously defined.  

Many thanks.

Obs.: If you have a better idea on how to deal with the procdures, please let me know. 

Dear power users, I was wondering whether it is possible to import a xlsx file in such a way that the first row of the file is imported as column headers of the dataframe in Maple? Thank you in advance for any help given.

intersections := proc(P, Q, T)
local R, W, w, t, a, b, sol, buff, v;
sol := NULL;
if T = Y then W := X; else
W := Y; end if;
R := resultant(P, Q, T);
print(`Résultant :`); print(R);
w := fsolve(R, W); t := NULL;
for v in [w] do t := t, fsolve(subs(W = v, P), T); end do;
for a in {w} do for b in {t} do if T = Y then
buff := abs(subs(X = a, Y = b, P)) + abs(subs(X = a, Y = b, Q));
printf(`X=%a,   Y=%a   --->  %a\\n`, a, b, buff); if buff < 1/100000000 then sol := sol, [a, b]; end if;
else buff := abs(subs(X = b, Y = a, P)) + abs(subs(X = b, Y = a, Q));
printf(`X=%a,   Y=%a   --->  %a\\n `, a, b, buff); if buff < 1/100000000 then sol := sol, [b, a]; end if; end if; end do; end do; printf(`Nombre de solutions :  %a\\n`, nops({sol})); print({sol}); end proc:
intersections(X^2 + Y^2 - 1, X - Y, X);
X=-.7071067812,   Y=-.7071067812   --->  0.\n 
I do not wish to find \n in the answer

Here is another ode solution by Maple, I am not able to get zero from odetest. 

If someone could come up with a trick or method to verify this, that will be great. I tried all sort of assumptions and not able to get zero. Even coulditbe() could not give zero. 

It is a Chini ode and also homogeneous, `class G`.

Solving using either method, odetest do not returns zero.  There are no initial conditions. I am sure the solutions are correct, but odetest need some help or may be this requires different method to verify not using odetest?

Worksheet below.

 

interface(version);

`Standard Worksheet Interface, Maple 2024.1, Windows 10, June 25 2024 Build ID 1835466`

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 1796 and is the same as the version installed in this computer, created 2024, August 29, 14:22 hours Pacific Time.`

libname;

"C:\Users\Owner\maple\toolbox\2024\Physics Updates\lib", "C:\Program Files\Maple 2024\lib"

restart;

ode:=diff(y(x),x) = a*x^(n/(1-n))+b*y(x)^n;
DEtools:-odeadvisor(ode,y(x));

diff(y(x), x) = a*x^(n/(1-n))+b*y(x)^n

[[_homogeneous, `class G`], _Chini]

maple_sol:=dsolve(ode,y(x),[Chini],useInt,implicit); #explicit makes it take very long time
 

Intat(1/(_a^n/(b^(-n-1)*(a*x^(-n/(-1+n)))^(-2*n+1)*(-x^(-n/(-1+n)-1)*a*n*b/(-1+n))^n*n^(-n))-_a+1), _a = -y(x)/((-1+n)*x*a*x^(-n/(-1+n))))-(Int(-1/((-1+n)*x), x))+c__1 = 0

residual:=odetest(maple_sol,ode); #how to show this is zero?

n^n*(-y(x)*x^(1/(-1+n))/(a*(-1+n)))^n*(a*x^(-n/(-1+n)))^(2*n)*(-a*b*n*x^(-2*n/(-1+n)+1/(-1+n))/(-1+n))^(-n)*b^(n+1)-b*y(x)^n

coulditbe(residual=0) assuming real;

FAIL

#now solving as homog. (which gives simpler looking solution

maple_sol:=dsolve(ode,y(x),[homogeneous]);

Int(x^(n/(-1+n))/((b*x*(-1+n)*_a^n+_a)*x^(n/(-1+n))+a*x*(-1+n)), _a = _b .. y(x))-c__1 = 0

residual:=odetest(maple_sol,ode); #how to show this is zero?

-b*y(x)^n*n/(-1+n)-x^(-1-1/(-1+n))*a*n/(-1+n)+b*y(x)^n/(-1+n)+x^(-1-1/(-1+n))*a/(-1+n)-y(x)/(x*(-1+n))

coulditbe(residual=0) assuming real;

FAIL

 


 

Download challenge_odetest_sept_1_2024.mw

 

First 74 75 76 77 78 79 80 Last Page 76 of 2426