Maple 2020 Questions and Posts

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

Hello

I want to write a program to get unknown coefficients of multiple polynomials. I have a problem with this program. The code sometimes doesn't work. Can anyone help me? It's very important to me.

restart

with(student)

``

EQ[0] := tanh(d)*b[1]*(b[1]+1)

tanh(d)*b[1]*(b[1]+1)

(1)

EQ[1] := -(-1+(a[1]-b[1]-1)*tanh(d)^2+(a[0]+1)*tanh(d))*b[1]

-(-1+(a[1]-b[1]-1)*tanh(d)^2+(a[0]+1)*tanh(d))*b[1]

(2)

EQ[2] := tanh(d)*((a[1]-b[1])*(a[0]+1)*tanh(d)-b[1]^2-a[1])

tanh(d)*((a[1]-b[1])*(a[0]+1)*tanh(d)-b[1]^2-a[1])

(3)

EQ[3] := (-a[1]^2+(2*b[1]-1)*a[1]-b[1]^2-b[1])*tanh(d)^2+(a[1]+b[1])*(a[0]+1)*tanh(d)-a[1]-b[1]

(-a[1]^2+(2*b[1]-1)*a[1]-b[1]^2-b[1])*tanh(d)^2+(a[1]+b[1])*(a[0]+1)*tanh(d)-a[1]-b[1]

(4)

EQ[4] := -tanh(d)*((a[1]-b[1])*(a[0]+1)*tanh(d)+a[1]^2+b[1])

-tanh(d)*((a[1]-b[1])*(a[0]+1)*tanh(d)+a[1]^2+b[1])

(5)

EQ[5] := -a[1]*(-1+(-a[1]+b[1]-1)*tanh(d)^2+(a[0]+1)*tanh(d))

-a[1]*(-1+(-a[1]+b[1]-1)*tanh(d)^2+(a[0]+1)*tanh(d))

(6)

EQ[6] := (a[1]+1)*a[1]*tanh(d)

(a[1]+1)*a[1]*tanh(d)

(7)

Eqs := {seq(EQ[i], i = 0 .. 6)}

Sol := solve(Eqs, {a[0], a[1], b[1]})NULL

{a[0] = a[0], a[1] = 0, b[1] = 0}, {a[0] = (tanh(d)^2-tanh(d)+1)/tanh(d), a[1] = -1, b[1] = -1}, {a[0] = -(tanh(d)-1)/tanh(d), a[1] = -1, b[1] = 0}, {a[0] = -(tanh(d)-1)/tanh(d), a[1] = 0, b[1] = -1}

(8)

for i from 2 to 4 do Case[i] := allvalues(Sol[i]) end do

{a[0] = -(tanh(d)-1)/tanh(d), a[1] = 0, b[1] = -1}

(9)

``

T1.mw

T2.mw

Hi,

`[Length of output exceeds limit of 1000000]`

Hello, I want to get the the homogeneous balance principle for the Differential-Difference Equation with Maple. Can anyone help?

the homogeneous balance principle:The balance is made between sentences with the highest degree of nonlinearity and the highest order of the available derivative. We consider the power of terms like u^p as pM and u(q) as M + q and put them equal (pM=M+q) and get the value of M. Now, if M = 1/n (where m is an integer), then we use the transformation U= W^n, where W is a new function.

example:

hello,

I computed some algebraic calculation, but near point -1 there is some issue like disconvergencies. Can anyone help in this regard? In the final graph, as seen the paths of the curves are close together and convergence does not occur AROUND POINT -1.

restart

Digite := 30

30

(1)

beta := 2.5; lambda := 0.1e-1; b := Pi; a := Pi; alpha := 0; y[1] := 1.5; y[2] := 1.5; x[1] := -1; x[2] := 1; Q[1] := 40; Q[2] := 35; T[1] := 20

2.5

 

0.1e-1

 

Pi

 

Pi

 

0

 

1.5

 

1.5

 

-1

 

1

 

40

 

35

(2)

v := (2*n-1)*Pi/(2*b)

Delta := exp(2*v*a)*(alpha*v+beta)*(1+lambda)-(1-lambda)*(alpha*v-beta)

omega := Pi/(2*b)

P[1] := ((1+lambda)*exp(-v*abs(x-xi))+(1-lambda)*exp(v*(x+xi)))*exp(2*v*a)+(1+lambda)*exp(-v*(x+xi))+(1-lambda)*exp(v*abs(x-xi))

