janhardo

690 Reputation

12 Badges

11 years, 36 days

MaplePrimes Activity


These are replies submitted by janhardo

@salim-barzani 
This must be added in the two procedures , in the right way, because the list  is different 

# Define the list L
L := [a, b, c, d, e]; # Adjust this list as desired

# Display the entire list
#print("The list L is:", L);

# Display each element individually with the name A[i]
for i from 1 to nops(L) do
    A[i-1] := L[i];
    #print(A[i-1]);
end do;

Here are two procedures different programmed  to calculate a adomian polynome for one variable 

AP1 := proc(f, M)
    local F, i, A, u, s, expr, k;
    
    # Initialize F[0]
    F[0] := f(add(u[k] * s^k, k = 0 .. M));
    
    # Loop to define A[i] and update F[i+1]
    for i from 0 to M do
        A[i] := expand((1/factorial(i)) * subs(s = 0, F[i]));
        F[i+1] := diff(F[i], s);
    end do;
    
    # Return the list of A[i]
    [seq(A[i], i = 0 .. M)]
end proc:
 

# Define f as an anonymous function (Maple uses arrow syntax for functions)
f := x -> x^2;

# Execute the procedure with f and M = 3
result := AP1(f, 3);

proc (x) options operator, arrow; x^2 end proc

 

[u[0]^2, 2*u[0]*u[1], 2*u[0]*u[2]+u[1]^2, 2*u[0]*u[3]+2*u[1]*u[2]]

(1)

# Define the function f(x) = exp(x^2)
f1 := x -> exp(x^2);

proc (x) options operator, arrow; exp(x^2) end proc

(2)

# Execute the procedure with f1 and M = 3
result := AP1(f1, 3);

[exp(u[0]^2), 2*u[0]*u[1]*exp(u[0]^2), u[1]^2*exp(u[0]^2)+2*u[0]*u[2]*exp(u[0]^2)+2*u[0]^2*u[1]^2*exp(u[0]^2), 2*u[1]*exp(u[0]^2)*u[2]+2*u[1]^3*u[0]*exp(u[0]^2)+2*u[0]*u[3]*exp(u[0]^2)+4*u[0]^2*u[2]*u[1]*exp(u[0]^2)+(4/3)*u[0]^3*u[1]^3*exp(u[0]^2)]

(3)

 

 

restart;

"maple.ini in users"

(4)

AP2 := proc(f, M)
    local c, n, k, j, der, A;

    # Initialize c[n, k] for the tables we need
    c := array(1..M, 1..M):
    A := array(0..M):

    # Create a list of the derivatives of f with respect to u[0]
    der := [seq(diff(f(u[0]), u[0]$k), k = 1 .. M)];

    # Set the initial value of A[0]
    A[0] := f(u[0]);

    # Outer loop for n from 1 to M
    for n from 1 to M do
        c[n, 1] := u[n];

        # Inner loop for k from 2 to n
        for k from 2 to n do
            c[n, k] := expand((1/n) * add((j + 1) * u[j + 1] * c[n - 1 - j, k - 1], j = 0 .. n - k));
        end do;

        # Calculate A[n] by taking the first n derivatives and multiplying by c[n, k]
        A[n] := add(der[k] * c[n, k], k = 1 .. n);
    end do;

    # Return the result as a list of A[n] for n from 0 to M
    [seq(A[n], n = 0 .. M)]
end proc:

# Define f as an anonymous function (Maple uses arrow syntax for functions)
f := x -> x^2;

# Execute the procedure with f and M = 3
result := AP2(f, 3);

proc (x) options operator, arrow; x^2 end proc

 

[u[0]^2, 2*u[0]*u[1], 2*u[0]*u[2]+u[1]^2, 2*u[0]*u[3]+2*u[1]*u[2]]

(5)
 

 

Download adomian_polynomenvia_mathematica_-boek_ode_zwillingr_info.mw

That moderator has already taken care of it that you don't dare to post it again for the 2nd time from the adomian polynomials.
This is absurd and curtails your freedom of movement.
Do understand that you still want to stay connected to these mapleprimes to get to know Maple better and need help
Well, I think it's just a pathetic display like this

You sit and do your best to move forward with the adoniam polynomials and add a worksheet and information.
Asks for help and then comes some half-assed moderator who just removes your work from the maple primes forum
This is really all wrong, sick

@salim-barzani , I was willing to put my teeth into it to get this procedure working, after all I am B ed math

I was also studying that other deleted post from today about the adomian polynomials with a worksheet attached which also showed a lot of information for me .
That one is much more valuable then this post.
Just get removed from the forum, this is just really very wrong and this way you deserve no respect and you can get the hell out too.
Sitting maples primes dead with these actions ,goofball.

That moderator is just stirring things up, jerk
Indeed different questions are asked all the time 
Now if you're a man respond to this,sneaky
 

