janhardo

765 Reputation

12 Badges

11 years, 164 days

MaplePrimes Activity


These are answers submitted by janhardo

@Alfred_F 
In complexe analyse the limit is ?

restart;

# Definieer j als positief
assume(j > 0):

# Definieer de som over k
S := sum(1 / (j^2 + k^2), k = 1 .. n):

# Neem de limiet als n → ∞
limit(S, n = infinity);

               1                                
               - I (Psi(1 - I j) - Psi(1 + I j))
               2                                
               ---------------------------------
                               j                

# restart;

# Definieer de uitdrukking na binnenlimiet
a := j -> (Pi/2 - arctan(1/j)):

# Buitensom van j = 1 .. n
S := sum(a(j), j = 1 .. n):

# Buitenlimiet (deel door n)
limit(S/n, n = infinity);

                              1   
                              - Pi
                              2   

@JaneCherrytree 
Symbolic integral seems to problematic to get 
ntegral_of_long_expression_mprimesDEFA_7-5-2025_(2).mw

restart; with(PDEtools); with(LinearAlgebra); with(plots); with(SolveTools); undeclare(prime); ModulationInstabilityAnalysis_CompleteAllSteps := proc (a_value::positive, l_range::range, show_details::boolean := true, show_plots::boolean := true) local a, phi, w, eq1, eq19, Pfun, eq21_1, eq21_2, M, det_eq, msols, G, G_plot, G_3d_plot, Overlay_plot, a_param, G_formula, plot1, plot2, plot3; description 2; a := 'a'; Pfun := r1*exp(I*(l*x-m*t))+r2*(modulename = Typesetting)(-I*(l*x-m*t)); phi := a*t; w := (sqrt(a)+Pfun)*(modulename = Typesetting)(I*phi); eq1 := I*(diff(w, t))+diff(w, `$`(x, 2))+abs(w)^2*w = 0; eq19 := eval(Typesetting, abs(w)^2 = a+sqrt(a)*(Pfun+conjugate(Pfun))); eq19 := simplify(expand(eq19/(modulename = Typesetting)(I*phi))); eq21_1 := (-m-l^2+a)*r2+a*r1 = 0; eq21_2 := (m-l^2+a)*r1+a*r2 = 0; M := Matrix([[-m-l^2+a, a], [a, m-l^2+a]]); det_eq := simplify(Determinant(M) = 0); msols := solve(det_eq, m); G := 2*Im(msols[1]); G_formula := "G(l) = 2 * Im( &plusmn; sqrt(l^4 - 2*a*l^2) )"; if show_details then print("? Eq. (1): NLSE:Fdo-Fj"); Typesetting; print("? Eq. (18): Steady-state veld w:Fdo-Fj"); protected, _syslib; print("? Eq. (19): Gelinieariseerde vergelijking:Fdo-Fj"); eq19; print("? Eq. (20): Perturbatie-ansatz:Fdo-Fj"); Pfun; print("? Eq. (21): Lineair systeem:Fdo-Fj"); eq21_1; print(); print("? Eq. (22): Matrix:Fdo-Fj"); M; print("? Eq. (23): Dispersierelatie:Fdo-Fj"); det_eq; print("? Eq. (24): m-oplossingen:Fdo-Fj"); msols; print("? Eq. (25): Instabiliteit als: l^4 - 2*a*l^2 < 0Fdo-Fj"); "? Eq. (26): Groei G(l):Fdo-Fj"; G_formula; print("G(l) =", G) end if; if show_plots then G_plot := print(plot(eval(G, a = a_value), l = l_range, labels = ["Wave number l", "Growth rate G(l)"], title = cat("G(l) for a = ", a_value), thickness = 2, color = blue)); G_3d_plot := print(plot3d(2*Im(sqrt(l^4-2*a_param*l^2)), l = l_range, a_param = .1 .. 2*a_value, labels = ["l", "a", "G(l)"], title = "3D MI Gain Spectrum")); plot1 := plot(2*Im(sqrt(l^4+(-2)*1.0*l^2)), l = l_range, color = red, thickness = 2); plot2 := plot(2*Im(sqrt(l^4+(-2)*.5*l^2)), l = l_range, color = blue, thickness = 2); plot3 := plot(2*Im(sqrt(l^4+(-2)*.3*l^2)), l = l_range, color = green, thickness = 2); Overlay_plot := print(display([plot1, plot2, SolveTools], labels = ["Wave number l", "Growth rate G(l)"], legend = ["a = 1", "a = 0.5", "a = 0.3"], title = "Overlay G(l) for a = 1, 0.5, 0.3")); print("? Explore G(l) versus a:Fdo-%(e"); return ['eq1_nlse' = Typesetting, 'steady_state_eq18' = w, 'linearized_eq19' = eq19, 'ansatz_eq20' = Pfun, 'eq21_system' = [eq21_1, ], 'matrix_eq22' = M, 'dispersion_eq23' = det_eq, 'm_solutions_eq24' = msols, 'growth_rate_eq26' = G, 'stability_condition_eq25' = "l^4 - 2*a*l^2 < 0"]; ;  end if;  end proc