P[2] := ((1+lambda)*exp(-v*abs(x-xi))+(1-lambda)*exp(v*(x+xi)))*exp(2*v*a)-(1+lambda)*exp(-v*(x+xi))-(1-lambda)*exp(v*abs(x-xi))

P[3] := P[1]*(-alpha^2*v-alpha*beta+alpha*v)+beta*P[2]

G[11] := (sum((alpha*P[1]*(1-lambda)*(alpha*v-beta)*exp(-2*v*a)+(1+lambda)*P[3])*(cos(v*(y-eta))-cos(v*(y+eta)))/(v*(exp(2*v*a)*(alpha*v+beta)*(1+lambda)-(1-lambda)*(alpha*v-beta))), n = 1 .. 80))/(2*b*(1+lambda))+(2*(1+lambda)*alpha*b/Pi*.25)*ln((1+2*exp(-omega*abs(x-xi))*cos(omega*(y-eta))+exp(-2*omega*abs(x-xi)))*(1-2*exp(-omega*abs(x-xi))*cos(omega*(y+eta))+exp(-2*omega*abs(x-xi)))*(1+2*exp(-omega*(2*a+x+xi))*cos(omega*(y-eta))+exp(-2*omega*(2*a+x+xi)))*(1-2*exp(-omega*(2*a+x+xi))*cos(omega*(y+eta))+exp(-2*omega*(2*a+x+xi)))/((1-2*exp(-omega*abs(x-xi))*cos(omega*(y-eta))+exp(-2*omega*abs(x-xi)))*(1+2*exp(-omega*abs(x-xi))*cos(omega*(y+eta))+exp(-2*omega*abs(x-xi)))*(1-2*exp(-omega*(2*a+x+xi))*cos(omega*(y-eta))+exp(-2*omega*(2*a+x+xi)))*(1+2*exp(-omega*(2*a+x+xi))*cos(omega*(y+eta))+exp(-2*omega*(2*a+x+xi)))))/(2*b*(1+lambda))+(2*(1-lambda)*alpha*b/Pi*.25)*ln((1+2*exp(omega*(x+xi))*cos(omega*(y-eta))+exp(2*omega*(x+xi)))*(1-2*exp(omega*(x+xi))*cos(omega*(y+eta))+exp(2*omega*(x+xi)))*(1+2*exp(-omega*(2*a-abs(x-xi)))*cos(omega*(y-eta))+exp(-2*omega*(2*a-abs(x-xi))))*(1-2*exp(-omega*(2*a-abs(x-xi)))*cos(omega*(y+eta))+exp(-2*omega*(2*a-abs(x-xi))))/((1-2*exp(omega*(x+xi))*cos(omega*(y-eta))+exp(2*omega*(x+xi)))*(1+2*exp(omega*(x+xi))*cos(omega*(y+eta))+exp(2*omega*(x+xi)))*(1-2*exp(-omega*(2*a-abs(x-xi)))*cos(omega*(y-eta))+exp(-2*omega*(2*a-abs(x-xi))))*(1+2*exp(-omega*(2*a-abs(x-xi)))*cos(omega*(y+eta))+exp(-2*omega*(2*a-abs(x-xi))))))/(2*b*(1+lambda))

g[12] := lambda*((alpha*v+beta)*exp(v*(2*a+x))+(alpha*v-beta)*exp(-v*x))*exp(-v*xi)/(v*Delta)

G[12] := (sum(g[12]*(cos(v*(y-eta))-cos(v*(y+eta))), n = 1 .. 80))/b

phi[1] := int(int(G[11]*Q[1]*Dirac(xi-x[1])*Dirac(eta-y[1]), xi = -a .. 0), eta = 0 .. b)+int(int(G[12]*Q[2]*Dirac(xi-x[2])*Dirac(eta-y[2]), xi = 0 .. infinity), eta = 0 .. b)

Z[1] := diff(phi[1], x)

psi[1] := int(Z[1], y)

plot3d(psi[1], x = -a .. 0, y = 0 .. b)

 

with(plots)

contourplot(psi[1], x = -a .. 0, y = 0 .. b)

 

 

Download sai_1.mw

Hello everyone, 

