janhardo

545 Reputation

11 Badges

10 years, 306 days

MaplePrimes Activity


These are replies submitted by janhardo

@salim-barzani 

I can give you my e-mail address , which in itself is not a problem

Have no expectation that I will have your solutions to your issues soon , probably never ?

It's just my interest in the pde equations and applications.

@salim-barzani 
What country do you live , why is deepseek not suported there?
Finding the auxilary function seems to be  similar to finding a sequence development for an function solotion for a ode ?

@acer 
Thanks, probably there something wrong under the hood of the forum code for maple Primes...

deepseek ai is free for now : good ..did you tried it ?
DeepSeek - Into the Unknown

@salim-barzani 

The code for the bilinear procedure is quite complicated to create and was not done by me.

The operation is clearly analysable using ai though.

I'm just brushing up on the bilinear form if it exists for a pde ..what can be done with it ?

Did find another package : PDEBellII A Maple package for finding bilinear forms, bilinear Bäcklund transformations, Lax pairs and conservation laws of the KdV-type equations

This is then specifically for KdV pde

If you show the problem here, maybe someone else can help too

@salim-barzani 
using the bilinear form for this type pde  , for parameters A,A1,etc  and given ansatz 
note : the bilinear procedure accept no integrals in the pde expression in general, but it can be tricked 

restart:
with(PDEtools):

# Zorg dat f als functie wordt herkend
declare(f(x,y,z,t), 'function'):

# �� Hoofdroutine: controleer of een f(x,y,z,t) voldoet aan Hirota-bilineaire vorm
CheckHirotaForm := proc(f_expr::algebraic, vars::list)
    description "Onderzoekt of een functie f(x,y,z,t) voldoet aan de Hirota-bilineaire PDE";

    local x, y, z, t, f;
    local A, B, A1, B1, C1;
    local D_op, Dff, BilinearPDE, Result;

    # Variabelen extraheren
    (x, y, z, t) := op(vars):

    # Zet expressie om naar functionele vorm
    f := unapply(f_expr, x, y, z, t):

    # Stel Hirota-operator op voor f*f
    D_op := A*convert(Diff(f(x,y,z,t)*f(x,y,z,t), x,x,x,x), D) +
            A1*convert(Diff(f(x,y,z,t)*f(x,y,z,t), x, y), D) +
            B1*convert(Diff(f(x,y,z,t)*f(x,y,z,t), x, z), D) +
            C1*convert(Diff(f(x,y,z,t)*f(x,y,z,t), t, x), D) +
            convert(Diff(f(x,y,z,t)*f(x,y,z,t), t, t), D) +
            convert(Diff(f(x,y,z,t)*f(x,y,z,t), x, x), D):

    # Stel volledige Hirota PDE op
    BilinearPDE := convert(Diff(3*A*D_op / (B*f(x,y,z,t)^2), x$2), D):

    # Vereenvoudig resultaat
    Result := simplify(BilinearPDE):

    # Toon uitkomst
    print("Bilineaire vergelijking na substitutie:");
    print(Result);

    # Controleer of nul
    if Result = 0 then
        print(" Geldige oplossingsfunctie!");
    else
        print(" Niet een exacte oplossing.");
    end if;

    return Result;
end proc:

# Subprocedure: test klassieke 1-soliton oplossing
Test1Soliton := proc()
    description "Genereert en test een klassieke 1-soliton-ansatz";

    local f_expr;

    # Stel 1-soliton-ansatz op
    f_expr := 1 + exp(k*x + l*y + m*z + omega*t + delta):

    print("➡️ Test van 1-soliton functie: f(x,y,z,t) = 1 + exp(kx + ly + mz + ωt + δ):");
    return CheckHirotaForm(f_expr, [x, y, z, t]);
end proc:

# Gebruik:
# Test1Soliton();

f(x, y, z, t)*`will now be displayed as`*f

(1)

# Stel waarden in voor de parameters (optioneel symbolisch of numeriek)
A := 1: B := 6:
A1 := 0: B1 := 0: C1 := 0:

# Voer de test uit
Test1Soliton();

"➡️ Test van 1-soliton functie: f(x,y,z,t) = 1 + exp(kx + ly + mz + ωt + δ):"

 

"Bilineaire vergelijking na substitutie:"

 

6*A*(4*(7*k^4*A+k^2+(A1*l+B1*m+C1*omega)*k+omega^2)*exp(2*k*x+2*l*y+2*m*z+2*omega*t+2*delta)+3*(-5*k^4*A-k^2+(-A1*l-B1*m-C1*omega)*k-omega^2)*exp(3*k*x+3*l*y+3*m*z+3*omega*t+3*delta)+(k^4*A+k^2+(A1*l+B1*m+C1*omega)*k+omega^2)*exp(k*x+l*y+m*z+omega*t+delta))*k^2/(B*(1+exp(k*x+l*y+m*z+omega*t+delta))^4)

 

