MaplePrimes Questions

my iteration u[i] in last step not working as i want where is the issue?

b1.mw

Same question for googletagmanager.

The NoScript extension for Firefox lists the following java scripts

I do not see a degradation in performance when these scripts are disabled. So why are these scripts running?

What do they do?

i want plot like that but i can't  and there is anyway for finding the equalibriom point of system? 

restart

with(PDEtools)

with(LinearAlgebra)

with(DEtools)

with(DynamicSystems)

sys := {diff(x(t), t) = 2*x(t)+3*y(t), diff(y(t), t) = 2*x(t)+y(t)}

{diff(x(t), t) = 2*x(t)+3*y(t), diff(y(t), t) = 2*x(t)+y(t)}

(1)

fns := {x(t), y(t)}

{x(t), y(t)}

(2)

sol := dsolve(sys, fns)

{x(t) = c__1*exp(4*t)+c__2*exp(-t), y(t) = (2/3)*c__1*exp(4*t)-c__2*exp(-t)}

(3)

ode := [diff(x(t), t) = 2*x(t)+3*y(t), diff(y(t), t) = 2*x(t)+y(t)]; S := dsolve(ode)

[diff(x(t), t) = 2*x(t)+3*y(t), diff(y(t), t) = 2*x(t)+y(t)]

 

{x(t) = c__1*exp(4*t)+c__2*exp(-t), y(t) = (2/3)*c__1*exp(4*t)-c__2*exp(-t)}

(4)

Student:-ODEs:-ODESteps(ode, {x(t), y(t)})

"[[,,"Let's solve"],[,,[(ⅆ)/(ⅆt) x(t)=2 x(t)+3 y(t),(ⅆ)/(ⅆt) y(t)=2 x(t)+y(t)]],["•",,"Define vector"],[,,x(t)=[?]],["•",,"Convert system into a vector equation"],[,,(ⅆ)/(ⅆt) x(t)=[?]*x(t)+[?]],["•",,"System to solve"],[,,(ⅆ)/(ⅆt) x(t)=[?]*x(t)],["•",,"Define the coefficient matrix"],[,,A=[?]],["•",,"Rewrite the system as"],[,,(ⅆ)/(ⅆt) x(t)=A*x(t)],["•",,"To solve the system, find the eigenvalues and eigenvectors of" A],["•",,"Eigenpairs of" A],[,,[[-1,[?]],[4,[?]]]],["•",,"Consider eigenpair"],[,,[-1,RTABLE(18446744074191517278,MATRIX([[-1], [1]]),Vector[column])]],["•",,"Solution to homogeneous system from eigenpair"],[,,(x)[1]=[]],["•",,"Consider eigenpair"],[,,[4,RTABLE(18446744074192645174,MATRIX([[3/2], [1]]),Vector[column])]],["•",,"Solution to homogeneous system from eigenpair"],[,,(x)[2]=[]],["•",,"General solution to the system of ODEs"],[,,x=`c__1` (x)[1]+`c__2` (x)[2]],["•",,"Substitute solutions into the general solution"],[,,x=[]+[]],["•",,"Substitute in vector of dependent variables"],[,,[?]=[?]],["•",,"Solution to the system of ODEs"],[,,{x(t)=-`c__1` (e)^(-t)+(3 `c__2` (e)^(4 t))/2,y(t)=`c__1` (e)^(-t)+`c__2` (e)^(4 t)}]]"

(5)
 

NULL

Download Plot-1.mw

Dear All, I hope this message finds you well. I am currently facing some issues and would appreciate your support or guidance in resolving them. Nusselt_RSM_Model.mw

 

restart;

with(Statistics): with(LinearAlgebra): with(plots):

local A, B, C, D;

Digits := 10:

 

# Step 1: Define the variables

vars := [A, B, C, D];

 

# Step 2: Generate Central Composite Design (CCD) coded matrix

coded := Matrix([

    [ 1,  1,  1,  1],

    [ 1,  1,  1, -1],

    [ 1,  1, -1,  1],

    [ 1,  1, -1, -1],

    [ 1, -1,  1,  1],

    [ 1, -1,  1, -1],

    [ 1, -1, -1,  1],

    [ 1, -1, -1, -1],

    [-1,  1,  1,  1],

    [-1,  1,  1, -1],

    [-1,  1, -1,  1],

    [-1,  1, -1, -1],

    [-1, -1,  1,  1],

    [-1, -1,  1, -1],

    [-1, -1, -1,  1],

    [-1, -1, -1, -1],

    [ 0,  0,  0,  0],

    [ 0,  0,  0,  0],

    [ 0,  0,  0,  0],

    [ 0,  0,  0,  0]

]):

 

