janhardo

700 Reputation

12 Badges

11 years, 42 days

MaplePrimes Activity


These are replies submitted by janhardo

@salim-barzani 

restart;
with(plots):

a := 1;
b := 2;

# Lump posities
x1 := -40; y1 := -1/3*x1 - sqrt(30)/6;
x2 := 0;   y2 := -1/3*x2 - sqrt(30)/6;
x3 := 40;  y3 := -1/3*x3 - sqrt(30)/6;

# Bewegingslijn
eq := y = -1/3*x - sqrt(30)/6;

# Lump soliton functie
U := (x, y, a, b) -> 12*(-b^4*y^2 + (a*y + x)^2*b^2 - 3*a^2) /
                     (b^4*y^2 + (a*y + x)^2*b^2 + 3*a^2)^2;

# Drie afzonderlijke contourplots voor elke lump, elk met een andere kleur
contour1 := contourplot(U(x - x1, y - y1, a, b), x = -50 .. 50, y = -30 .. 30,
                        contours = 30, color = red, grid = [100, 100], transparency = 0.1):

contour2 := contourplot(U(x - x2, y - y2, a, b), x = -50 .. 50, y = -30 .. 30,
                        contours = 30, color = blue, grid = [100, 100], transparency = 0.1):

contour3 := contourplot(U(x - x3, y - y3, a, b), x = -50 .. 50, y = -30 .. 30,
                        contours = 30, color = green, grid = [100, 100], transparency = 0.1):

# Bewegingslijn
trajectory_plot := implicitplot(eq, x = -50 .. 50, y = -30 .. 30, color = black, thickness = 2):

# Alles samenvoegen
display(contour1, contour2, contour3, trajectory_plot,
        title = "3-Lump Soliton met Bewegings Trajectorie",
        labels = ["x", "y"], scaling = constrained, size = [1200, 800]);

1

 

2

 

-40

 

40/3-(1/6)*30^(1/2)

 

0

 

-(1/6)*30^(1/2)

 

40

 

-40/3-(1/6)*30^(1/2)

 

y = -(1/3)*x-(1/6)*30^(1/2)

 

proc (x, y, a, b) options operator, arrow; 12*(-b^4*y^2+(a*y+x)^2*b^2-3*a^2)/(b^4*y^2+(a*y+x)^2*b^2+3*a^2)^2 end proc

 

 

restart;
with(plots):

a := 1;
b := 2;

# Lump posities
x1 := -40; y1 := -1/3*x1 - sqrt(30)/6;
x2 := 0;   y2 := -1/3*x2 - sqrt(30)/6;
x3 := 40;  y3 := -1/3*x3 - sqrt(30)/6;

# Bewegingslijn
eq := y = -1/3*x - sqrt(30)/6;

# Lump soliton functie
U := (x, y, a, b) -> 12*(-b^4*y^2 + (a*y + x)^2*b^2 - 3*a^2) /
                     (b^4*y^2 + (a*y + x)^2*b^2 + 3*a^2)^2;

# Drie afzonderlijke contourplots voor elke lump
contour1 := contourplot(U(x - x1, y - y1, a, b), x = -50 .. 50, y = -30 .. 30,
                        contours = 50, color = red, grid = [100, 100], transparency = 0.2):
contour2 := contourplot(U(x - x2, y - y2, a, b), x = -50 .. 50, y = -30 .. 30,
                        contours = 50, color = blue, grid = [100, 100], transparency = 0.2):
contour3 := contourplot(U(x - x3, y - y3, a, b), x = -50 .. 50, y = -30 .. 30,
                        contours = 50, color = green, grid = [100, 100], transparency = 0.2):

# Bewegingslijn
trajectory_plot := implicitplot(eq, x = -50 .. 50, y = -30 .. 30, color = black, thickness = 2):

# Alles samenvoegen
display(contour1, contour2, contour3, trajectory_plot,
        title = "3-Lump Soliton met Bewegings Trajectorie",
        labels = ["x", "y"], scaling = constrained, size = [1200, 800]);

1

 

2

 

-40

 

40/3-(1/6)*30^(1/2)

 

0

 

-(1/6)*30^(1/2)

 

40

 

-40/3-(1/6)*30^(1/2)

 