@one man 
I do suspect someone who has flicked this more to delete post, thinking the topic has been discussed enough.

"this time delete my post i will upload 1000 of nonsense question and post  and go delete all of them "
Yes, fantastic ...
Spamrobot to this server 

Why are your two post deleted about Adomian polynomials ?, by whom 
Now you getting me angry..
Probably no one will answer from th emoderators ,because this behavior is so narrow-minded and arrogant.
Looks like someone is bullying and enjoys deleting someone else's post
It's Monday again and have nothing to do and go bother someone else 
There will probably be no response from that sneaky moderator 
What a doltishly immature state of affairs here on this forum
You sure feel like a big shot now that you can just delete someone's post?
This whole maple primes forum doesn't amount to shit ( in dutch: dit hele forum stelt geen reet voor)

Question : did you remove your other earlier  question about adomian polynomials ?
If yes: not handy
if no : madness ..have to deal with a half-witted moderator

It's an interesting study topic the odes and pdes, but that requires me to really dive into it if I want to understand more about it.
There are users here on the maple primes forum who are scientifically educated and can help better.
 

a procedure 


 

 

 

restart;
with(inttrans):       # Load the integral transforms package
with(PDEtools):       # Load the partial differential equations tools
with(LinearAlgebra):  # Load the linear algebra package