"❌ Niet een exacte oplossing."

 

6*A*(4*(7*k^4*A+k^2+(A1*l+B1*m+C1*omega)*k+omega^2)*exp(2*k*x+2*l*y+2*m*z+2*omega*t+2*delta)+3*(-5*k^4*A-k^2+(-A1*l-B1*m-C1*omega)*k-omega^2)*exp(3*k*x+3*l*y+3*m*z+3*omega*t+3*delta)+(k^4*A+k^2+(A1*l+B1*m+C1*omega)*k+omega^2)*exp(k*x+l*y+m*z+omega*t+delta))*k^2/(B*(1+exp(k*x+l*y+m*z+omega*t+delta))^4)

(2)
 

 

Download CheckHirotaForm_16-4-2025mprimes.mw

@Aixleft math , i did not used the book ...
 

with(plots):
with(plottools):
with(Student[Calculus1]):

# Define the 1-soliton solution
u := (x, t, k, delta) -> (k^2/2)*sech(1/2*(k*x - k^3*t + delta))^2:

# Interactive plot with sliders for t, k, delta
interactive_plot := Explore(
    plot(u(x, t, k, delta), x = -10 .. 10, color = blue, thickness = 2, axes = boxed, labels = ["x", "u(x,t)"]),
    t = -5 .. 5,
    k = 0.5 .. 3,
    delta = -5 .. 5
);

(1)

this is a one dimensional pde:   1+1 ( KdV) , shows de soliton wave keeps his  form
The  1-soliton is derived from the procedure Bilinear
  

Download interactiev_soliton_plot_-kdv.mw

@dharr , The ellipse definitely has 3 Blaschke pairs of points and has more even, so fsolve cannot draw them all.
I was also trying to find something for the ellipse and circle and yet other curves , so that the code draws at least 3 pairs of points and satisfies the Blaschke theorem

 

@vv , Yes, I was planning to, but was distracted with something else
Coming up...


 

BlaschkeAnalyse := proc(xfun, yfun, tinterval := 0..2*Pi, naam := "Curve", kleur := blue, nulsplits := 3)
local dx, dy, ddx, ddy, kappa, f, i, sol, t1, t2, x1, y1, x2, y2, k1, k2,
      curveplot, tangent_plot, tangents, points, labels, table, solutions, L, norm, vx0, vy0, x0, y0, r, p;

  uses plots, plottools ;
  
  print("�� Analysis of ", naam);

  # Derivatives
  dx := unapply(diff(xfun(t), t), t):
  dy := unapply(diff(yfun(t), t), t):
  ddx := unapply(diff(dx(t), t), t):
  ddy := unapply(diff(dy(t), t), t):

  # Curvature
  kappa := t -> abs(dx(t)*ddy(t) - dy(t)*ddx(t)) / ((dx(t)^2 + dy(t)^2)^(3/2)):

  # Plot the curve
  curveplot := plot([xfun(t), yfun(t), t = tinterval], color = kleur, thickness=2, labels = ["x", "y"]):

  # Difference function f(t) = kappa(t) - kappa(t+Pi)
  f := t -> evalf(kappa(t) - kappa(t + Pi)):

  # Search for roots numerically in split intervals
  solutions := []:
  for i from 0 to nulsplits-1 do
    sol := fsolve(f(t) = 0, t = op(1, tinterval) + i*Pi/nulsplits + 0.01 .. op(1, tinterval) + (i+1)*Pi/nulsplits - 0.01):
    if type(sol, numeric) then
      solutions := [op(solutions), sol]:
    end if;
  end do:

  print(" Blaschke pairs found: ", nops(solutions));

  # Visualization elements
  tangents := []:
  points := []:
  labels := []:
  table := []:
  L := 3:

  tangent_plot := proc(t0)
    x0 := evalf(xfun(t0)):
    y0 := evalf(yfun(t0)):
    vx0 := evalf(dx(t0)):
    vy0 := evalf(dy(t0)):
    norm := sqrt(vx0^2 + vy0^2):
    vx0 := vx0 / norm:
    vy0 := vy0 / norm:
    return line([x0 - L*vx0, y0 - L*vy0], [x0 + L*vx0, y0 + L*vy0], color=red, thickness=2):
  end proc:

  for i from 1 to nops(solutions) do
    t1 := evalf(solutions[i]):
    t2 := evalf(t1 + Pi):
    x1 := evalf(xfun(t1)):
    y1 := evalf(yfun(t1)):
    x2 := evalf(xfun(t2)):
    y2 := evalf(yfun(t2)):
    k1 := evalf(kappa(t1)):
    k2 := evalf(kappa(t2)):

    # Tangents
    tangents := [op(tangents), tangent_plot(t1), tangent_plot(t2)]:

    # Points
    points := [op(points),
      pointplot([[x1, y1]], symbol=solidcircle, symbolsize=14, color=red),
      pointplot([[x2, y2]], symbol=solidcircle, symbolsize=14, color=red)
    ]:

    # Labels
    labels := [op(labels),
      textplot([[x1, y1, cat("P", i)]], font=[Times, Bold, 14], align=above, color=red),
      textplot([[x2, y2, cat("P", i, "'")]], font=[Times, Bold, 14], align=above, color=red)
    ]:

    # Table rows
    table := [op(table),
      sprintf("P%d:    t = %.4f   (x,y) = (%.4f, %.4f)   κ = %.4f", i, t1, x1, y1, k1),
      sprintf("P%d':   t = %.4f   (x,y) = (%.4f, %.4f)   κ = %.4f", i, t2, x2, y2, k2),
      "------------------------------------------------------------"
    ]:
  end do:

  # Display table
  print("�� Table of Blaschke pairs:");
  for r in table do
    print(r);
  end do:

  # Show everything
  return display([curveplot, op(tangents), op(points), op(labels)], scaling=constrained,
    title=cat("Blaschke Analysis of ", naam));