`There is no more prime differentiation variable; all derivatives will be displayed as indexed functions`

(1)

NULL

a := 1.0; l_range := -3 .. 3; result := ModulationInstabilityAnalysis_CompleteAllSteps(a, l_range, show_details = true, show_plots = true)

"? Eq. (1): NLSE:6""

 

I*((-I*r1*m*exp(I*(l*x-m*t))+I*r2*m*exp(-I*(l*x-m*t)))*exp(I*a*t)+I*(sqrt(a)+r1*exp(I*(l*x-m*t))+r2*exp(-I*(l*x-m*t)))*a*exp(I*a*t))+(-r1*l^2*exp(I*(l*x-m*t))-r2*l^2*exp(-I*(l*x-m*t)))*exp(I*a*t)+abs(sqrt(a)+r1*exp(I*(l*x-m*t))+r2*exp(-I*(l*x-m*t)))^2*(exp(-Im(a*t)))^2*(sqrt(a)+r1*exp(I*(l*x-m*t))+r2*exp(-I*(l*x-m*t)))*exp(I*a*t) = 0

 

"? Eq. (18): Steady-state veld w:6""

 

(sqrt(a)+r1*exp(I*(l*x-m*t))+r2*exp(-I*(l*x-m*t)))*exp(I*a*t)

 

"? Eq. (19): Gelinieariseerde vergelijking:6""

 

(exp(-2*Im(a*t))*sqrt(a)+r2*exp(-I*l*x+I*m*t-2*Im(a*t))+r1*exp(I*l*x-I*m*t-2*Im(a*t)))*abs(sqrt(a)+r1*exp(I*(l*x-m*t))+r2*exp(-I*(l*x-m*t)))^2-r2*(l^2+a+m)*exp(-I*(l*x-m*t))-r1*(l^2+a-m)*exp(I*(l*x-m*t))-a^(3/2) = 0

 

"? Eq. (20): Perturbatie-ansatz:6""

 

r1*exp(I*(l*x-m*t))+r2*exp(-I*(l*x-m*t))

 

"? Eq. (21): Lineair systeem:6""

 

(-l^2+a-m)*r2+r1*a = 0

 

(-l^2+a+m)*r1+r2*a = 0

 

"? Eq. (22): Matrix:6""

 

Matrix(2, 2, {(1, 1) = -l^2+a-m, (1, 2) = a, (2, 1) = a, (2, 2) = -l^2+a+m})

 

"? Eq. (23): Dispersierelatie:6""

 

l^4-2*a*l^2-m^2 = 0

 

"? Eq. (24): m-oplossingen:6""

 

sqrt(l^2-2*a)*l, -sqrt(l^2-2*a)*l

 

"? Eq. (25): Instabiliteit als: l^4 - 2*a*l^2 < 06""

 

"? Eq. (26): Groei G(l):6""

 

"G(l) = 2 * Im( &plusmn; sqrt(l^4 - 2*a*l^2) )"

 

"G(l) =", 2*Im(sqrt(l^2-2*a)*l)

 

 

 

 

"? Explore G(l) versus a:6""

 

"?? Explore 3D G(l,a):"

 