# Define the Maple procedure to compute truncated series solutions for u, v, and w
TruncatedSolutions := proc(x, y, t, truncOrder)
    local su, sv, sw, u_sol_s, v_sol_s, w_sol_s, u_sol, v_sol, w_sol;
    local u_n, u_n1, v_n, v_n1, w_n, w_n1;
    local Cuvw, Cuv, Cu, Dvw, Eu, Du, Ev, Ew, Euv;
    local u_n_series, v_n_series, w_n_series;
    local u_final, v_final, w_final;
    local PDE1, PDE2, PDE3, IC1, IC2, IC3;
    local L_uv1, L_uw5, L_uv5, eq_su, eq_sv, eq_sw;
    local u_x_y_t, v_x_y_t, w_x_y_t;
    local X, Y, T;  # Symbolic placeholders for x, y, t

    # Use placeholders X, Y, T instead of x, y, t within the procedure
    # Step (3.22) - (3.24): Define the system of nonlinear PDEs
    printf("Step (3.22): Define PDE for u(X,Y,T)\n");
    PDE1 := diff(u(X, Y, T), T) - v(X, Y) * w(Y, T) = 1;
    
    printf("Step (3.23): Define PDE for v(X,Y,T)\n");
    PDE2 := diff(v(X, Y, T), T) - w(X, Y) * u(X, T) = 5;
    
    printf("Step (3.24): Define PDE for w(X,Y,T)\n");
    PDE3 := diff(w(X, Y, T), T) - u(X, Y) * v(X, T) = 5;
    
    # Step (3.25) - (3.27): Initial conditions for each function at T=0
    printf("Step (3.25): Initial condition for u\n");
    IC1 := u(X, Y, 0) = X + 2 * Y;
    
    printf("Step (3.26): Initial condition for v\n");
    IC2 := v(X, Y, 0) = -2 * Y;
    
    printf("Step (3.27): Initial condition for w\n");
    IC3 := w(X, Y, 0) = -X + 2 * Y;
    
    # Step (3.28) - Laplace transforms for each function
    printf("Step (3.28): Laplace transform of u(X, Y, T)\n");
    su := laplace(u(X, Y, T), T, s);
    
    printf("Step (3.29): Laplace transform of v(X, Y, T)\n");
    sv := laplace(v(X, Y, T), T, s);
    
    printf("Step (3.30): Laplace transform of w(X, Y, T)\n");
    sw := laplace(w(X, Y, T), T, s);
    
    # Define placeholders for the transforms of nonlinear terms
    L_uv1 := L[1 + u*v];
    L_uw5 := L[5 + w*u];
    L_uv5 := L[5 + u*v];
    
    # Step (3.31) - Applying initial conditions in the Laplace domain with placeholders
    printf("Step (3.31): Equation for su with initial conditions applied\n");
    eq_su := su - (X + 2 * Y) = 1 / s * L_uv1;
    
    printf("Step (3.32): Equation for sv with initial conditions applied\n");
    eq_sv := sv + 2 * Y = 5 / s * L_uw5;
    
    printf("Step (3.33): Equation for sw with initial conditions applied\n");
    eq_sw := sw - (X - 2 * Y) = 5 / s * L_uv5;
    
    # Step (3.34) - Express solutions in Laplace domain
    printf("Step (3.34): Solution for u in Laplace domain\n");
    u_sol_s := 1 / s^2 + (X + 2 * Y) / s + 1 / s * L[v * w];
    
    printf("Step (3.35): Solution for v in Laplace domain\n");
    v_sol_s := 5 / s^2 + (X - 2 * Y) / s + 1 / s * L[u * w];
    
    printf("Step (3.36): Solution for w in Laplace domain\n");
    w_sol_s := 5 / s^2 + (-X + 2 * Y) / s + 1 / s * L[u * v];
    
    # Step (3.37) - Applying the inverse Laplace transform to return to time domain
    printf("Step (3.37): Time domain solution for u\n");
    u_sol := invlaplace(u_sol_s, s, T);
    
    printf("Step (3.38): Time domain solution for v\n");
    v_sol := invlaplace(v_sol_s, s, T);
    
    printf("Step (3.39): Time domain solution for w\n");
    w_sol := invlaplace(w_sol_s, s, T);
    
    # Define recursive relations for each function
    printf("Step (3.40): Define recursive term u_n\n");
    u_n := (T -> u_sol);
    
    printf("Step (3.41): Define next recursive term u_n1\n");
    u_n1 := (T -> invlaplace(L[v * w], s, T));
    
    printf("Step (3.42): Define recursive term v_n\n");
    v_n := (T -> v_sol);
    
    printf("Step (3.43): Define next recursive term v_n1\n");
    v_n1 := (T -> invlaplace(L[w * u], s, T));
    
    printf("Step (3.44): Define recursive term w_n\n");
    w_n := (T -> w_sol);
    
    printf("Step (3.45): Define next recursive term w_n1\n");
    w_n1 := (T -> invlaplace(L[u * v], s, T));
    
    # Adomian polynomials for nonlinear terms
    printf("Step (3.46): Polynomial for u*v*w\n");
    Cuvw := u * v * w;
    
    printf("Step (3.47): Polynomial involving derivatives\n");
    Cuv := w * vx + v * wx;
    
    # Additional recursive definitions
    printf("Step (3.48): Sum of products for Du\n");
    Du := sum(u[k] * v[k] * w[k], k = 0 .. truncOrder);
    
    printf("Step (3.49): Initial term for v\n");
    Ev := v0;
    
    printf("Step (3.50): Sum involving initial terms of u and v\n");
    Ew := v0 + u0 + u1;
    
    printf("Step (3.51): Double sum for Euv\n");
    Euv := sum(u[m] * v[truncOrder-m], m = 0 .. truncOrder);
    
    # Steps (3.52) - (3.54) Evaluation of u, v, w in recursive form
    printf("Step (3.52): Evaluation of u in recursive form\n");
    u_x_y_t := diff(u(X, Y, T), T) - v(X, Y) * w(Y, T);
    
    printf("Step (3.53): Evaluation of v in recursive form\n");
    v_x_y_t := diff(v(X, Y, T), T) - w(X, Y) * u(X, T);
    
    printf("Step (3.54): Evaluation of w in recursive form\n");
    w_x_y_t := diff(w(X, Y, T), T) - u(X, Y) * v(X, T);
    
    # Summing recursive terms for final series solutions up to truncOrder
    printf("Step (3.55): Infinite series sum for u\n");
    u_n_series := sum(u_n(X, Y, T), n = 0 .. truncOrder);
    
    printf("Step (3.56): Infinite series sum for v\n");
    v_n_series := sum(v_n(X, Y, T), n = 0 .. truncOrder);
    
    printf("Step (3.57): Infinite series sum for w\n");
    w_n_series := sum(w_n(X, Y, T), n = 0 .. truncOrder);
    
    # Explicit truncated series solutions
    printf("Step (3.58): Truncated series for u\n");
    u_final := sum(u[n](X, Y, T), n = 0 .. truncOrder);
    
    printf("Step (3.59): Truncated series for v\n");
    v_final := sum(v[n](X, Y, T), n = 0 .. truncOrder);
    
    printf("Step (3.60): Truncated series for w\n");
    w_final := sum(w[n](X, Y, T), n = 0 .. truncOrder);
    
    # Substitute the actual values of x, y, and t into the final solutions
    u_final := subs({X = x, Y = y, T = t}, eval(u_final));
    v_final := subs({X = x, Y = y, T = t}, eval(v_final));
    w_final := subs({X = x, Y = y, T = t}, eval(w_final));

    # Output final truncated solutions for u, v, and w, converting expressions to strings to prevent formatting issues
    printf("Final truncated solutions for u, v, and w up to order %d:\n", truncOrder);
    printf("u_final: %a\n", u_final);
    printf("v_final: %a\n", v_final);
    printf("w_final: %a\n", w_final);

    # Return results as a list
    return [u_final, v_final, w_final];

end proc:

"maple.ini in users"

(1)

TruncatedSolutions(1, 2, 0.5, 5);