# Step 3: Define uncoded variable ranges

rangeA := [0.1, 0.5]:

rangeB := [0.1, 0.5]:

rangeC := [0.1, 0.5]:

rangeD := [0.1, 0.5]:

 

decode := (val, r) -> r[1] + (val + 1)*(r[2] - r[1])/2:

 

# Step 4: Create actual values matrix

actual := Matrix(20, 4):

for i from 1 to 20 do

    for j from 1 to 4 do

        r := eval(cat("range", vars[j])):

        actual[i, j] := evalf(decode(coded[i, j], r));

    end do;

end do:

 

# Step 5: Define model coefficients (for simulation purposes)

beta := [1.5, 0.8, 0.6, 0.5, 0.3,  # Linear terms

         0.1, 0.2, 0.15, 0.18,  # Square terms

         0.05, 0.04, 0.03, 0.02, 0.01, 0.025]; # Interaction terms

 

# Step 6: Simulate Response (Nusselt number)

Nu := Vector(20):

for i from 1 to 20 do

    A := actual[i,1]; B := actual[i,2]; C := actual[i,3]; D := actual[i,4];

    Nu[i] := evalf(

        beta[1] + beta[2]*A + beta[3]*B + beta[4]*C + beta[5]*D +

        beta[6]*A^2 + beta[7]*B^2 + beta[8]*C^2 + beta[9]*D^2 +

        beta[10]*A*B + beta[11]*A*C + beta[12]*A*D +

        beta[13]*B*C + beta[14]*B*D + beta[15]*C*D

    );

end do:

 

# Step 7: Create data frame for ANOVA

X := Matrix(actual):

Y := convert(Nu, list):

 

# Step 8: Fit quadratic model

model := Fit(

    A + B + C + D + A^2 + B^2 + C^2 + D^2 + A*B + A*C + A*D + B*C + B*D + C*D,

    X,

    Y,

    vars

):

 

# Step 9: ANOVA table

anovaTable := ANOVA(model, significancelevel=0.05):

 

# Step 10: Display results with 8 decimal places

printf("RSM Model for Nu (Nusselt number):\n");

print(evalf[8](model));

printf("\nANOVA Table:\n");

print(anovaTable);

 

# Optional: Plotting

pointplot([seq([i, Nu[i]], i = 1..20)], style=point, symbol=circle,

          color=red, title="Nusselt Number vs Run Index",

          labels=["Run", "Nusselt Number"]);

[A, B, C, D]

 

[1.5, .8, .6, .5, .3, .1, .2, .15, .18, 0.5e-1, 0.4e-1, 0.3e-1, 0.2e-1, 0.1e-1, 0.25e-1]

 