I am trying to solve 6 equations with 6 unknowns in maple. I tried to simplify them and they are shown below. Unfortunately, after using solve I get:

Warning, solutions may have been lost
                            sol := ()

Can you help me with it, please? I tried to solve it with Matlab and got a warning that no explicit solution could be found and had no luck with mathematica either.  Thank you very much!!

restart;

omega_1 := 1;
beta_1 = 0.2;
omega_2 := 0.15;
beta_2 := 0.15;
mu := 0.4;
g := 9.81;
K := 5;
vb := 0.5;
tc := arccos(vb/(A*omega));

Ns := mu*(omega_2^2 - K)*B*(2*omega*tc - sin(2*omega*tc) - pi)/pi;

Nc := 4*mu*(omega_2^2 - K)*x2*sin(omega*tc)/pi + mu*(omega_2^2 - K)*C*(2*omega*tc + 2*sin(2*omega*tc) - pi)/pi;

a0 := -mu*(omega_2^2 - K)*x2*(1 - 2*omega*tc/pi) + 2*mu*(omega_2^2 - K)*C*sin(omega*tc)/pi;

eq1 := -A*omega^2 + A*omega_1^2 - B*K - Ns;

eq2 := 2*A*beta_1*omega*omega_1 - C*K - Nc;

eq3 := -2*C*beta_2*omega*omega_2 - B*omega^2 + B*omega_2^2 - A*K;

eq4 := 2*B*beta_2*omega*omega_2 - C*omega^2 + C*omega_2^2;

eq5 := omega_1^2*x1 - K*x2 - a0;

eq6 := omega_2^2*x2 - K*x1 - g;

sol := solve({eq1, eq2, eq3, eq4, eq5, eq6}, {A, B, C, omega, x1, x2});

This worksheet contains an unnamed theorem on page 202 of David Wells's book The Penguin Dictionary of Curious and Interesting Geometry.

Somehow I have uploaded both its contents and (a) link(s) to it.

What Maple code can animate and display, in turn, each of the portrayed pursuit paths?

Pursuit_problem.mw

 

Consider a target point T which moves at constant speed along a straight line, and a moving point P which at all times moves directly towards T. If P starts anywhere on the outermost ellipse, and T starts from a focus of the outer ellipse, then P always captures T at the same point, the centre of the ellipse.

 

``

 

The concentric ellipses, whose shape depends on the relative velocities of T and P, are isochrones, and the curves of pursuit are their isoclinal trajectories

 

Download Pursuit_problem

Hi,

I am using Maple 2020 to numerically solve/generate numerical plots for my impulsive control problem.

The optimal control problem is:

T is time from0 to T where T is the terminal time

K(t), B(t) and M(t) are state variables

w(t) is a control variable

a(ti) is the impulsive control variable at time ti,

a(ti) \in [0,1] for i=1,2,…,N

ggamma, ttheta, ddelta1, ddelta 2, c1 and c2 are constants

K(T)=M(T)=0 B(T)>0

K'(t)=ggamma*K(t)*w(t)-ttheta*M(t)

B’(t)=ggamma*K(t)+ttheta*M(t)*B(t)

M’(t)=M(t)-ggamma*w(t)

M(ti)=M(ti-)+a(ti)M(ti)*ddelta1

K(ti)=K(ti-)-a(ti)K(ti)*ddelta2

Objective: maximize B(T)-integral from 0 to T of c1*(w(t))^2dt-sum i=1 to N of c2*a(ti)

Here is the code I enter to MAple:

restart;

# Define the constants
ggamma := 1.0;
ttheta := 2.0;
ddelta1 := 0.1;
ddelta2 := 0.2;
c1 := 0.5;
c2 := 0.3;
T := 5.0; # Terminal time

# Define the impulsive changes in M(t)
impulse_changes := proc (t)
    local ti_values, imp_values, result;
    ti_values := [1.0, 2.0, 3.0]; # Example impulsive time instants
    imp_values := [0.2, 0.1, 0.3]; # Corresponding impulsive control values
    result := 0;
    for i from 1 to nops(ti_values) do
        if t = ti_values[i] then
            result := result + imp_values[i]*M(ti_values[i])*(ddelta1 - ddelta2);
        end if;
    end do;
    return result;
end proc;