Step (3.22): Define PDE for u(X,Y,T)
Step (3.23): Define PDE for v(X,Y,T)
Step (3.24): Define PDE for w(X,Y,T)
Step (3.25): Initial condition for u
Step (3.26): Initial condition for v
Step (3.27): Initial condition for w
Step (3.28): Laplace transform of u(X, Y, T)
Step (3.29): Laplace transform of v(X, Y, T)
Step (3.30): Laplace transform of w(X, Y, T)
Step (3.31): Equation for su with initial conditions applied
Step (3.32): Equation for sv with initial conditions applied
Step (3.33): Equation for sw with initial conditions applied
Step (3.34): Solution for u in Laplace domain
Step (3.35): Solution for v in Laplace domain
Step (3.36): Solution for w in Laplace domain
Step (3.37): Time domain solution for u
Step (3.38): Time domain solution for v
Step (3.39): Time domain solution for w
Step (3.40): Define recursive term u_n
Step (3.41): Define next recursive term u_n1
Step (3.42): Define recursive term v_n
Step (3.43): Define next recursive term v_n1
Step (3.44): Define recursive term w_n
Step (3.45): Define next recursive term w_n1
Step (3.46): Polynomial for u*v*w
Step (3.47): Polynomial involving derivatives
Step (3.48): Sum of products for Du
Step (3.49): Initial term for v
Step (3.50): Sum involving initial terms of u and v
Step (3.51): Double sum for Euv
Step (3.52): Evaluation of u in recursive form
Step (3.53): Evaluation of v in recursive form
Step (3.54): Evaluation of w in recursive form
Step (3.55): Infinite series sum for u
Step (3.56): Infinite series sum for v
Step (3.57): Infinite series sum for w
Step (3.58): Truncated series for u
Step (3.59): Truncated series for v
Step (3.60): Truncated series for w
Final truncated solutions for u, v, and w up to order 5:
u_final: u[0](1,2,.5)+u[1](1,2,.5)+u[2](1,2,.5)+u[3](1,2,.5)+u[4](1,2,.5)+u[5](1,2,.5)
v_final: v[0](1,2,.5)+v[1](1,2,.5)+v[2](1,2,.5)+v[3](1,2,.5)+v[4](1,2,.5)+v[5](1,2,.5)
w_final: w[0](1,2,.5)+w[1](1,2,.5)+w[2](1,2,.5)+w[3](1,2,.5)+w[4](1,2,.5)+w[5](1,2,.5)

 

[u[0](1, 2, .5)+u[1](1, 2, .5)+u[2](1, 2, .5)+u[3](1, 2, .5)+u[4](1, 2, .5)+u[5](1, 2, .5), v[0](1, 2, .5)+v[1](1, 2, .5)+v[2](1, 2, .5)+v[3](1, 2, .5)+v[4](1, 2, .5)+v[5](1, 2, .5), w[0](1, 2, .5)+w[1](1, 2, .5)+w[2](1, 2, .5)+w[3](1, 2, .5)+w[4](1, 2, .5)+w[5](1, 2, .5)]

(2)

 

 


 

Download example2_pdesystmprime_salim3-11-2024PROCEDURE.mw

Easier to read.

 

restart;
with(inttrans):       # Load the integral transforms package
with(PDEtools):       # Load the partial differential equations tools
with(LinearAlgebra):  # Load the linear algebra package

# Step (3.22) - Define the system of nonlinear PDEs
printf("Step (3.22): Define PDE for u(x,y,t)\n");
PDE1 := diff(u(x, y, t), t) - v(x, y) * w(y, t) = 1;

printf("Step (3.23): Define PDE for v(x,y,t)\n");
PDE2 := diff(v(x, y, t), t) - w(x, y) * u(x, t) = 5;

printf("Step (3.24): Define PDE for w(x,y,t)\n");
PDE3 := diff(w(x, y, t), t) - u(x, y) * v(x, t) = 5;

# Step (3.25) - (3.27) Initial conditions for each function at t=0
printf("Step (3.25): Initial condition for u\n");
IC1 := u(x, y, 0) = x + 2 * y;

printf("Step (3.26): Initial condition for v\n");
IC2 := v(x, y, 0) = -2 * y;

printf("Step (3.27): Initial condition for w\n");
IC3 := w(x, y, 0) = -x + 2 * y;

# Step (3.28) - Laplace transforms for each function
printf("Step (3.28): Laplace transform of u(x, y, t)\n");
su := laplace(u(x, y, t), t, s);

printf("Step (3.29): Laplace transform of v(x, y, t)\n");
sv := laplace(v(x, y, t), t, s);

printf("Step (3.30): Laplace transform of w(x, y, t)\n");
sw := laplace(w(x, y, t), t, s);