y = -(1/3)*x-(1/6)*30^(1/2)

 

proc (x, y, a, b) options operator, arrow; 12*(-b^4*y^2+(a*y+x)^2*b^2-3*a^2)/(b^4*y^2+(a*y+x)^2*b^2+3*a^2)^2 end proc

 

 

restart;
with(plots):

a := 1;
b := 2;

# Lump posities
x1 := -40; y1 := -1/3*x1 - sqrt(30)/6;
x2 := 0;   y2 := -1/3*x2 - sqrt(30)/6;
x3 := 40;  y3 := -1/3*x3 - sqrt(30)/6;

# Bewegingslijn
eq := y = -1/3*x - sqrt(30)/6;

# Lump soliton functie
U := (x, y, a, b) -> 12*(-b^4*y^2 + (a*y + x)^2*b^2 - 3*a^2) /
                     (b^4*y^2 + (a*y + x)^2*b^2 + 3*a^2)^2;

# Superpositie van alle drie lumps in ÉÉN enkele functie
U_total := (x, y) -> U(x - x1, y - y1, a, b) +
                     U(x - x2, y - y2, a, b) +
                     U(x - x3, y - y3, a, b);

# Contourplot met een aangepaste kleurenfunctie voor onderscheid
contour_lumps := contourplot(U_total(x, y),
    x = -50 .. 50, y = -30 .. 30, contours = 50,
    coloring = [red, blue, green], grid = [100, 100],
    filled = true, size = [1200, 800]
):

# Bewegingslijn toevoegen
trajectory_plot := implicitplot(eq, x = -50 .. 50, y = -30 .. 30,
                                color = black, thickness = 2):

# Weergeven van de volledige plot
display(contour_lumps, trajectory_plot,
        title = "3-Lump Soliton met Bewegings Trajectorie",
        labels = ["x", "y"], scaling = constrained, size = [1200, 800]);

1

 

2

 

-40

 

40/3-(1/6)*30^(1/2)

 

0

 

-(1/6)*30^(1/2)

 

40

 

-40/3-(1/6)*30^(1/2)

 

y = -(1/3)*x-(1/6)*30^(1/2)

 

proc (x, y, a, b) options operator, arrow; 12*(-b^4*y^2+(a*y+x)^2*b^2-3*a^2)/(b^4*y^2+(a*y+x)^2*b^2+3*a^2)^2 end proc

 

proc (x, y) options operator, arrow; U(x-x1, y-y1, a, b)+U(x-x2, y-y2, a, b)+U(x-x3, y-y3, a, b) end proc

 

 

restart;

 


 

Download 3_1_d_lumps_samen_getekend-23-2-2025_part_B_mprimes_.mw

@salim-barzani 
I made some lump plots, but with the colered ones ,it seems that the lumps are not equal .. lol


 

restart;
with(plots):

 

a := 1;
b := 2;

# Lump posities overgenomen uit de afbeelding
x1 := -40; y1 := -1/3*x1 - sqrt(30)/6;
x2 := 0;   y2 := -1/3*x2 - sqrt(30)/6;
x3 := 40;  y3 := -1/3*x3 - sqrt(30)/6;

# Bewegingslijn
eq := y = -1/3*x - sqrt(30)/6;

# Lump soliton functie
U := (x, y, a, b) -> 12*(-b^4*y^2 + (a*y + x)^2*b^2 - 3*a^2) /
                     (b^4*y^2 + (a*y + x)^2*b^2 + 3*a^2)^2;

# Contour plot met alle drie lumps en verschillende kleuren
contour_lumps := contourplot(
    U(x - x1, y - y1, a, b) + U(x - x2, y - y2, a, b) + U(x - x3, y - y3, a, b),
    x = -50 .. 50, y = -30 .. 30, contours = 230,
    coloring = [red, blue, green], grid = [100, 100], size = [1200, 800]
):

# Bewegingslijn
trajectory_plot := implicitplot(eq, x = -50 .. 50, y = -30 .. 30, color = blue, thickness = 2):

# Toon alles in één enkele grote plot
display(contour_lumps, trajectory_plot,
        title = "3-Lump Soliton met Bewegings Trajectorie", labels = ["x", "y"], scaling = constrained, size = [1200, 800]);

