janhardo

710 Reputation

12 Badges

11 years, 89 days

MaplePrimes Activity


These are answers submitted by janhardo

@Alfred_F 

There are some corrections  to make for the procedure FastPursuite 
Handling the ode system in Maple for this procedure can be different on two ways.


As you can see the goat is escaping the wolf ..lol,  message (  try  correct this  and add  coordinat axes)



The procedure approach:

@Alfred_F 
A bijective function cannot be periodic ?

sol := dsolve([de1, de2, bc], numeric, method = bvp[midrich], approxsoln = [y(x) = 1 - exp(-x), z(x) = exp(-x)], abserr = 0.1e-5, maxmesh = 128)

` Solve using BVP with midrich method (collocation-type)`

 


Angular Motion Over Time

restart;
grid := proc(M::Matrix) local i, j, Ms, m, n, wks; m, n := op(1, M); Ms := map(convert, M, string); wks := XMLTools:-ToString(_XML_Worksheet(DocumentTools:-Layout:-Table(':-alignment' = ':-center', ':-width' = 20, seq(DocumentTools:-Layout:-Column(':-weight' = 3 + max(map(length, Ms[() .. (), j]))), j = 1 .. n), seq(DocumentTools:-Layout:-Row(seq(DocumentTools:-Layout:-Cell(`_XML_Text-field`("alignment" = "centred", "style" = "Text", Ms[i, j])), j = 1 .. n)), i = 1 .. m)))); streamcall(INTERFACE_TASKTEMPLATE(':-insertdirect', ':-content' = wks)); NULL; end proc;
data := [["Case", "Optimal Pc"], ["μ₁ = 0, μ₂ = 0", "Pc₁"], ["μ₁ = 0, μ₂ > 0", "Pc₂"], ["μ₁ > 0, μ₂ = 0", "Pc₃"]];
grid(Matrix(data));

Is this correct ?


 

restart; with(PDEtools); with(plots); declare(w(r, z)); eta := 1; lambda := 1; A1 := 1; A2 := 1; A3 := 1; Da := 1; M := 1; m := 1; UHS := 1; Phi := (1/4)*Pi; dpdz := -1; N := 1; w[0] := proc (r, z) options operator, arrow; (1/2)*r^2-(1/2)*eta^2 end proc; w_total := proc (r, z) options operator, arrow; sum(p^n*w[n](r, z), n = 0 .. N) end proc; HPMEq := (1-p)*(diff(w[0](r, z), r, r))+p*(diff(w_total(r, z), r, r)+(diff(w_total(r, z), r))/r-(1+lambda)*(dpdz+A2*M^2*w_total(r, z)+A1*w_total(r, z)/Da-m^2*UHS*BesselI(0, m*r)/BesselI(0, m*eta)+A3*sin(Phi))/A1); for i from 0 to N do equ[i] := coeff(expand(HPMEq), p, i) = 0 end do; bc[0] := (D[1](w[0]))(0, z) = 0, w[0](eta, z) = 0; for j to N do bc[j] := (D[1](w[j]))(0, z) = 0, w[j](eta, z) = 0 end do; for i from 0 to N do if i = 0 then w[i] := unapply((-eta^2+r^2)*(1/2), r, z) else try dsol := dsolve({equ[i], w[i](eta, z) = 0, (D(w[i]))(0, z) = 0}, w[i](r, z)); w[i] := unapply(rhs(dsol), r, z) catch: print(`No analytic solution found for order`, i); w[i] := proc (r, z) options operator, arrow; 0 end proc end try end if end do; W_final := eval(sum(w[n](r, z), n = 0 .. N), p = 1); W_final := simplify(W_final); if has(W_final, w[1]) then print("Warning: Solution contains unresolved w[1] terms - using numerical approach"); W_plot := eval(W_final, w[1](r, z) = 0) else W_plot := W_final end if; plot(eval(W_plot, z = 0), r = 0 .. eta, title = "Velocity Profile w(r,0)", labels = ["r", "w(r,0)"], labeldirections = [horizontal, vertical], color = blue, thickness = 2, gridlines = true); plot3d(W_plot, r = 0 .. eta, z = 0 .. 1, title = "Velocity Distribution w(r,z)", labels = ["r", "z", "w(r,z)"], style = surfacecontour, shading = zhue, axes = boxed)

w(r, z)*`will now be displayed as`*w

 

1

 

proc (r, z) options operator, arrow; (1/2)*r^2-(1/2)*eta^2 end proc

 

proc (r, z) options operator, arrow; sum(p^n*w[n](r, z), n = 0 .. N) end proc

 

1-p+p*(5+p*(diff(diff(w[1](r, z), r), r))+(r+p*(diff(w[1](r, z), r)))/r-2*r^2-4*p*w[1](r, z)+2*BesselI(0, r)/BesselI(0, 1)-2^(1/2))

 

1 = 0

 