# Define placeholders for the transforms of nonlinear terms
L_uv1 := L[1 + u*v];
L_uw5 := L[5 + w*u];
L_uv5 := L[5 + u*v];

# Step (3.31) - Applying initial conditions in the Laplace domain with placeholders
printf("Step (3.31): Equation for su with initial conditions applied\n");
eq_su := su - (x + 2 * y) = 1 / s * L_uv1;

printf("Step (3.32): Equation for sv with initial conditions applied\n");
eq_sv := sv + 2 * y = 5 / s * L_uw5;

printf("Step (3.33): Equation for sw with initial conditions applied\n");
eq_sw := sw - (x - 2 * y) = 5 / s * L_uv5;

# Step (3.34) - Express solutions in Laplace domain
printf("Step (3.34): Solution for u in Laplace domain\n");
u_sol_s := 1 / s^2 + (x + 2 * y) / s + 1 / s * L[v * w];

printf("Step (3.35): Solution for v in Laplace domain\n");
v_sol_s := 5 / s^2 + (x - 2 * y) / s + 1 / s * L[u * w];

printf("Step (3.36): Solution for w in Laplace domain\n");
w_sol_s := 5 / s^2 + (-x + 2 * y) / s + 1 / s * L[u * v];

# Step (3.37) - Applying the inverse Laplace transform to return to time domain
printf("Step (3.37): Time domain solution for u\n");
u_sol := invlaplace(u_sol_s, s, t);

printf("Step (3.38): Time domain solution for v\n");
v_sol := invlaplace(v_sol_s, s, t);

printf("Step (3.39): Time domain solution for w\n");
w_sol := invlaplace(w_sol_s, s, t);

# Define recursive relations for each function (3.40)-(3.42)
printf("Step (3.40): Define recursive term u_n\n");
u_n := (t -> u_sol);

printf("Step (3.41): Define next recursive term u_n1\n");
u_n1 := (t -> invlaplace(L[v * w], s, t));

printf("Step (3.42): Define recursive term v_n\n");
v_n := (t -> v_sol);

printf("Step (3.43): Define next recursive term v_n1\n");
v_n1 := (t -> invlaplace(L[w * u], s, t));

printf("Step (3.44): Define recursive term w_n\n");
w_n := (t -> w_sol);

printf("Step (3.45): Define next recursive term w_n1\n");
w_n1 := (t -> invlaplace(L[u * v], s, t));

# Adomian polynomials for nonlinear terms (3.43)-(3.47)
printf("Step (3.46): Polynomial for u*v*w\n");
Cuvw := u * v * w;

printf("Step (3.47): Polynomial involving derivatives\n");
Cuv := w * vx + v * wx;

# Step (3.48) - (3.51) Additional recursive definitions
printf("Step (3.48): Sum of products for Du\n");
Du := sum(u[k] * v[k] * w[k], k = 0 .. n);

printf("Step (3.49): Initial term for v\n");
Ev := v0;

printf("Step (3.50): Sum involving initial terms of u and v\n");
Ew := v0 + u0 + u1;

printf("Step (3.51): Double sum for Euv\n");
Euv := sum(u[m] * v[n-m], m = 0 .. n);

# Steps (3.52) - (3.54) Evaluation of u, v, w in recursive form
printf("Step (3.52): Evaluation of u in recursive form\n");
u_x_y_t := diff(u(x, y, t), t) - v(x, y) * w(y, t);

printf("Step (3.53): Evaluation of v in recursive form\n");
v_x_y_t := diff(v(x, y, t), t) - w(x, y) * u(x, t);

printf("Step (3.54): Evaluation of w in recursive form\n");
w_x_y_t := diff(w(x, y, t), t) - u(x, y) * v(x, t);

# Step (3.55) - Summing recursive terms for final series solutions
printf("Step (3.55): Infinite series sum for u\n");
u_n_series := sum(u_n(x, y, t), n = 0 .. infinity);

printf("Step (3.56): Infinite series sum for v\n");
v_n_series := sum(v_n(x, y, t), n = 0 .. infinity);

printf("Step (3.57): Infinite series sum for w\n");
w_n_series := sum(w_n(x, y, t), n = 0 .. infinity);

# Explicit sums for solutions (evaluating where possible)
printf("Step (3.58): Truncated series for u\n");
u_final := sum(u[n](x, y, t), n = 0 .. 5);

printf("Step (3.59): Truncated series for v\n");
v_final := sum(v[n](x, y, t), n = 0 .. 5);

printf("Step (3.60): Truncated series for w\n");
w_final := sum(w[n](x, y, t), n = 0 .. 5);

# Display final truncated solutions
printf("Displaying final truncated solutions for u, v, and w:\n");
u_final;
v_final;
w_final;

"maple.ini in users"

 

Step (3.22): Define PDE for u(x,y,t)

 

diff(u(x, y, t), t)-v(x, y)*w(y, t) = 1

 

