janhardo

745 Reputation

12 Badges

11 years, 135 days

MaplePrimes Activity


These are replies submitted by janhardo

@salim-barzani , there is some direction now , but did you succeed in your code to get this reduced pde form (ode)  ?
I did, but  now how to go further ..well it seems there is enough probably to find the right information for me  : handbooks and so on
i do have another solution to your problem try contact : AndreiD.Polyanin or
AlexeiI.Zhurov from Russia they are experts pdes and odes 

 pde

u(x,t) is pde value of U(z) and is plot from a ode , it all revolves about a reduceded pde , to solve this 
How to solve this non lineair complex valued third orde ode , right?

Another second way of defining pde with a table U 

with(PDEtools): 
declare(u(x,t)); 
U := diff_table(u(x,t));
interface(showassumed = 0); 
assume(k > 0);
PDE1 := I*U[t] + U[x,x] + k*abs(U[])^2*U[] = 0;
Sol1 := u(x,t) = C1*exp(I*(C2*x + (k*C1^2 - C2^2)*t + C3));
Test1 := pdetest(Sol1, PDE1); 
Test11 := simplify(evalc(Test1));
Sol2 := u(x,t) = A*sqrt(2/k)*(exp(I*B*x + I*(A^2 - B^2)*t + I*C1))/(cosh(A*x - 2*A*B*t + C2));
Test2 := pdetest(Sol2, PDE1); 
Test21 := simplify(evalc(Test2));# jd complexe getallen

a third way is : direct 

with(PDEtools):(u(x,y));
PDE1:=x*diff(u(x,y),y)-diff(u(x,y),x)=g(x)*u(x,y)^2;
Sol1:=pdsolve(PDE1);

pdetest(Sol1,PDE1);

a fourth way example is with declare 

with(PDEtools): declare(u(x,y)); # hier word declare gebruikt
PDE1:=u(x,y)*diff(u(x,y),y)=diff(u(x,y),x);
sysCh:=charstrip(PDE1,u(x,y)); funcs:=indets(sysCh,Function);
Sol1:=dsolve(sysCh,funcs,explicit);

As notation seems te be handier in this example an note how this is done 
with(PDEtools): with(plots): tr1:=x-c*t=z; tr2:={a=1,b=1,c=1}; # JD traveling wave 
Eq1:=u->diff(u,t)+a*u*diff(u,x)+b*diff(u,x$3)=0;
Eq2:=expand(Eq1(U(lhs(tr1)))); Eq3:=algsubs(tr1,Eq2);
Eq4:=map(convert,Eq3,diff); Eq5:=map(int,lhs(Eq4),z)-C1=0;
Eq6:=expand(Eq5*2*diff(U(z),z)); Eq7:=map(int,Eq6,z);
Eq8:=lhs(Eq7)=C2; Eq9:=subs({C1=0,C2=0},Eq8);
Sol1:=[dsolve(Eq9,U(z))]; Sol11:=subs(_C1=0,simplify(Sol1[2]));
Sol12:=convert(Sol11,sech); Sol2:=eval(subs(z=x-c*t,Sol11),tr2);
convert(Sol2,sech);
animate(plot,[rhs(Sol2),x=-20..20,color=blue],t=0..20,numpoints=100,
frames=50,thickness=2);
pdetest(u(x,t)=rhs(Sol2),subs(tr2,Eq1(u(x,t))));


your pde

Eq1 := u -> (diff(u, t, t) - c^2*diff(u, x, x))*I + diff(U(-t*tau + x)^2*u, t) - lambda*c*diff(U(-t*tau + x)^2*u, x) + 1/2*diff(u, t, x, x) - 1/2*epsilon*c*diff(u, x, x, x) = 0

PDE
ans := pdsolve(PDE)
pdetest(ans, PDE)

Ai says separation of variables is possible in a resulting ODE ?

Have made a few more attempts to make the function T3 work via explore plot, unfortunately not successful yet.
The function T3 is a complex function and should the explore plot be able to show the real part of the function T3 ?   

By induction can this proved ?
no.. thats only for one variabele

this example is a intersection in implicit 2D functions
Add any two implicit function you can think of in the intersections ( )  proc 
let's look how intersections( ) can handle this :-)  

Its about polynome expressions, so all functions as polynomes expressed can be used


 