# Define the system of differential equations
diffeqs := {diff(K(t), t) = ggamma*K(t)*w(t) - ttheta*M(t),
            diff(B(t), t) = ggamma*K(t) + ttheta*M(t)*B(t),
            diff(M(t), t) = M(t) - ggamma*w(t)};

# Define the impulsive controls
impulse_controls := [1.0, 0.5, 0.8]; # Example impulsive control values

# Define the initial values and conditions
initial_values := [K(0) = 0, B(0) = 0, M(0) = 0];

# Define the final conditions
final_conditions := [K(T) = 0, M(T) = 0, B(T) > 0];

# Define the objective function to be maximized
objective := B(T) - int(c1*w(t)^2, t = 0 .. T) - add(c2*impulse_changes(ti), ti = 1.0 .. 3.0);

# Solve the system of differential equations numerically
sol := dsolve({diffeqs, initial_values, final_conditions}, numeric, output = listprocedure);

# Find the optimal control trajectory w(t) using optimization
w_optimal := optimize(objective, numeric, maximize);

# Evaluate the optimal control and state trajectories
optimal_controls := [seq(w_optimal(t), t = 0.0 .. T, 0.1)];
state_trajectories := [sol[2](t), sol[3](t), sol[4](t)];

optimal_controls, state_trajectories;

I am getting the error:

"Error, (in dsolve/numeric/process_input) system must be entered as a set/list of expressions/equations"

as soon I run after the sol:= function.

I would appreciate any help with fixing my code!

Thank you very much!

Hi,

How can I find the same result reported in the figure for dsolve the differential equation?

nima.mw

 

 

1) the two cylinders are centered on the x and z axis respectively

2) any two intersecting cylinders

Hi,

I want to define the functions 10 and 11 and then put them in the eq equation, then simplify them and get the unknown values after the solve command, but there are error.

And value the function psi ?

NULL

NULL

restart

with(student)

NULL

"U(xi[n]):=a[0]+sum(-a[i]*psi^(i)(xi[n]),i=1..1)+sum(-b[i]*psi^(-i)(xi[n]),i=1..1)+sum(-c[i]*((diff(psi,xi[n])^(i)))/(psi^(i)(xi[n])),i=1..1);"

Error, empty script base