Step (3.23): Define PDE for v(x,y,t)

 

diff(v(x, y, t), t)-w(x, y)*u(x, t) = 5

 

Step (3.24): Define PDE for w(x,y,t)

 

diff(w(x, y, t), t)-u(x, y)*v(x, t) = 5

 

Step (3.25): Initial condition for u

 

u(x, y, 0) = x+2*y

 

Step (3.26): Initial condition for v

 

v(x, y, 0) = -2*y

 

Step (3.27): Initial condition for w

 

w(x, y, 0) = -x+2*y

 

Step (3.28): Laplace transform of u(x, y, t)

 

laplace(u(x, y, t), t, s)

 

Step (3.29): Laplace transform of v(x, y, t)

 

laplace(v(x, y, t), t, s)

 

Step (3.30): Laplace transform of w(x, y, t)

 

laplace(w(x, y, t), t, s)

 

L[u*v+1]

 

L[u*w+5]

 

L[u*v+5]

 

Step (3.31): Equation for su with initial conditions applied

 

laplace(u(x, y, t), t, s)-x-2*y = L[u*v+1]/s

 

Step (3.32): Equation for sv with initial conditions applied

 

laplace(v(x, y, t), t, s)+2*y = 5*L[u*w+5]/s

 

Step (3.33): Equation for sw with initial conditions applied

 

laplace(w(x, y, t), t, s)-x+2*y = 5*L[u*v+5]/s

 

Step (3.34): Solution for u in Laplace domain

 

1/s^2+(x+2*y)/s+L[v*w]/s

 

Step (3.35): Solution for v in Laplace domain

 

5/s^2+(x-2*y)/s+L[w*u]/s

 

Step (3.36): Solution for w in Laplace domain

 

5/s^2+(-x+2*y)/s+L[u*v]/s

 

Step (3.37): Time domain solution for u

 

t+x+2*y+L[v*w]

 

Step (3.38): Time domain solution for v

 

5*t+x-2*y+L[w*u]

 

Step (3.39): Time domain solution for w

 

5*t-x+2*y+L[u*v]

 

Step (3.40): Define recursive term u_n

 

proc (t) options operator, arrow; u_sol end proc

 

Step (3.41): Define next recursive term u_n1

 

proc (t) options operator, arrow; invlaplace(L[v*w], s, t) end proc

 

Step (3.42): Define recursive term v_n

 

proc (t) options operator, arrow; v_sol end proc

 

Step (3.43): Define next recursive term v_n1

 

proc (t) options operator, arrow; invlaplace(L[w*u], s, t) end proc

 

Step (3.44): Define recursive term w_n

 

proc (t) options operator, arrow; w_sol end proc

 

Step (3.45): Define next recursive term w_n1

 

proc (t) options operator, arrow; invlaplace(L[u*v], s, t) end proc

 

Step (3.46): Polynomial for u*v*w

 

u*v*w

 

Step (3.47): Polynomial involving derivatives

 

v*wx+vx*w

 

Step (3.48): Sum of products for Du

 

sum(u[k]*v[k]*w[k], k = 0 .. n)

 

Step (3.49): Initial term for v

 

v0

 

Step (3.50): Sum involving initial terms of u and v

 

v0+u0+u1

 

Step (3.51): Double sum for Euv

 

sum(u[m]*v[n-m], m = 0 .. n)

 

Step (3.52): Evaluation of u in recursive form

 

diff(u(x, y, t), t)-v(x, y)*w(y, t)

 

Step (3.53): Evaluation of v in recursive form

 

diff(v(x, y, t), t)-w(x, y)*u(x, t)

 

Step (3.54): Evaluation of w in recursive form

 

diff(w(x, y, t), t)-u(x, y)*v(x, t)

 

Step (3.55): Infinite series sum for u

 

signum(t+x+2*y+L[v*w])*infinity

 

Step (3.56): Infinite series sum for v

 

signum(5*t+x-2*y+L[w*u])*infinity

 

Step (3.57): Infinite series sum for w

 

signum(5*t-x+2*y+L[u*v])*infinity

 

Step (3.58): Truncated series for u

 

u[0](x, y, t)+u[1](x, y, t)+u[2](x, y, t)+u[3](x, y, t)+u[4](x, y, t)+u[5](x, y, t)

 

Step (3.59): Truncated series for v

 

v[0](x, y, t)+v[1](x, y, t)+v[2](x, y, t)+v[3](x, y, t)+v[4](x, y, t)+v[5](x, y, t)

 

Step (3.60): Truncated series for w

 

w[0](x, y, t)+w[1](x, y, t)+w[2](x, y, t)+w[3](x, y, t)+w[4](x, y, t)+w[5](x, y, t)

 

Displaying final truncated solutions for u, v, and w:

 