[eq1_nlse = (I*((-I*r1*m*exp(I*(l*x-m*t))+I*r2*m*exp(-I*(l*x-m*t)))*exp(I*a*t)+I*(a^(1/2)+r1*exp(I*(l*x-m*t))+r2*exp(-I*(l*x-m*t)))*a*exp(I*a*t))+(-r1*l^2*exp(I*(l*x-m*t))-r2*l^2*exp(-I*(l*x-m*t)))*exp(I*a*t)+abs(a^(1/2)+r1*exp(I*(l*x-m*t))+r2*exp(-I*(l*x-m*t)))^2*(exp(-Im(a*t)))^2*(a^(1/2)+r1*exp(I*(l*x-m*t))+r2*exp(-I*(l*x-m*t)))*exp(I*a*t) = 0), steady_state_eq18 = (a^(1/2)+r1*exp(I*(l*x-m*t))+r2*exp(-I*(l*x-m*t)))*exp(I*a*t), linearized_eq19 = ((exp(-2*Im(a*t))*a^(1/2)+r2*exp(-I*l*x+I*m*t-2*Im(a*t))+r1*exp(I*l*x-I*m*t-2*Im(a*t)))*abs(a^(1/2)+r1*exp(I*(l*x-m*t))+r2*exp(-I*(l*x-m*t)))^2-r2*(l^2+a+m)*exp(-I*(l*x-m*t))-r1*(l^2+a-m)*exp(I*(l*x-m*t))-a^(3/2) = 0), ansatz_eq20 = r1*exp(I*(l*x-m*t))+r2*exp(-I*(l*x-m*t)), eq21_system = [(-l^2+a-m)*r2+r1*a = 0, (-l^2+a+m)*r1+r2*a = 0], matrix_eq22 = Matrix(%id = 36893490539730111892), dispersion_eq23 = (l^4-2*a*l^2-m^2 = 0), m_solutions_eq24 = ((l^2-2*a)^(1/2)*l, -(l^2-2*a)^(1/2)*l), growth_rate_eq26 = 2*Im((l^2-2*a)^(1/2)*l), stability_condition_eq25 = "l^4 - 2*a*l^2 < 0"]

(2)

Download ModulationInstabilityAnalysis_CompleteAllSteps_mprimes-4-5-2025.mw

Comparing A2 and A2  , shows that they are equal and simplify and is  is not neccessary 

restart;

 

A := -x*(x - 4*exp(x/2) + 2);
B := x*sqrt((-8*x - 16)*exp(x/2) + x^2 + 4*x + 16*exp(x) + 4);

-x*(x-4*exp((1/2)*x)+2)

 

x*((-8*x-16)*exp((1/2)*x)+x^2+4*x+16*exp(x)+4)^(1/2)

(1)

simplify(A-B) assuming x::real;
 

0

(2)

 

A2 := expand(A^2);
B2 := expand(B^2);

x^4-8*x^3*exp((1/2)*x)+4*x^3+16*x^2*(exp((1/2)*x))^2-16*x^2*exp((1/2)*x)+4*x^2

 

-8*x^3*exp((1/2)*x)-16*x^2*exp((1/2)*x)+x^4+4*x^3+16*x^2*exp(x)+4*x^2

(3)

A2 := expand(A^2)assuming x::real;
B2 := expand(B^2)assuming x::real;

x^4-8*x^3*(exp(x))^(1/2)+4*x^3+16*x^2*exp(x)-16*x^2*(exp(x))^(1/2)+4*x^2

 

x^4-8*x^3*(exp(x))^(1/2)+4*x^3+16*x^2*exp(x)-16*x^2*(exp(x))^(1/2)+4*x^2

(4)

 

 

simplify(A2 - B2);

0

(5)

is(simplify(A2) = simplify(B2)) ;

true

(6)

solve ( x^4 - 8*x^3*exp(x/2) + 4*x^3 + 16*x^2*exp(x/2)^2 - 16*x^2*exp(x/2) + 4*x^2, x) assuming x::real;

0, -2-2*LambertW(-2*exp(-1))

(7)

solve( -8*x^3*exp(x/2) - 16*x^2*exp(x/2) + x^4 + 4*x^3 + 16*x^2*exp(x) + 4*x^2,x)assuming x::real;

0, -2-2*LambertW(-2*exp(-1))

(8)

 

NULL

Download gelijkheid_expressie_mpries_3-5-2025_A.mw

see under

restart;
with(DEtools):

# Step 1: Define the nonlinear ODE in Q(zeta)
ode := (diff(Q(zeta), zeta))^2 - r^2*Q(zeta)^2*(a - b*Q(zeta) - l*Q(zeta)^2) = 0;
printf("Step 1: Define the nonlinear ODE involving Q(zeta).\n");