intersections := proc(P, Q, T, rangeX, rangeY)
    local R, W, w, t, a, b, sol, symbolicAlgcurves, buff, v, eq1, eq2, solplot, points, yvals, xvals, final_solutions, i;

    sol := [];  # List for numerical solutions

    # Gebruik `algcurves` voor expliciete symbolische oplossingen
    with(algcurves):
    symbolicAlgcurves := intersectcurves(P, Q, X, Y);

    if nops(symbolicAlgcurves) > 0 then
        yvals := Y = ~[solve(symbolicAlgcurves[1][2][2], Y)];
        xvals := map2(eval, symbolicAlgcurves[1][2][1], yvals);
        final_solutions := zip((x, y) -> {solve(x, {X})[], y}, xvals, yvals);

        print("Symbolic solutions (explicit notation):");
        for i in final_solutions do
            print(i);
        end do;
    else
        print("No symbolic solutions found.");
    end if;

    # Swap variable depending on T
    if T = Y then
        W := X;
    else
        W := Y;
    end if;

    # Compute resultant to eliminate one variable
    R := resultant(P, Q, T);
    print("Resultant:");
    print(R);

    # Numerical solution for the resultant equation
    w := [fsolve(R, W, rangeX)];  # Solutions for W
    t := [];

    # Solve for the dependent variable
    for v in w do
        t := [op(t), op([fsolve(subs(W = v, P), T, rangeY)])]; # Add solutions to the list
    end do;

    # Validate and store unique solutions
    for a in w do
        for b in t do
            if T = Y then
                buff := abs(subs(X = a, Y = b, P)) + abs(subs(X = a, Y = b, Q));
                if buff < 1/100000000 then
                    if not member([a, b], sol) then
                        sol := [op(sol), [a, b]];
                    end if;
                end if;
            else
                buff := abs(subs(X = b, Y = a, P)) + abs(subs(X = b, Y = a, Q));
                if buff < 1/100000000 then
                    if not member([b, a], sol) then
                        sol := [op(sol), [b, a]];
                    end if;
                end if;
            end if;
        end do;
    end do;

    # Display results
    printf("Number of unique numerical solutions: %a", nops(sol));
    print("");
    print("Numerical solutions:");
    print(sol);

    # Format points for pointplot
    points := [seq([sol[i][1], sol[i][2]], i = 1 .. nops(sol))];

    # Determine dynamic ranges for plotting
    eq1 := plots:-implicitplot(P, X = rangeX, Y = rangeY, color = red, grid = [100, 100]);
    eq2 := plots:-implicitplot(Q, X = rangeX, Y = rangeY, color = blue, grid = [100, 100]);
    solplot := plots:-pointplot(points, symbol = solidcircle, symbolsize = 12, color = black);

    # Combine and display plots
    plots:-display([eq1, eq2, solplot], title = "Intersections of the Curves", scaling = constrained);
end proc:

intersections(Y-X^2 ,Y+(X^2)-1 , X, -2 .. 2, -2 .. 2);

"Symbolic solutions (explicit notation):"

 

{Y = 1/2, {X = -(1/2)*2^(1/2)}, {X = (1/2)*2^(1/2)}}

 

"Resultant:"

 

(-2*Y+1)^2

 

Number of unique numerical solutions: 2

 

""

 

"Numerical solutions:"

 

[[-.7071067812, .5000000000], [.7071067812, .5000000000]]

 

 

intersections(X^2 + Y^2 - 1 , X - Y, X, -2 .. 2, -2 .. 2);

"Symbolic solutions (explicit notation):"

 

{X = (1/2)*2^(1/2), Y = (1/2)*2^(1/2)}

 

{X = -(1/2)*2^(1/2), Y = -(1/2)*2^(1/2)}

 

"Resultant:"

 

2*Y^2-1

 

Number of unique numerical solutions: 2

 

""

 

"Numerical solutions:"

 

[[-.7071067812, -.7071067812], [.7071067812, .7071067812]]

 

 

intersections(Y^2 + X^2-3/2 , (1/4)*X^2 + Y^2 - 1, X, -2 .. 2, -2 .. 2);# rational input

"Symbolic solutions (explicit notation):"

 

{Y = (1/6)*30^(1/2), {X = -(1/3)*6^(1/2)}, {X = (1/3)*6^(1/2)}}

 

{Y = -(1/6)*30^(1/2), {X = -(1/3)*6^(1/2)}, {X = (1/3)*6^(1/2)}}

 

"Resultant:"

 

(1/64)*(6*Y^2-5)^2

 

Number of unique numerical solutions: 4

 

""

 

"Numerical solutions:"

 

[[-.8164965809, -.9128709292], [.8164965809, -.9128709292], [-.8164965809, .9128709292], [.8164965809, .9128709292]]

 

 

 


 

Download snijpunten_van_2d_curves_maple_primesDEF_6-1-2025.mw

 

restart;

with(DEtools):
with(plots):

# Define the direction field with actual arrows
F := fieldplot([-3*x - 4*y, 2*x + y],
               x = -4..4,
               y = -4..4,
               arrows = slim,  # Use arrows in the field
               grid = [10, 10]):  # Grid density

# Generate the solution curves
S := DEplot(
    [diff(x(t), t) = -3*x(t) - 4*y(t), diff(y(t), t) = 2*x(t) + y(t)],
    [x(t), y(t)],
    t = 0..10,
    x = -4..4,
    y = -4..4,
    'labels' = [x(t), y(t)],
    'axes' = 'boxed',
    'arrows' = 'none'
):

# Combine the field and the solutions in one plot
display(F, S);

"maple.ini in users"

 

 
 

 

Download de_plot_met_minder_pijlen_mapl_eprimes5-1-2024.mw

ode : Ordinary Differential Equation
pde : Partial differential Equation 

@salim-barzani 

Outline here , how you think you will find a function as a solution of the pde that will satisfy the ode test?

I have a variant of this : 4 dogs starting on the vertices of a square.
The dogs also chase each other and have maple code of it and a differential equation was constructed from this, with a plot of the dogs' trajectories
This seems like an analogous example to me ?..no my example is 2D and this spatial 

sirmodel_met_explore_mogelijk.mw

In 2000 when  start to study for B Ed math for secondary education , i choosed this Sir model  as a assigment to work on.
Note: this example of the sir model is not made by me  

It has not been wise of the member to comply not with the friendly request to stop deleting done questions, but simply join a previously done question or come up with an entirely new question separate from the existing one and post it.

Then there would have been nothing wrong and he could have asked any question, provided the proper procedure is followed.
Now again, why has the member's last post been deleted ? , that does not become clear now... Were there several questions under one posted question ?

Yes, duplicate questions , that is a problem, but well had the member complied with request not to delete done questions again, then duplicate questions could have started being asked by him again and that is a danger if you start asking a lot of questions and would need moderation again .

First 21 22 23 24 25 26 27 Last Page 23 of 78