5-2*r^2+2*BesselI(0, r)/BesselI(0, 1)-2^(1/2) = 0

 

0 = 0, 0 = 0

 

(D[1](w[1]))(0, z) = 0, w[1](1, z) = 0

 

`No analytic solution found for order`, 1

 

(1/2)*r^2-1/2

 

(1/2)*r^2-1/2

 

(1/2)*r^2-1/2

 

 

 

NULL


 

Download perbiutation_pde_mprimes_21-7-2025.mw

@Alfred_F 
prove by induction ....


restart;
with(DEtools);
with(plots);
f := (x, y) -> 2*(x - 1)*sin(Pi*y) + (x - 1)^2;
g := (x, y) -> y^2 - y;
lin_sys1 := [diff(u(t), t) = 0, diff(v(t), t) = -v(t)];
lin_sys2 := [diff(u(t), t) = 0, diff(v(t), t) = v(t)];
orig_sys := [diff(x(t), t) = f(x(t), y(t)), diff(y(t), t) = g(x(t), y(t))];
plot_orig1 := DEplot(orig_sys, [x(t), y(t)], t = 0 .. 5, x = 0.5 .. 1.5, y = -0.5 .. 0.5, arrows = SLIM, dirfield = [20, 20], title = "Nonlinear system near (1, 0)", axes = boxed);
plot_orig2 := DEplot(orig_sys, [x(t), y(t)], t = 0 .. 5, x = 0.5 .. 1.5, y = 0.5 .. 1.5, arrows = SLIM, dirfield = [20, 20], title = "Nonlinear system near (1, 1)", axes = boxed);
plot_lin1 := DEplot(lin_sys1, [u(t), v(t)], t = 0 .. 5, u = -0.5 .. 0.5, v = -0.5 .. 0.5, arrows = SLIM, dirfield = [20, 20], title = "Linearized system at (1, 0) → origin (u,v)", axes = boxed);
plot_lin2 := DEplot(lin_sys2, [u(t), v(t)], t = 0 .. 5, u = -0.5 .. 0.5, v = -0.5 .. 0.5, arrows = SLIM, dirfield = [20, 20], title = "Linearized system at (1, 1) → origin (u,v)", axes = boxed);
display([plot_orig1, plot_lin1, plot_orig2, plot_lin2], title = "Comparison: Nonlinear vs. Linearized Systems at Critical Points", insequence = false, layout = [[1, 2], [3, 4]]);


with(LinearAlgebra);
with(DEtools);
with(plots);
fx := (x, y) -> 2*(x - 1)*sin(Pi*y) + (x - 1)^2;
fy := (x, y) -> y^2 - y;
solve({fx(x, y) = 0, fy(x, y) = 0}, {x, y});
J := Matrix(2, 2, [diff(fx(x, y), x), diff(fx(x, y), y), diff(fy(x, y), x), diff(fy(x, y), y)]);
J10 := eval(J, [x = 1, y = 0]);
J11 := eval(J, [x = 1, y = 1]);
print("Jacobiaan bij (1,0):", J10);
print("Jacobiaan bij (1,1):", J11);
sys_uv_10 := {diff(u(t), t) = Pi*v(t), diff(v(t), t) = -v(t)};
sys_uv_11 := {diff(u(t), t) = -Pi*v(t), diff(v(t), t) = v(t)};
field_orig_10 := DEplot([diff(x(t), t) = fx(x(t), y(t)), diff(y(t), t) = fy(x(t), y(t))], [x(t), y(t)], t = 0 .. 5, x = 0.5 .. 1.5, y = -0.5 .. 0.5, dirfield = [20, 20], arrows = SLIM, title = "Niet-lineair systeem rond (1,0)");
field_orig_11 := DEplot([diff(x(t), t) = fx(x(t), y(t)), diff(y(t), t) = fy(x(t), y(t))], [x(t), y(t)], t = 0 .. 5, x = 0.5 .. 1.5, y = 0.5 .. 1.5, dirfield = [20, 20], arrows = SLIM, title = "Niet-lineair systeem rond (1,1)");
field_lin_10 := DEplot([op(sys_uv_10)], [u(t), v(t)], t = 0 .. 5, u = -0.5 .. 0.5, v = -0.5 .. 0.5, dirfield = [20, 20], arrows = SLIM, title = "Linearisatie rond (1,0): u' = πv, v' = -v");
field_lin_11 := DEplot([op(sys_uv_11)], [u(t), v(t)], t = 0 .. 5, u = -0.5 .. 0.5, v = -0.5 .. 0.5, dirfield = [20, 20], arrows = SLIM, title = "Linearisatie rond (1,1): u' = -πv, v' = v");
display([field_orig_10, field_lin_10, field_orig_11, field_lin_11], title = "Origineel versus lineair systeem rond kritieke punten");
1 2 3 4 5 6 Page 1 of 6