# Step 2: Apply substitution Q = 1/u to transform the ODE
ode_u := simplify(eval(ode, Q(zeta) = 1/u(zeta)) * u(zeta)^4);
printf("Step 2: Substitute Q = 1/u to transform the ODE into a simpler rational form.\n");

# Step 3: Solve the transformed ODE for u(zeta)
u_sol := dsolve(ode_u, u(zeta));
printf("Step 3: Solve the transformed ODE in terms of u(zeta).\n");

# Step 4: Choose the specific solution involving tanh and revert back to Q(zeta)
u_specific := b/(2*a) + sqrt(4*a*l + b^2)/(2*a)*tanh(r*sqrt(a)*zeta/2);
Q_sol := 1/u_specific;
printf("Step 4: Choose the specific solution using tanh and convert back to Q(zeta).\n");

# Step 5: Define the exponential form of Q(zeta) as shown in the image
Q_exp := 4*a/((4*a*l + b^2)*exp(r*sqrt(a)*zeta) - exp(-r*sqrt(a)*zeta) + 2*b);
printf("Step 5: Define the exponential expression for Q(zeta).\n");

# Verify equivalence of hyperbolic and exponential forms
verify_exp := simplify(Q_sol - Q_exp);
printf("Step 6: Verify if the expression using tanh equals the exponential form. Difference = %a\n", verify_exp);

# Step 6: Define the hyperbolic version (sech² and tanh form) of the solution
Q_hyp := a*b*sech(r*sqrt(a)*zeta/2)^2/(b^2 + a*l*(1 - tanh(r*sqrt(a)*zeta/2))^2);
printf("Step 7: Define the hyperbolic solution (sech²/tanh form).\n");

# Check equivalence with exponential form
verify_hyp := simplify(Q_exp - Q_hyp);
printf("Step 8: Verify if exponential form equals the hyperbolic form. Difference = %a\n", verify_hyp);

# Step 9: Validate that both expressions satisfy the original ODE
ode_check_exp := simplify(eval(ode, Q = unapply(Q_exp, zeta)));
ode_check_hyp := simplify(eval(ode, Q = unapply(Q_hyp, zeta)));
printf("Step 9: Substitute Q_exp into ODE → Result = %a\n", ode_check_exp);
printf("Step 10: Substitute Q_hyp into ODE → Result = %a\n", ode_check_hyp);

?

 

# --------------------------------------
# 🚧 Fix to remove the extra U'(xi) term
# --------------------------------------

# This is the condition needed to remove the extra real part involving dU/dxi:
FixCond := 3*delta[3]*(b[1]*d[1]^2 + b[2]*d[2]^2 + b[3]*d[3]^2)
           - 2*delta[1]*(b[1]*d[1] + b[2]*d[2] + b[3]*d[3])
           - b[4];

# Set this condition to zero to eliminate the extra U'(xi) term
FixCondSol := solve(FixCond = 0, b[4]);

# Substitute this condition directly back into your main reduced ODE
FixedODE := subs(b[4] = FixCondSol, Q);

# ✅ Now continue analysis with FixedODE instead of Q

@Paras31 
look promising,, 

CORRECT ?

restart;
with(PDEtools):
with(LinearAlgebra):
with(SolveTools):
undeclare(prime):
alias(F=F(x,y,z,t), G=G(x,y,z,t)):

ND := proc(F, G, U)
  local v, w, f, g, a, i, newv;
  v := [op(F)];
  newv := [];
  for i from 1 to nops(v) do
    if v[i] in U then
      newv := [op(newv), -v[i]];
    else
      newv := [op(newv), v[i]];
    end if;
  end do;
  f := op(0, F);
  g := op(0, G);
  a := diff(f(op(newv))*g(op(v)), U);
  convert(subs(newv=~v, a), diff);
end proc:

 

`There is no more prime differentiation variable; all derivatives will be displayed as indexed functions`

(1)

ND(sin(x)*cos(y)*exp(z-t), cos(x)*sin(y)*exp(z+t), [x,y,z,t]);

16*sin(x)*cos(y)*(exp(z-t))^2*cos(x)*sin(y)

(2)

 