1

 

2

 

-40

 

40/3-(1/6)*30^(1/2)

 

0

 

-(1/6)*30^(1/2)

 

40

 

-40/3-(1/6)*30^(1/2)

 

y = -(1/3)*x-(1/6)*30^(1/2)

 

proc (x, y, a, b) options operator, arrow; 12*(-b^4*y^2+(a*y+x)^2*b^2-3*a^2)/(b^4*y^2+(a*y+x)^2*b^2+3*a^2)^2 end proc

 

 

a := 1;
b := 2;

# Lump posities correct overgenomen uit de afbeelding
x1 := -40; y1 := -1/3*x1 - sqrt(30)/6;
x2 := 0;   y2 := -1/3*x2 - sqrt(30)/6;
x3 := 40;  y3 := -1/3*x3 - sqrt(30)/6;

# Bewegingslijn
eq := y = -1/3*x - sqrt(30)/6;

# Lump soliton functie
U := (x, y, a, b) -> 12*(-b^4*y^2 + (a*y + x)^2*b^2 - 3*a^2) /
                     (b^4*y^2 + (a*y + x)^2*b^2 + 3*a^2)^2;

# Contour plots met verschillende kleuren per lump
contour_1 := contourplot(U(x - x1, y - y1, a, b), x = -50 .. 50, y = -30 .. 30,
                          contours = 200, coloring = [red, white, blue], grid = [100, 100]):

contour_2 := contourplot(U(x - x2, y - y2, a, b), x = -50 .. 50, y = -30 .. 30,
                          contours = 200, coloring = [green, white, purple], grid = [100, 100]):

contour_3 := contourplot(U(x - x3, y - y3, a, b), x = -50 .. 50, y = -30 .. 30,
                          contours = 200, coloring = [cyan, white, orange], grid = [100, 100]):

# Bewegingslijn
trajectory_plot := implicitplot(eq, x = -50 .. 50, y = -30 .. 30, color = black, thickness = 4):

# Alles samenvoegen in één enkele grote plot
display(contour_1, contour_2, contour_3, trajectory_plot,
        title = "3-Lump Soliton met Bewegings Trajectorie", labels = ["x", "y"], scaling = constrained. size = [1000, 600]);

1

 

2

 

-40

 

40/3-(1/6)*30^(1/2)

 

0

 

-(1/6)*30^(1/2)

 

40

 

-40/3-(1/6)*30^(1/2)

 

y = -(1/3)*x-(1/6)*30^(1/2)

 

proc (x, y, a, b) options operator, arrow; 12*(-b^4*y^2+(a*y+x)^2*b^2-3*a^2)/(b^4*y^2+(a*y+x)^2*b^2+3*a^2)^2 end proc

 

 

 

 


 

Download 3_1_d_lumps_samen_getekend-23-2-2025_mprimes_.mw

 

@salim-barzani 

 

restart;
with(plots):

# Definieer de lump-oplossing (gecorrigeerde haakjes)
U := (x, y, a, b) -> 12*(-b^4*y^2 + (a*y + x)^2*b^2 - 3*a^2) / ((b^4*y^2 + (a*y + x)^2*b^2 + 3*a^2)^2);

# Kies parameters (bijv. a = 1, b = 1)
a := 1:
b := 1:

# Plot de lump
lump_plot := plot3d(U(x, y, a, b), x = -5..5, y = -5..5, axes = framed, style = surfacecontour):

# Plot de rechte baan x + a*y = 0 als een 3D-lijn
pathline_plot := spacecurve([-a*y, y, 0], y = -5..5, color = red, thickness = 3):

# Combineer beide plots
display({lump_plot, pathline_plot});

proc (x, y, a, b) options operator, arrow; 12*(-b^4*y^2+(a*y+x)^2*b^2-3*a^2)/(b^4*y^2+(a*y+x)^2*b^2+3*a^2)^2 end proc

 

 

 


 

Download 1_d_lump_getekend_met_bewegindslijn23-2-2025mprimes_.mw

@salim-barzani 
I dealt with your first lump pdf example and haven't looked at the other lump examples yet. 
Don't know what the urgency is for your calculations?
Maybe you can do something with it, as physically you have more knowledge of it than me.
When I look at the later examples of pdf lumps you have given they are all lumps moving on a straight line
Maybe these examples have even better information ?