end proc:

# Voorbeeldgebruik: superellips
sgn := t -> piecewise(t < 0, -1, t = 0, 0, 1):
a := 3: b := 2: n := 2.5:
x := t -> a * sgn(cos(t)) * abs(cos(t))^n:
y := t -> b * sgn(sin(t)) * abs(sin(t))^n:

BlaschkeAnalyse(x, y, 0..2*Pi, naam="Superellips (n=2.5)", magenta);

"?? Analysis of ", naam = "Superellips (n=2.5)"

 

"✅ Blaschke pairs found: ", 3

 

"?? Table of Blaschke pairs:"

 

"P1:    t = 0.0100   (x,y) = (2.9996, 0.0000)   &kappa; = 44.1575"

 

"P1':   t = 3.1516   (x,y) = (-2.9996, -0.0000)   &kappa; = 44.1575"

 

"------------------------------------------------------------"

 

"P2:    t = 1.0572   (x,y) = (0.5076, 1.4160)   &kappa; = 0.1928"

 

"P2':   t = 4.1988   (x,y) = (-0.5076, -1.4160)   &kappa; = 0.1928"

 

"------------------------------------------------------------"

 

"P3:    t = 2.1044   (x,y) = (-0.5535, 1.3757)   &kappa; = 0.1823"

 

"P3':   t = 5.2460   (x,y) = (0.5535, -1.3757)   &kappa; = 0.1823"

 

"------------------------------------------------------------"

 

 

BlaschkeAnalyse(
    t -> 5*cos(t),
    t -> (5 + sin(6*t))*sin(t),
    0..2*Pi,
    "Voorbeeldkromme",
    blue,
    3
);

"?? Analysis of ", "Voorbeeldkromme"

 

"✅ Blaschke pairs found: ", 3

 

"?? Table of Blaschke pairs:"

 

"P1:    t = 0.0100   (x,y) = (4.9998, 0.0506)   &kappa; = 0.1863"

 

"P1':   t = 3.1516   (x,y) = (-4.9998, -0.0506)   &kappa; = 0.1863"

 

"------------------------------------------------------------"

 

"P2:    t = 1.0572   (x,y) = (2.4566, 4.4071)   &kappa; = 0.0298"

 

"P2':   t = 4.1988   (x,y) = (-2.4566, -4.4071)   &kappa; = 0.0298"

 

"------------------------------------------------------------"

 

"P3:    t = 2.1044   (x,y) = (-2.5432, 4.3565)   &kappa; = 0.3668"

 

"P3':   t = 5.2460   (x,y) = (2.5432, -4.3565)   &kappa; = 0.3668"

 

"------------------------------------------------------------"

 

 

 


 

Download 6-4-2025mprimes_proc_blaschke_vaag_alfred_engelse_versie.mw

@vv , its the same , but on different points 

Is not a ellips exactly , as you can see


This one made with a procedure, but need some more details
Its numeric, not symbolic ( problematic ?) 

I am using the SEIRTP model as example
This SEIRPT  model for the 2 parameters is ( must be) now the same as the SIR model example found on the maple website ?( depends on coupled ODE and parameter values)

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