ND := proc(F, G, U)
  local v, w, f, g, a, i, newv, result;
  
  v := [op(F)];     # Haal variabelenlijst uit F
  newv := [];       # Maak lege lijst
  
  for i from 1 to nops(v) do
    if v[i] in U then
      newv := [op(newv), -v[i]];  # Spiegelen
    else
      newv := [op(newv), v[i]];   # Anders normaal houden
    end if;
  end do;
  
  f := op(0, F);    # Functienaam F
  g := op(0, G);    # Functienaam G
  
  a := diff(f(op(newv)) * g(op(v)), U);  # Differentieer aangepast product
  result := convert(subs(newv=~v, a), diff);  # Zet gespiegelde terug
  
  return simplify(result);  # >>> AUTOMATISCH VEREENVOUDIGEN! <<<
end proc:

ND(sin(x)*cos(y)*exp(z-t), cos(x)*sin(y)*exp(z+t), [x,y,z,t]);

4*sin(2*y)*sin(2*x)*exp(2*z-2*t)

(3)

ND(F, G, [x]);
ND(F, G, [t]);

-(diff(F, x))*G+F*(diff(G, x))

 

-(diff(F, t))*G+F*(diff(G, t))

(4)

ND(F(x,y,z,t), G(x,y,z,t), [x]);
ND(F(x,y,z,t), G(x,y,z,t), [y]);
ND(F(x,y,z,t), G(x,y,z,t), [z]);
ND(F(x,y,z,t), G(x,y,z,t), [t]);
ND(F(x,y,z,t), G(x,y,z,t), [x,y]);
ND(F(x,y,z,t), G(x,y,z,t), [x,y,z]);
ND(F(x,y,z,t), G(x,y,z,t), [x$2, y, z, t]);

-(diff(F(x, y, z, t), x))*G(x, y, z, t)+F(x, y, z, t)*(diff(G(x, y, z, t), x))

 

-(diff(F(x, y, z, t), y))*G(x, y, z, t)+F(x, y, z, t)*(diff(G(x, y, z, t), y))

 

-(diff(F(x, y, z, t), z))*G(x, y, z, t)+F(x, y, z, t)*(diff(G(x, y, z, t), z))

 

-(diff(F(x, y, z, t), t))*G(x, y, z, t)+F(x, y, z, t)*(diff(G(x, y, z, t), t))

 

(diff(diff(F(x, y, z, t), x), y))*G(x, y, z, t)-(diff(F(x, y, z, t), x))*(diff(G(x, y, z, t), y))-(diff(F(x, y, z, t), y))*(diff(G(x, y, z, t), x))+F(x, y, z, t)*(diff(diff(G(x, y, z, t), x), y))

 

-(diff(diff(diff(F(x, y, z, t), x), y), z))*G(x, y, z, t)+(diff(diff(F(x, y, z, t), x), y))*(diff(G(x, y, z, t), z))+(diff(diff(F(x, y, z, t), x), z))*(diff(G(x, y, z, t), y))-(diff(F(x, y, z, t), x))*(diff(diff(G(x, y, z, t), y), z))+(diff(diff(F(x, y, z, t), y), z))*(diff(G(x, y, z, t), x))-(diff(F(x, y, z, t), y))*(diff(diff(G(x, y, z, t), x), z))-(diff(F(x, y, z, t), z))*(diff(diff(G(x, y, z, t), x), y))+F(x, y, z, t)*(diff(diff(diff(G(x, y, z, t), x), y), z))

 