@salim-barzani 
I stay at this example all the time : Question How find line for plotting ?   i 
I do not separate my code ,its all related to this example 
Now i found a trajectory for the pdf example  1-lumps and probably for the other lumps too, because they are all straight lines


 

@salim-barzani 
i stay at this lump example This question is related to the Question How find line for plotting ?   i 
 

The former derivation of y (x) =-x /a  is for another physical situation for the 1 -lump and is not there to find in the presented pdf example of the 1 lump 
This is the trajectory equation for the 1 lump example 
For every 1 lump  :

For every lump number i jyou get always a straight  trajectory 


 

restart;
declare(x, y, t, alpha, beta, a, b, C);

# Step 1: Explicitly define the correct KP transformations
Xc := simplify((x - alpha*beta*t/(alpha^2 + b^2)));
Yc := simplify((y + beta*x/(alpha^2 + b^2)));

# Step 2: Directly apply the correct KP-theory condition for the peak:
eq_traj := simplify(Yc = C);

# Step 3: Solve explicitly for y
traj_solution := solve(eq_traj, y);

# Expected KP trajectory (directly defined):
expected_traj := -beta/(alpha^2 + b^2)*x + C;

# Compute the difference between both expressions:
difference := simplify(traj_solution - expected_traj);

# Display results:
printf("Derived trajectory equation:\n");
traj_solution;
printf("Expected KP-theory trajectory equation:\n");
expected_traj;
printf("Difference between both expressions (should be 0):\n");
difference;

declare(x, y, t, alpha, beta, a, b, C)

 

x-alpha*beta*t/(alpha^2+b^2)

 

y+beta*x/(alpha^2+b^2)

 

y+beta*x/(alpha^2+b^2) = C

 

(C*alpha^2+C*b^2-beta*x)/(alpha^2+b^2)

 

C-beta*x/(alpha^2+b^2)

 

0

 

Derived trajectory equation:

 

(C*alpha^2+C*b^2-beta*x)/(alpha^2+b^2)

 

Expected KP-theory trajectory equation:

 

C-beta*x/(alpha^2+b^2)

 

Difference between both expressions (should be 0):

 

0

(1)

 


 

Download 1_lump_tractory_derived_23-2-2025_mprmes.mw






 

I don't know which lump example your code belongs for ? 
but try posting it to your earlier question if this is the case.
Now I have to go back and look at your lump examples again

The lump trajectory follows the peak of the lump.

@salim-barzani 
For this type of lump soliton b= 0 ( can be derived )
The solution for the trajectory function of the lumps... 
 

restart;
with(PDEtools):

# Define the denominator N as an expression in x and y
N := (b^4*y^2 + (a*y + x)^2*b^2 + 3*a^2)^2;

# Compute partial derivatives treating y as a variable
Nx := diff(N, x):
Ny := diff(N, y):

# Substitute y -> y(x) and form the implicit ODE
diff_eq := eval(Nx, y = y(x)) + eval(Ny, y = y(x)) * diff(y(x), x) = 0:

# Solve for dy/dx explicitly before setting b = 0
dy_dx := solve(diff_eq, diff(y(x), x));

# Now, substitute b = 0 AFTER solving for dy/dx
dy_dx_real := subs(b = 0, dy_dx);

# Solve the ODE explicitly for y(x)
explicit_solution := dsolve({diff(y(x), x) = dy_dx_real, y(0) = 0}, y(x));

# Ensure final simplification
explicit_solution := simplify(explicit_solution);

# Print final real-valued solution
printf("Final real-valued explicit solution for y(x) with b = 0:\n");
explicit_solution;

It is not that difficult:
All questions on a particular pde/topic should stay together in one question.on the forum.
Use the sections in Maple to organise and store your own questions and keep track of them and add your own study prompts.
Ctrl + period ( windows) on the computer keyboard creates a section in the worksheet and subsections can also be created.
Organise your questions to keep track of them.

Note: May be the moderator has collected all your questions by date and can determine exactly if your new question does not appear in his list ...

@salim-barzani yes, you could delete this question of yours, my contribution is minimal and have no problem with it if you want to delete this question and repost it , but now with a more comprehensive question statement 