u[0](x, y, t)+u[1](x, y, t)+u[2](x, y, t)+u[3](x, y, t)+u[4](x, y, t)+u[5](x, y, t)

 

v[0](x, y, t)+v[1](x, y, t)+v[2](x, y, t)+v[3](x, y, t)+v[4](x, y, t)+v[5](x, y, t)

 

w[0](x, y, t)+w[1](x, y, t)+w[2](x, y, t)+w[3](x, y, t)+w[4](x, y, t)+w[5](x, y, t)

(1)

 


 

Download example2_pdesystmprime_salim3-11-2024Variant1.mw

 

To get about the same results .it is not finished yet, i like to have the same notation(almost possible) for pdes 
I followed the pdf numbering, but other way is to ask for a procedure what i don't do for now

 

restart;
with(inttrans):       # Load the integral transforms package
with(PDEtools):       # Load the partial differential equations tools
with(LinearAlgebra):  # Load the linear algebra package

# Define the system of nonlinear PDEs with detailed notation
PDE1 := diff(u(x, y, t), t) - v(x, y) * w(y, t) = 1;   # (3.22) Define PDE for u(x,y,t)
PDE2 := diff(v(x, y, t), t) - w(x, y) * u(x, t) = 5;   # (3.23) Define PDE for v(x,y,t)
PDE3 := diff(w(x, y, t), t) - u(x, y) * v(x, t) = 5;   # (3.24) Define PDE for w(x,y,t)

# Initial conditions for each function at t=0
IC1 := u(x, y, 0) = x + 2 * y;     # (3.25) Initial condition for u
IC2 := v(x, y, 0) = -2 * y;        # (3.26) Initial condition for v
IC3 := w(x, y, 0) = -x + 2 * y;    # (3.27) Initial condition for w

# Laplace transforms for each function
su := laplace(u(x, y, t), t, s);    # Laplace transform of u(x, y, t)
sv := laplace(v(x, y, t), t, s);    # Laplace transform of v(x, y, t)
sw := laplace(w(x, y, t), t, s);    # Laplace transform of w(x, y, t)

# Define placeholders for the transforms of nonlinear terms
L_uv1 := L[1 + u*v];    # Placeholder for Laplace transform of 1 + u*v
L_uw5 := L[5 + w*u];    # Placeholder for Laplace transform of 5 + w*u
L_uv5 := L[5 + u*v];    # Placeholder for Laplace transform of 5 + u*v

# Applying the initial conditions in the Laplace domain with placeholders
eq_su := su - (x + 2 * y) = 1 / s * L_uv1;    # (3.28) Equation for su
eq_sv := sv + 2 * y = 5 / s * L_uw5;          # (3.29) Equation for sv
eq_sw := sw - (x - 2 * y) = 5 / s * L_uv5;    # (3.30) Equation for sw

# Express solutions in Laplace domain (adding explicit forms)
u_sol_s := 1 / s^2 + (x + 2 * y) / s + 1 / s * L[v * w]; # (3.31) Solution for u in Laplace domain
v_sol_s := 5 / s^2 + (x - 2 * y) / s + 1 / s * L[u * w]; # (3.32) Solution for v in Laplace domain
w_sol_s := 5 / s^2 + (-x + 2 * y) / s + 1 / s * L[u * v]; # (3.33) Solution for w in Laplace domain

# Applying the inverse Laplace transform to return to time domain
u_sol := invlaplace(u_sol_s, s, t);  # (3.34) Time domain solution for u
v_sol := invlaplace(v_sol_s, s, t);  # (3.35) Time domain solution for v
w_sol := invlaplace(w_sol_s, s, t);  # (3.36) Time domain solution for w

# Define recursive relations for each function (3.37)-(3.42)
u_n := (t -> u_sol);                       # Define nth term for u(x,y,t)
u_n1 := (t -> invlaplace(L[v * w], s, t));  # Next recursive term for u
v_n := (t -> v_sol);                       # Define nth term for v(x,y,t)
v_n1 := (t -> invlaplace(L[w * u], s, t));  # Next recursive term for v
w_n := (t -> w_sol);                       # Define nth term for w(x,y,t)
w_n1 := (t -> invlaplace(L[u * v], s, t));  # Next recursive term for w

# Adomian polynomials for nonlinear terms (3.43)-(3.47)
Cuvw := u * v * w;           # (3.43) Polynomial for u*v*w
Cuv := w * vx + v * wx;      # (3.44) Polynomial involving derivatives
Cu := sum(u[k] * v[k], k = 0 .. n); # (3.45) Sum of products of terms of u and v
Dvw := sum(v[k] * w[k], k = 0 .. n); # (3.46) Sum of products of terms of v and w
Eu := u0 + v0;               # (3.47) Sum of initial terms for u and v