-(diff(diff(diff(diff(diff(F(x, y, z, t), t), x), x), y), z))*G(x, y, z, t)+(diff(diff(diff(diff(F(x, y, z, t), x), x), y), z))*(diff(G(x, y, z, t), t))+(diff(diff(diff(diff(F(x, y, z, t), t), x), x), y))*(diff(G(x, y, z, t), z))-(diff(diff(diff(F(x, y, z, t), x), x), y))*(diff(diff(G(x, y, z, t), t), z))+(diff(diff(diff(diff(F(x, y, z, t), t), x), x), z))*(diff(G(x, y, z, t), y))-(diff(diff(diff(F(x, y, z, t), x), x), z))*(diff(diff(G(x, y, z, t), t), y))-(diff(diff(diff(F(x, y, z, t), t), x), x))*(diff(diff(G(x, y, z, t), y), z))+(diff(diff(F(x, y, z, t), x), x))*(diff(diff(diff(G(x, y, z, t), t), y), z))+2*(diff(diff(diff(diff(F(x, y, z, t), t), x), y), z))*(diff(G(x, y, z, t), x))-2*(diff(diff(diff(F(x, y, z, t), x), y), z))*(diff(diff(G(x, y, z, t), t), x))-2*(diff(diff(diff(F(x, y, z, t), t), x), y))*(diff(diff(G(x, y, z, t), x), z))+2*(diff(diff(F(x, y, z, t), x), y))*(diff(diff(diff(G(x, y, z, t), t), x), z))-2*(diff(diff(diff(F(x, y, z, t), t), x), z))*(diff(diff(G(x, y, z, t), x), y))+2*(diff(diff(F(x, y, z, t), x), z))*(diff(diff(diff(G(x, y, z, t), t), x), y))+2*(diff(diff(F(x, y, z, t), t), x))*(diff(diff(diff(G(x, y, z, t), x), y), z))-2*(diff(F(x, y, z, t), x))*(diff(diff(diff(diff(G(x, y, z, t), t), x), y), z))-(diff(diff(diff(F(x, y, z, t), t), y), z))*(diff(diff(G(x, y, z, t), x), x))+(diff(diff(F(x, y, z, t), y), z))*(diff(diff(diff(G(x, y, z, t), t), x), x))+(diff(diff(F(x, y, z, t), t), y))*(diff(diff(diff(G(x, y, z, t), x), x), z))-(diff(F(x, y, z, t), y))*(diff(diff(diff(diff(G(x, y, z, t), t), x), x), z))+(diff(diff(F(x, y, z, t), t), z))*(diff(diff(diff(G(x, y, z, t), x), x), y))-(diff(F(x, y, z, t), z))*(diff(diff(diff(diff(G(x, y, z, t), t), x), x), y))-(diff(F(x, y, z, t), t))*(diff(diff(diff(diff(G(x, y, z, t), x), x), y), z))+F(x, y, z, t)*(diff(diff(diff(diff(diff(G(x, y, z, t), t), x), x), y), z))

(5)

ND(F(x,y,t), G(x,y,t), [x]);
ND(F(x,y,z,t), G(x,y,z,t), [y]);
ND(F(x,y,z,t), G(x,y,z,t), [z]);
ND(F(x,y,z,t), G(x,y,z,t), [t]);
ND(F(x,y,z,t), G(x,y,z,t), [x,y]);
ND(F(x,y,z,t), G(x,y,z,t), [x,y,z]);
ND(F(x,y,t), G(x,y,t), [x$2, y, t]);

-(diff(F(x, y, t), x))*G(x, y, t)+F(x, y, t)*(diff(G(x, y, t), x))

 

-(diff(F(x, y, z, t), y))*G(x, y, z, t)+F(x, y, z, t)*(diff(G(x, y, z, t), y))

 

-(diff(F(x, y, z, t), z))*G(x, y, z, t)+F(x, y, z, t)*(diff(G(x, y, z, t), z))

 

-(diff(F(x, y, z, t), t))*G(x, y, z, t)+F(x, y, z, t)*(diff(G(x, y, z, t), t))

 

(diff(diff(F(x, y, z, t), x), y))*G(x, y, z, t)-(diff(F(x, y, z, t), x))*(diff(G(x, y, z, t), y))-(diff(F(x, y, z, t), y))*(diff(G(x, y, z, t), x))+F(x, y, z, t)*(diff(diff(G(x, y, z, t), x), y))

 

-(diff(diff(diff(F(x, y, z, t), x), y), z))*G(x, y, z, t)+(diff(diff(F(x, y, z, t), x), y))*(diff(G(x, y, z, t), z))+(diff(diff(F(x, y, z, t), x), z))*(diff(G(x, y, z, t), y))-(diff(F(x, y, z, t), x))*(diff(diff(G(x, y, z, t), y), z))+(diff(diff(F(x, y, z, t), y), z))*(diff(G(x, y, z, t), x))-(diff(F(x, y, z, t), y))*(diff(diff(G(x, y, z, t), x), z))-(diff(F(x, y, z, t), z))*(diff(diff(G(x, y, z, t), x), y))+F(x, y, z, t)*(diff(diff(diff(G(x, y, z, t), x), y), z))

 