Typesetting:-mambiguous(Typesetting:-mrow(Typesetting:-mi("U", fontstyle = "italic", mathvariant = "italic"), Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mi("ξ", fontstyle = "normal", mathvariant = "normal"), Typesetting:-mfenced(Typesetting:-mi("n", font_style_name = "2D Input", fontstyle = "italic", mathvariant = "italic"), open = "[", close = "]", font_style_name = "2D Input", mathvariant = "normal")), mathvariant = "normal"), Typesetting:-mo("≔", accent = "false", fence = "false", largeop = "false", lspace = "0.2777778em", mathvariant = "normal", movablelimits = "false", rspace = "0.2777778em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-mi("a", fontstyle = "italic", mathvariant = "italic"), Typesetting:-mfenced(Typesetting:-mn("0", mathvariant = "normal"), open = "[", close = "]", mathvariant = "normal"), Typesetting:-mo("+", accent = "false", fence = "false", largeop = "false", lspace = "0.2222222em", mathvariant = "normal", movablelimits = "false", rspace = "0.2222222em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-mi("sum", fontstyle = "italic", mathvariant = "italic"), Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mo("&uminus0;", accent = "false", fence = "false", largeop = "false", lspace = "0.2222222em", mathvariant = "normal", movablelimits = "false", rspace = "0.2222222em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-mi("a", fontstyle = "italic", mathvariant = "italic"), Typesetting:-mfenced(Typesetting:-mi("i", fontstyle = "italic", mathvariant = "italic"), open = "[", close = "]", mathvariant = "normal"), Typesetting:-mo("⋅", accent = "false", fence = "false", font_style_name = "2D Input", largeop = "false", lspace = "0.0em", mathvariant = "normal", movablelimits = "false", rspace = "0.0em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-msup(Typesetting:-mi("ψ", font_style_name = "2D Input", fontstyle = "normal", mathvariant = "normal"), Typesetting:-mi("i", font_style_name = "2D Input", fontstyle = "italic", mathvariant = "italic"), superscriptshift = "0"), Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mi("ξ", fontstyle = "normal", mathvariant = "normal"), Typesetting:-mfenced(Typesetting:-mi("n", fontstyle = "italic", mathvariant = "italic"), open = "[", close = "]", mathvariant = "normal")), mathvariant = "normal"), Typesetting:-mo(",", accent = "false", fence = "false", largeop = "false", lspace = "0.0em", mathvariant = "normal", movablelimits = "false", rspace = "0.3333333em", separator = "true", stretchy = "false", symmetric = "false"), Typesetting:-mi("i", fontstyle = "italic", mathvariant = "italic"), Typesetting:-mo("=", accent = "false", fence = "false", largeop = "false", lspace = "0.2777778em", mathvariant = "normal", movablelimits = "false", rspace = "0.2777778em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-mn("1", mathvariant = "normal"), Typesetting:-mo(".", accent = "false", fence = "false", largeop = "false", lspace = "0.2222222em", mathvariant = "normal", movablelimits = "false", rspace = "0.0em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-mo(".", accent = "false", fence = "false", largeop = "false", lspace = "0.2222222em", mathvariant = "normal", movablelimits = "false", rspace = "0.0em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-mn("1", mathvariant = "normal")), mathvariant = "normal"), Typesetting:-mo("+", accent = "false", fence = "false", largeop = "false", lspace = "0.2222222em", mathvariant = "normal", movablelimits = "false", rspace = "0.2222222em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-mi("sum", fontstyle = "italic", mathvariant = "italic"), Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mo("&uminus0;", accent = "false", fence = "false", largeop = "false", lspace = "0.2222222em", mathvariant = "normal", movablelimits = "false", rspace = "0.2222222em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-mi("b", fontstyle = "italic", mathvariant = "italic"), Typesetting:-mfenced(Typesetting:-mi("i", fontstyle = "italic", mathvariant = "italic"), open = "[", close = "]", mathvariant = "normal"), Typesetting:-mo("⋅", accent = "false", fence = "false", largeop = "false", lspace = "0.0em", mathvariant = "normal", movablelimits = "false", rspace = "0.0em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-msup(Typesetting:-mi("ψ", fontstyle = "normal", mathvariant = "normal"), Typesetting:-mrow(Typesetting:-mo("&uminus0;", accent = "false", fence = "false", largeop = "false", lspace = "0.2222222em", mathvariant = "normal", movablelimits = "false", rspace = "0.2222222em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-mi("i", fontstyle = "italic", mathvariant = "italic")), superscriptshift = "0"), Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mi("ξ", fontstyle = "normal", mathvariant = "normal"), Typesetting:-mfenced(Typesetting:-mi("n", fontstyle = "italic", mathvariant = "italic"), open = "[", close = "]", mathvariant = "normal")), mathvariant = "normal"), Typesetting:-mo(",", accent = "false", fence = "false", largeop = "false", lspace = "0.0em", mathvariant = "normal", movablelimits = "false", rspace = "0.3333333em", separator = "true", stretchy = "false", symmetric = "false"), Typesetting:-mi("i", fontstyle = "italic", mathvariant = "italic"), Typesetting:-mo("=", accent = "false", fence = "false", largeop = "false", lspace = "0.2777778em", mathvariant = "normal", movablelimits = "false", rspace = "0.2777778em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-mn("1", mathvariant = "normal"), Typesetting:-mo(".", accent = "false", fence = "false", largeop = "false", lspace = "0.2222222em", mathvariant = "normal", movablelimits = "false", rspace = "0.0em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-mo(".", accent = "false", fence = "false", largeop = "false", lspace = "0.2222222em", mathvariant = "normal", movablelimits = "false", rspace = "0.0em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-mn("1", mathvariant = "normal")), mathvariant = "normal"), Typesetting:-mo("+", accent = "false", fence = "false", largeop = "false", lspace = "0.2222222em", mathvariant = "normal", movablelimits = "false", rspace = "0.2222222em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-mi("sum", fontstyle = "italic", mathvariant = "italic"), Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mo("&uminus0;", accent = "false", fence = "false", font_style_name = "2D Input", largeop = "false", lspace = "0.2222222em", mathvariant = "normal", movablelimits = "false", rspace = "0.2222222em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-mi("c", font_style_name = "2D Input", fontstyle = "italic", mathvariant = "italic"), Typesetting:-mfenced(Typesetting:-mi("i", font_style_name = "2D Input", fontstyle = "italic", mathvariant = "italic"), open = "[", close = "]", font_style_name = "2D Input", mathvariant = "normal"), Typesetting:-mo("⋅", accent = "false", fence = "false", font_style_name = "2D Input", largeop = "false", lspace = "0.0em", mathvariant = "normal", movablelimits = "false", rspace = "0.0em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-mfrac(Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mi("diff", font_style_name = "2D Input", fontstyle = "italic", mathvariant = "italic"), Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mi("ψ", font_style_name = "2D Input", fontstyle = "normal", mathvariant = "normal"), Typesetting:-mo(",", accent = "false", fence = "false", font_style_name = "2D Input", largeop = "false", lspace = "0.0em", mathvariant = "normal", movablelimits = "false", rspace = "0.3333333em", separator = "true", stretchy = "false", symmetric = "false"), Typesetting:-mi("ξ", font_style_name = "2D Input", fontstyle = "normal", mathvariant = "normal"), Typesetting:-mfenced(Typesetting:-mi("n", font_style_name = "2D Input", fontstyle = "italic", mathvariant = "italic"), open = "[", close = "]", font_style_name = "2D Input", mathvariant = "normal")), font_style_name = "2D Input", mathvariant = "normal"), Typesetting:-mambiguous(Typesetting:-msup(Typesetting:-merror("?"), Typesetting:-mi("i", font_style_name = "2D Input", fontstyle = "italic", mathvariant = "italic"), superscriptshift = "0"), Typesetting:-merror("empty script base"))), font_style_name = "2D Input", mathvariant = "normal"), Typesetting:-mrow(Typesetting:-msup(Typesetting:-mi("ψ", font_style_name = "2D Input", fontstyle = "normal", mathvariant = "normal"), Typesetting:-mi("i", font_style_name = "2D Input", fontstyle = "italic", mathvariant = "italic"), superscriptshift = "0"), Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mi("ξ", font_style_name = "2D Input", fontstyle = "normal", mathvariant = "normal"), Typesetting:-mfenced(Typesetting:-mi("n", font_style_name = "2D Input", fontstyle = "italic", mathvariant = "italic"), open = "[", close = "]", font_style_name = "2D Input", mathvariant = "normal")), font_style_name = "2D Input", mathvariant = "normal")), bevelled = "false", denomalign = "center", linethickness = "1", numalign = "center"), Typesetting:-mo(",", accent = "false", fence = "false", font_style_name = "2D Input", largeop = "false", lspace = "0.0em", mathvariant = "normal", movablelimits = "false", rspace = "0.3333333em", separator = "true", stretchy = "false", symmetric = "false"), Typesetting:-mi("i", font_style_name = "2D Input", fontstyle = "italic", mathvariant = "italic"), Typesetting:-mo("=", accent = "false", fence = "false", font_style_name = "2D Input", largeop = "false", lspace = "0.2777778em", mathvariant = "normal", movablelimits = "false", rspace = "0.2777778em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-mn("1", font_style_name = "2D Input", mathvariant = "normal"), Typesetting:-mo(".", accent = "false", fence = "false", font_style_name = "2D Input", largeop = "false", lspace = "0.2222222em", mathvariant = "normal", movablelimits = "false", rspace = "0.0em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-mo(".", accent = "false", fence = "false", font_style_name = "2D Input", largeop = "false", lspace = "0.2222222em", mathvariant = "normal", movablelimits = "false", rspace = "0.0em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-mn("1", font_style_name = "2D Input", mathvariant = "normal")), font_style_name = "2D Input", mathvariant = "normal"), Typesetting:-mo(";", accent = "false", fence = "false", largeop = "false", lspace = "0.0em", mathvariant = "normal", movablelimits = "false", rspace = "0.2777778em", separator = "true", stretchy = "false", symmetric = "false")))

 

NULL

U(xi[n+1]) := U(xi[n]+d)

U(xi[n]+d)

(1)

U(xi[n-1]) := U(xi[n]-d)

U(xi[n]-d)

(2)

NULL

eq := c*(diff(U, xi[n]))*(U(xi[n])+u(xi[n-1]))*(U(xi[n])+u(xi[n+1]))-(2*(u(xi[n-1])-u(xi[n+1])))*(U(xi[n])^2)(1-U(xi[n])^2)

-2*(u(xi[n-1])-u(xi[n+1]))*(U(xi[n]))(1-U(xi[n])^2)^2

(3)

NULL

Download abs.mw

 

the graf that I want to generate is like this one 

Hei

Vet noen om Windows 11 støtter Maple 2020? Eller støttes det bare av Windows 10.

I learned about Dodgson calculation of the determinant only recently (https://en.m.wikipedia.org/wiki/Dodgson_condensation).
I am only interested in symbolic expressions of the determinant.
Furthermore, I compared several methods. Not surprisingly, the build in method is the fastest. But why is the seq method slower than the proc method for the Dodgson method? Is there anything I could do to program it more efficiently?
 

restart; with(LinearAlgebra)

with(combinat); with(GroupTheory)

DetDef := proc (A) local i, n, sigma; description "Jeremy Johnson. Downloaded from https://www.cs.drexel.edu/~jjohnson/2016-17/winter/cs300/lectures/determinant.mw"; n := RowDimension(A); add(PermParity(Perm(sigma))*mul(A[i, sigma[i]], i = 1 .. n), `in`(sigma, permute([`$`(1 .. n)]))) end proc

InnerMatrix := proc (M::Matrix) SubMatrix(M, 2 .. RowDimension(M)-1, 2 .. ColumnDimension(M)-1) end proc

MatrixDet := proc (M::Matrix) local C, n, i, j; n := RowDimension(M)-1; C := Matrix(n, n); seq(seq(assign('C[i, j]', Determinant(M([i, i+1], [j, j+1]))), j = 1 .. n), i = 1 .. n); return C end proc

Dodgson := proc(M::Matrix)
 MatrixDet(M);
InnerMatrix(M) ^~ (-1) *~ MatrixDet(MatrixDet(M));
do if 1 < RowDimension(%) then InnerMatrix(`%%`) ^~ (-1) *~ MatrixDet(%);
end if;
until RowDimension(%) = 1;
Trace(%):
end proc:

Dodgsonseq := proc (E::Matrix) local w, dim, Z; dim := RowDimension(E); Z[dim] := E; Z[dim-1] := MatrixDet(E); Z[dim-2] := `~`[`*`](`~`[`^`](InnerMatrix(E), -1), MatrixDet(MatrixDet(E))); seq(assign('Z[w-1]', `~`[`*`](`~`[`^`](InnerMatrix(Z[w+1]), -1), MatrixDet(Z[w]))), w = dim-1 .. 1, -1); Trace(Z[1]) end proc

LaPlace := proc (M::Matrix) local c; add((-1)^(c+1)*M[1, c]*Minor(M, 1, c), c = 1 .. ColumnDimension(M)) end proc

dim := 7; A := Matrix(dim, dim, shape = symmetric, symbol = a)

7

(1)

start_time := time(); st := time[real](); Det1 := abs(A); CPUtime_used_Build_in_Determinant := time()-start_time; REALtime_used_Build_in_Determinant := time[real]()-st; start_time := time(); st := time[real](); Det2 := DetDef(A); CPUtime_used_Jeremy_Johnson_Determinant := time()-start_time; REALtime_used_Jeremy_Johnson_Determinant := time[real]()-st; start_time := time(); st := time[real](); Det3 := Dodgsonseq(A); CPUtime_usedDodgsonseq := time()-start_time; REALCPUtime_usedDodgsonseq := time[real]()-st; start_time := time(); st := time[real](); Det4 := Dodgson(A); CPUtime_usedDodgson := time()-start_time; REALtime_usedDodgson := time[real]()-st; start_time := time(); st := time[real](); Det5 := LaPlace(A); CPUtime_usedLaPlace := time()-start_time; REALtime_usedLaPlace := time[real]()-st; simplify(Det1-Det2); simplify(Det1-Det3); simplify(Det1-Det4); simplify(Det1-Det5)
``

0.32e-1

 

0.34e-1

 

0.93e-1

 

.108

 

47.094

 

41.295

 

40.766

 

38.158

 

0.31e-1

 

0.50e-1

 

0

 

0

 

0

 

0

(2)

Download test_Determinants_symbolic.mw

Just need some help using URL:-Get

Get("https://sdo.gsfc.nasa.gov/assets/img/browse/2023/05/05/20230505 _184918_512_0304.jpg")

I'm sure there are some tags to use but not sure how.  The site does show a script on best practices, but at the moment don't know how to apply them.  Can anyone offer some help?

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