Error, (in Statistics:-Fit) invalid input: Fit expects its 4th argument, v, to be of type {name, list(name)}, but received [1.5+2.2*"a"+.805*"a"^2, 1.5+1.9*"a"+.3*"r"+.56*"a"^2+.18*"r"^2+0.65e-1*"a"*"r", 1.5+1.7*"a"+.5*"r"+.57*"a"^2+.15*"r"^2+0.85e-1*"a"*"r", 1.5+1.4*"a"+.8*"r"+.35*"a"^2+.355*"r"^2+.10*"a"*"r", 1.5+1.6*"a"+.6*"r"+.525*"a"^2+.2*"r"^2+0.8e-1*"a"*"r", 1.5+1.3*"a"+.9*"r"+.29*"a"^2+.39*"r"^2+.125*"a"*"r", 1.5+1.1*"a"+1.1*"r"+.31*"a"^2+.37*"r"^2+.125*"a"*"r", 1.5+.8*"a"+1.4*"r"+.1*"a"^2+.585*"r"^2+.12*"a"*"r", 1.5+.8*"r"+1.4*"a"+.1*"r"^2+.585*"a"^2+.12*"a"*"r", 1.5+1.1*"r"+1.1*"a"+.31*"r"^2+.37*"a"^2+.125*"a"*"r", 1.5+1.3*"r"+.9*"...

 

RSM Model for Nu (Nusselt number):

 

model

 


ANOVA Table:

 

ANOVA(model, significancelevel = 0.5e-1)

 

Error, (in plots:-pointplot) incorrect specification of points data

 
 

``

Download Nusselt_RSM_Model.mw

Hi,

I’m not very familiar with how to handle complex numbers in Maple, but I’d like to solve a final exam exercise (June 2025) on complex numbers in this environment. I’ve already solved it using pen and paper. My goal is also to illustrate the different results graphically, for pedagogical purposes, so I’d like some guidance to translate my pen-and-paper solution.

Bac_25_SM_Complexes.mw

Epreuve_Bac_SM_2025_Ss1_Sol-Exo-02.pdf

I need to use a procedure where one of the parameters is a function. Conceptually, this seems straightforward, but I’m encountering unexpected behavior. Here’s a minimal example of my approach:

f1:=proc(t::numeric, fn::function)::numeric;
return fn(t+1)+1
end proc;

However, none of the following calls return the correct result:

f1(2, sin);
f1(2, sin());
f1(2, sin(x));
f1(2, u-> u^2);

Any guidance would be greatly appreciated!

we have a lot term which we add thus term we can get something near to our solution but i don't know how it is work , did any one did pade approximate of series solution?

restart

with(inttrans)

with(PDEtools)

with(DEtools)

with(Physics)

declare(u(x, t), quiet); declare(v(x, t), quiet); declare(U(x, t), quiet)

undeclare(prime)

approx_sol := -8*x + 3 - 208/3*x^3 + 24*x^2 + 2279/15*x^5 + 200*x^4 + 443/63*x^7 + 676/15*x^6 + 62/2835*x^9 + 62/105*x^8

-8*x+3-(208/3)*x^3+24*x^2+(2279/15)*x^5+200*x^4+(443/63)*x^7+(676/15)*x^6+(62/2835)*x^9+(62/105)*x^8

(1)
 

NULL

Download pade-approximate.mw


Hi
I want to plot M versus R=kappa for the mentioned parameters. (I know M must be a real and positive number)
But I couldn't. May someone please review and fix my uploaded file?

m1.mw

It is very strange, but I cannot find in v. 2025 shortcut or a button for stoping current evaluation.

I had no problem with this in previous version, but now the absence of immediate stoping make troubles for me,

Find the circle of maximum radius that is tangent to both curves. 
There are no other conditions or restrictions.
Equations of curves

 (x1-1/2)^4+x1*x2+2*x2^2-1=0; 
 (x1-sin(x1))^2+(x2-sin(x2))^2-1=0;

I seem to recall that a[k] and a(k) are treated interchangeably within a proc.  But I did not expect that to happen at the top level.  See the worksheet below.  Is there a way to keep indexed quantities as indexed?

restart;

kernelopts(version);

`Maple 2025.0, X86 64 LINUX, Mar 24 2025, Build ID 1909157`

A := piecewise(x<0, a[1], a[2]);

A := piecewise(x < 0, a[1], a[2])

int(1/A, x=-1..1);

1/a(1)+1/a(2)

Download mw.mw

I have created an animation of a flexible octahedron (following Bricard) with Maple.   It shows the six vertices and twelve edges.  How do I add the faces (triangles)?  Can the animation show their lines of intersection?

It is not difficult to manually check the validity of the identity  sqrt(x+2*sqrt(x-1)) = sqrt(x-1)+1 , which is true at least for all  x>=1 . I don't know of any Maple command that directly makes this simplification:

expr:=sqrt(x+2*sqrt(x-1));
simplify(expr);
simplify(expr) assuming x>=1;

                          


It was possible to simplify it only by making a variable substitution  x=y+1 (and then a reverse substitution  y=x-1 ) :

expr1:=subs(x=y+1,expr);
simplify(expr1);
subs(y=x-1, %);

                               


By the way,  the CAS Mathematica also cannot cope with simplifying the expression  expr .

I'm working on an optimization problem involving a single decision variable p1, subject to four inequality constraints:

  • Two upper bound constraints:

    p1 < b1,p1 < b2
  • Two lower bound constraints:

    c1 ≤ p1,c2 ≤ p1

Effectively, the feasible region for p1 is:

max⁡(c1,c2)  ≤  p1  ≤  min⁡(b1,b2)

I have already formulated the Karush-Kuhn-Tucker (KKT) conditions for this setup, and now I'm trying to determine:

  1. The optimal value p1∗​

  2. The corresponding feasibility conditions

  3. A case-wise breakdown depending on which constraints are active or inactive


Sheet:  Q_P1_Optimum_condition.mw

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