(diff(diff(diff(diff(F(x, y, t), t), x), x), y))*G(x, y, t)-(diff(diff(diff(F(x, y, t), x), x), y))*(diff(G(x, y, t), t))-(diff(diff(diff(F(x, y, t), t), x), x))*(diff(G(x, y, t), y))+(diff(diff(F(x, y, t), x), x))*(diff(diff(G(x, y, t), t), y))-2*(diff(diff(diff(F(x, y, t), t), x), y))*(diff(G(x, y, t), x))+2*(diff(diff(F(x, y, t), x), y))*(diff(diff(G(x, y, t), t), x))+2*(diff(diff(F(x, y, t), t), x))*(diff(diff(G(x, y, t), x), y))-2*(diff(F(x, y, t), x))*(diff(diff(diff(G(x, y, t), t), x), y))+(diff(diff(F(x, y, t), t), y))*(diff(diff(G(x, y, t), x), x))-(diff(F(x, y, t), y))*(diff(diff(diff(G(x, y, t), t), x), x))-(diff(F(x, y, t), t))*(diff(diff(diff(G(x, y, t), x), x), y))+F(x, y, t)*(diff(diff(diff(diff(G(x, y, t), t), x), x), y))

(6)
 

 

Download aanpassoing_ND_pro_mprimes27-4-2025.mw

@salim-barzani 

restart;

# Definities
g := a1*x + a2*y + a3*z + a4*t + a5:
h := a6*x + a7*y + a8*z + a9*t + a10:
f := g^2 + h^2 + a11:

# Afgeleiden
fx := diff(f, x): fy := diff(f, y): fz := diff(f, z): ft := diff(f, t):
fxx := diff(fx, x): fxy := diff(fx, y): fxz := diff(fx, z): fyy := diff(fy, y):
fxxx := diff(fxx, x): fxxy := diff(fxx, y): fxxxy := diff(fxxx, y):
fxxxx := diff(fxxx, x): fxxxxx := diff(fxxxx, x): fxxxxxx := diff(fxxxxx, x):

# PDE
PDE := 9*(f*diff(f, x, t) - fx*ft)
    -5*(f*diff(f, x, x, x, y) - 3*fx*diff(f, x, x, y) + 3*fxx*fxy - fxxx*fy)
    + (f*diff(f, x, x, x, x, x, x) - 6*fx*diff(f, x, x, x, x, x) + 15*fxx*diff(f, x, x, x, x) - 10*(fxxx)^2)
    -5*(f*fyy - fy^2)
    +alpha*(f*fxx - fx^2)
    +beta*(f*fxy - fx*fy)
    +gamma*(f*fxz - fx*fz):

PDE := expand(PDE): PDE := simplify(PDE):

# Coëfficiënten pakken
coeff1 := coeff(PDE, x, 1):
coeff2 := coeff(PDE, y, 1):
coeff3 := coeff(PDE, z, 1):
coeff4 := coeff(PDE, t, 1):
coeff_const := eval(PDE, {x=0, y=0, z=0, t=0}):

# Stelsel van vergelijkingen
Eqns := {coeff1=0, coeff2=0, coeff3=0, coeff4=0, coeff_const=0}:
# Stelsel
##Eqns := {coeff_x=0, coeff_y=0, coeff_z=0, coeff_t=0, coeff_const=0}:

# Oplossen
Sol := solve(Eqns, {a4, a9, a11}):
Sol;

{a11 = -3*(a1^2+a6^2)*(a1^3*a2+a1^2*a6*a7+a1*a2*a6^2+a6^3*a7)/(a1^2*a7^2-2*a1*a2*a6*a7+a2^2*a6^2), a4 = -(1/9)*(a1^3*alpha+a1^2*a2*beta+a1^2*a3*gamma+a1*a6^2*alpha+a2*a6^2*beta+a3*a6^2*gamma-5*a1*a2^2+5*a1*a7^2-10*a2*a6*a7)/(a1^2+a6^2), a9 = -(1/9)*(a1^2*a6*alpha+a1^2*a7*beta+a1^2*a8*gamma+a6^3*alpha+a6^2*a7*beta+a6^2*a8*gamma-10*a1*a2*a7+5*a2^2*a6-5*a6*a7^2)/(a1^2+a6^2)}

(1)
 

 

Download solve_a4-a9-a11_pde_6_orde_mprimes_27-4-2025.mw