@salim-barzani I understand that you would like to see the formulas in the information pdfs, but I can't do that easily yet
Now you basically just have to calculate through to a final result and try to get it in the desired format via formula massage 
 

# Step 1: Definieer x' en y' as symbols with backticks
`x'`, `y'`;

This if you want to try to follow the same notation

@salim-barzani 

 

# Stap 1: Definieer theta_i en B[12]
theta[1] := x + l[1]*y - (alpha + beta/l[1])*t;
theta[2] := x + l[2]*y - (alpha + beta/l[2])*t;
B[12] := (6*l[1]*l[2]*(l[1] + l[2])) / (beta*(l[1] - l[2])^2);

# Stap 2: Definieer f[2]
f[2] := theta[1]*theta[2] + B[12];

# Stap 3: Definieer l[1] = a + I*b en l[2] = conjugate(l[1])
l[1] := a + I*b;          # Eerst l[1] definiëren
l[2] := conjugate(l[1]);  # Daarna l[2] als complexe conjugaat

# Stap 4: Vereenvoudig f[2] met aannames
f[2] := simplify(f[2]) assuming a::real, b::real, alpha::real, beta::real;

# Stap 5: Definieer x' en y'
x_prime := x - (alpha*a^2 + 2*beta*a + a*b^2)/(a^2 + b^2)*t;
y_prime := y + beta/(a^2 + b^2)*t;

# Stap 6: Herschrijf f[2] (Formule 11)
f_herschreven := expand((x_prime + a*y_prime)^2 + (b*y_prime)^2 - 3*a*(a^2 + b^2)/(beta*b^2));

# Stap 7: Bereken u (Formule 12)
u := -4*(x_prime + a*y_prime) / ((x_prime + a*y_prime)^2 + (b*y_prime)^2 - 3*a*(a^2 + b^2)/(beta*b^2));


This seems to be not correct ? , must be this 
to derive the 


# Step 1: Define the velocity components v_x and v_y
v_x := (a*alpha^2 + 2*beta*a + a*b^2)/(a^2 + b^2);
v_y := -beta/(a^2 + b^2);

# Step 2: Eliminate time t from x(t) = x0 + v_x t and y(t) = y0 + v_y t
t := (x - x0)/v_x;  # Solve for t from x(t)
y := y0 + v_y * t;  # Substitute t into y(t)

# Step 3: Simplify the equation for y(x)
y := simplify(y) assuming a::real, b::real, beta::real, a^2 + b^2 > 0;

# Step 4: Determine the starting point (x0, y0) via the minimum of the denominator of u(x,y,t)
# The denominator is minimal when x' + a y' = 0 and y' = 0 (center of the lump)
x0 := -sqrt(-3*a*(a^2 + b^2)/(beta*b^2));  # From the term under the square root
y0 := 0;

# Step 5: Substitute x0 and y0 into y(x)
propagation_line := y = -beta/(a*(a^2 + 2*beta + b^2)) * (x + sqrt(-3*a*(a^2 + b^2)/(beta*b)));

# Step 6: Simplify and display the result
propagation_line := simplify(propagation_line) assuming a::real, b::real, beta::real, a/beta < 0;

@salim-barzani  To me, it was quite clear in the initial question you asked, that you start with the simplest case first : the 1-lump soliton. 
Was quite clear that you always start with the simplest case that is a rule. ( from easy to difficult )
Which already raises enough questions.
Perhaps you thought to make it simpler that way and only now come up with the 1-lump information?
No, you got this wrong.

Thought I had already calculated this the evolutionary course of 3 solitons waves in that deleted worksheet.
This is a straight line this trajectory of motion of the 3 lump solitons and what should it take for the 3 solitons to follow a non-straight line?

@salim-barzani

This is indeed a- social to delete my response because you think this is not correct answer. 
I gave an image with a link to a maple file for information, so minimal. 
 That 1st question was asked clearly enough by you and you could have added own code yourself later as an update and an information update below it. 
Your own input is also minimal by copying some code from the pdf and itself fails to really clearly describe what you want to solve and remains vague. 
Do you expect there to be physicists here who can solve your issues just like that with Maple?

First 12 13 14 15 16 17 18 Last Page 14 of 73