# Additional recursive definitions from (3.48) to (3.51)
Du := sum(u[k] * v[k] * w[k], k = 0 .. n);     # (3.48) Sum of products for Du
Ev := v0;                                      # (3.49) Initial term for v
Ew := v0 + u0 + u1;                            # (3.50) Sum involving initial terms of u and v
Euv := sum(u[m] * v[n-m], m = 0 .. n);         # (3.51) Double sum for Euv

# Summing recursive terms for final series solutions (3.55)-(3.57)
u_n_series := sum(u_n(x, y, t), n = 0 .. infinity);  # (3.55)
v_n_series := sum(v_n(x, y, t), n = 0 .. infinity);  # (3.56)
w_n_series := sum(w_n(x, y, t), n = 0 .. infinity);  # (3.57)

# Explicit sums for solutions (evaluating where possible)
u_final := sum(u[n](x, y, t), n = 0 .. 5);  # (3.58) Truncated series for u
v_final := sum(v[n](x, y, t), n = 0 .. 5);  # (3.59) Truncated series for v
w_final := sum(w[n](x, y, t), n = 0 .. 5);  # (3.60) Truncated series for w

# Display final truncated solutions
u_final;
v_final;
w_final;

"maple.ini in users"

 

diff(u(x, y, t), t)-v(x, y)*w(y, t) = 1

 

diff(v(x, y, t), t)-w(x, y)*u(x, t) = 5

 

diff(w(x, y, t), t)-u(x, y)*v(x, t) = 5

 

u(x, y, 0) = x+2*y

 

v(x, y, 0) = -2*y

 

w(x, y, 0) = -x+2*y

 

laplace(u(x, y, t), t, s)

 

laplace(v(x, y, t), t, s)

 

laplace(w(x, y, t), t, s)

 

L[u*v+1]

 

L[u*w+5]

 

L[u*v+5]

 

laplace(u(x, y, t), t, s)-x-2*y = L[u*v+1]/s

 

laplace(v(x, y, t), t, s)+2*y = 5*L[u*w+5]/s

 

laplace(w(x, y, t), t, s)-x+2*y = 5*L[u*v+5]/s

 

1/s^2+(x+2*y)/s+L[v*w]/s

 

5/s^2+(x-2*y)/s+L[w*u]/s

 

5/s^2+(-x+2*y)/s+L[u*v]/s

 

t+x+2*y+L[v*w]

 

5*t+x-2*y+L[w*u]

 

5*t-x+2*y+L[u*v]

 

proc (t) options operator, arrow; u_sol end proc

 

proc (t) options operator, arrow; invlaplace(L[v*w], s, t) end proc

 

proc (t) options operator, arrow; v_sol end proc

 

proc (t) options operator, arrow; invlaplace(L[w*u], s, t) end proc

 

proc (t) options operator, arrow; w_sol end proc

 

proc (t) options operator, arrow; invlaplace(L[u*v], s, t) end proc

 

u*v*w

 

v*wx+vx*w

 

sum(u[k]*v[k], k = 0 .. n)

 

sum(v[k]*w[k], k = 0 .. n)

 

u0+v0

 

sum(u[k]*v[k]*w[k], k = 0 .. n)

 

v0

 

v0+u0+u1

 

sum(u[m]*v[n-m], m = 0 .. n)

 

signum(t+x+2*y+L[v*w])*infinity

 

signum(5*t+x-2*y+L[w*u])*infinity

 

signum(5*t-x+2*y+L[u*v])*infinity

 

u[0](x, y, t)+u[1](x, y, t)+u[2](x, y, t)+u[3](x, y, t)+u[4](x, y, t)+u[5](x, y, t)

 

v[0](x, y, t)+v[1](x, y, t)+v[2](x, y, t)+v[3](x, y, t)+v[4](x, y, t)+v[5](x, y, t)

 

w[0](x, y, t)+w[1](x, y, t)+w[2](x, y, t)+w[3](x, y, t)+w[4](x, y, t)+w[5](x, y, t)

 

u[0](x, y, t)+u[1](x, y, t)+u[2](x, y, t)+u[3](x, y, t)+u[4](x, y, t)+u[5](x, y, t)

 

v[0](x, y, t)+v[1](x, y, t)+v[2](x, y, t)+v[3](x, y, t)+v[4](x, y, t)+v[5](x, y, t)

 

w[0](x, y, t)+w[1](x, y, t)+w[2](x, y, t)+w[3](x, y, t)+w[4](x, y, t)+w[5](x, y, t)

(1)

 

 


 

Download example2_pdesystmprime_salim3-11-2024.mw

 

   

 

@salim-barzani 
No problem, have a full pdf, I think of it now
Let's see how far I can get with it with example 2 :-)

First 20 21 22 23 24 25 26 Last Page 22 of 73