DrawCleanDomain := proc(outerPolygon::list,
                        path1Pts::list, path2Pts::list,
                        z0::list, z::list,
                        path1Color::string := "red",
                        path2Color::string := "green",
                        outerColor::string := "LightBlue",
                        outerTransparency::numeric := 0.4)

    uses plots, plottools;

    local outer, curve1, curve2, pt1, pt2, label1, label2, finalPlot;
    local z0Label, z0Coords, zLabel, zCoords;

    # Labels en coördinaten splitsen
    z0Label := z0[1]; z0Coords := z0[2];
    zLabel := z[1]; zCoords := z[2];

    # Buitenste domein
    outer := polygon(outerPolygon, color = outerColor, transparency = outerTransparency);

    # Paden
    curve1 := pointplot(path1Pts, color = path1Color, linestyle = dot, thickness = 2, connect = true);
    curve2 := pointplot(path2Pts, color = path2Color, linestyle = dot, thickness = 2, connect = true);

    # Begin- en eindpunt
    pt1 := pointplot([z0Coords], symbol = solidcircle, symbolsize = 15, color = black);
    pt2 := pointplot([zCoords], symbol = solidcircle, symbolsize = 15, color = black);

    # Labels bij punten
    label1 := textplot([z0Coords[1], z0Coords[2] - 0.1, z0Label], font = [Helvetica, Bold, 14]);
    label2 := textplot([zCoords[1], zCoords[2] - 0.1, zLabel], font = [Helvetica, Bold, 14]);

    # Alles tonen in één plot
    finalPlot := display([outer, curve1, curve2, pt1, pt2, label1, label2],
                         scaling = constrained, axes = none,
                         title = "Domain with Two Paths and Custom Points");

    return finalPlot;
end proc:

outerPolygon := [[-1, 0], [-0.7, 1.2], [0, 1.5], [0.7, 1.2], [1.2, 0], [0.7, -1.2], [0, -1.4], [-0.7, -1.2], [-1, 0]];
path1 := [[-0.8, 0.6], [-0.3, 1.0], [0.4, 0.5], [0.9, -0.4]];
path2 := [[-0.8, 0.6], [-0.7, 0.0], [0.2, -0.6], [0.9, -0.4]];
a0 := ["a_0", [-0.8, 0.6]];
z := ["z", [0.9, -0.4]];

DrawCleanDomain(outerPolygon, path1, path2, a0, z);


example ; fig1 := [[0, 0], [4, 0], [4, 3], [0, 3], [5, 5],[8,1],[8,8],[-5,8]]
feature : a last point in the list will not be connected to another point to draw a line 

restart:

 

DrawOrderedLines := proc(shape1::list, isolated1::list, shape2::list, isolated2::list)
  local i, p1, p2, allplots, colorlist, polyline, isolateplot, j:
  uses plots, plottools;
  colorlist := [blue, red]:
  allplots := []:

  for i from 1 to 2 do
    if i = 1 then
      polyline := shape1:
      isolateplot := isolated1:
    else
      polyline := shape2:
      isolateplot := isolated2:
    end if:

    # Verbind punten in exacte volgorde
    if nops(polyline) >= 2 then
      for j from 1 to nops(polyline) - 1 do
        p1 := polyline[j]:
        p2 := polyline[j+1]:
        allplots := [op(allplots), line(p1, p2, color=colorlist[i], thickness=2)]:
      end do:
    end if:

    # Teken losse geïsoleerde punten
    if nops(isolateplot) > 0 then
      allplots := [op(allplots), pointplot(isolateplot, color=colorlist[i], symbol=solidcircle, symbolsize=15)]:
    end if:
  end do:

  return display(allplots, scaling=constrained, title="");
end proc:

fig1 := [[0, 0], [4, 0], [4, 3], [0, 3], [5, 5],[8,1],[8,8],[-5,8]]:
isolated1 := [[0,3],[2, 1],[-5,8]]:
fig2 := [[6, 6], [8, 6], [8, 8], [6, 8], [9, 9]]:
isolated2 := [[7, 7]]:

DrawOrderedLines(fig1, isolated1, fig2, isolated2);

 

Download punten_tekeken_-laatste_punt_niet_in_lijst_mprimes_23-4-2025.mw

2 3 4 5 6 7 Page 4 of 7