MaplePrimes Questions

 Hi guys,
I am trying write a code for homotopy perturbation, i have already generated the polynomial as you can see, i have also  solve for concentration equation since is not couple. But i have a lot of error massages for temperature, velocity and induced magnetic field. can some one please go through the code?
 

NULL

restart

PDEtools[declare](f(x),theta(x),u(x),w(x), prime=x):

f(x)*`will now be displayed as`*f

 

theta(x)*`will now be displayed as`*theta

 

u(x)*`will now be displayed as`*u

 

w(x)*`will now be displayed as`*w

 

`derivatives with respect to`*x*`of functions of one variable will now be displayed with '`

(1)

N := 4:

NULL

NULL

f(x):=sum((p^(i))*f[i](x),i=0..N);

f[0](x)+p*f[1](x)+p^2*f[2](x)+p^3*f[3](x)+p^4*f[4](x)

(2)

theta(x) := sum(p^i*theta[i](x), i = 0 .. N);

theta[0](x)+p*theta[1](x)+p^2*theta[2](x)+p^3*theta[3](x)+p^4*theta[4](x)

(3)

``

u(x) := sum(p^i*u[i](x), i = 0 .. N);

u[0](x)+p*u[1](x)+p^2*u[2](x)+p^3*u[3](x)+p^4*u[4](x)

(4)

``

w(x) := sum(p^i*w[i](x), i = 0 .. N);

w[0](x)+p*w[1](x)+p^2*w[2](x)+p^3*w[3](x)+p^4*w[4](x)

(5)

HPMEq := (1-p)*(diff(f(x), `$`(x, 2)))+p*(diff(f(x), `$`(x, 2))-k1*(diff(f(x), x))-k2*f(x));

(1-p)*(diff(diff(f[0](x), x), x)+p*(diff(diff(f[1](x), x), x))+p^2*(diff(diff(f[2](x), x), x))+p^3*(diff(diff(f[3](x), x), x))+p^4*(diff(diff(f[4](x), x), x)))+p*(diff(diff(f[0](x), x), x)+p*(diff(diff(f[1](x), x), x))+p^2*(diff(diff(f[2](x), x), x))+p^3*(diff(diff(f[3](x), x), x))+p^4*(diff(diff(f[4](x), x), x))-k1*(diff(f[0](x), x)+p*(diff(f[1](x), x))+p^2*(diff(f[2](x), x))+p^3*(diff(f[3](x), x))+p^4*(diff(f[4](x), x)))-k2*(f[0](x)+p*f[1](x)+p^2*f[2](x)+p^3*f[3](x)+p^4*f[4](x)))

(6)

HPMEr := (1-p)*(diff(theta(x), `$`(x, 2)))+p*(diff(theta(x), `$`(x, 2))-k11*(diff(theta(x), x))+k12*(diff(u(x), x))^2+k13*(diff(w(x), x))^2+k14*theta(x));

(1-p)*(diff(diff(theta[0](x), x), x)+p*(diff(diff(theta[1](x), x), x))+p^2*(diff(diff(theta[2](x), x), x))+p^3*(diff(diff(theta[3](x), x), x))+p^4*(diff(diff(theta[4](x), x), x)))+p*(diff(diff(theta[0](x), x), x)+p*(diff(diff(theta[1](x), x), x))+p^2*(diff(diff(theta[2](x), x), x))+p^3*(diff(diff(theta[3](x), x), x))+p^4*(diff(diff(theta[4](x), x), x))-k11*(diff(theta[0](x), x)+p*(diff(theta[1](x), x))+p^2*(diff(theta[2](x), x))+p^3*(diff(theta[3](x), x))+p^4*(diff(theta[4](x), x)))+k12*(diff(u[0](x), x)+p*(diff(u[1](x), x))+p^2*(diff(u[2](x), x))+p^3*(diff(u[3](x), x))+p^4*(diff(u[4](x), x)))^2+k13*(diff(w[0](x), x)+p*(diff(w[1](x), x))+p^2*(diff(w[2](x), x))+p^3*(diff(w[3](x), x))+p^4*(diff(w[4](x), x)))^2+k14*(theta[0](x)+p*theta[1](x)+p^2*theta[2](x)+p^3*theta[3](x)+p^4*theta[4](x)))

(7)

HPMEs := (1-p)*(diff(u(x), `$`(x, 2)))+p*(diff(u(x), `$`(x, 2))-R*(diff(u(x), x))-A-k8*w(x)-k7*u(x)+k5*theta(x)+k6*f(x));

(1-p)*(diff(diff(u[0](x), x), x)+p*(diff(diff(u[1](x), x), x))+p^2*(diff(diff(u[2](x), x), x))+p^3*(diff(diff(u[3](x), x), x))+p^4*(diff(diff(u[4](x), x), x)))+p*(diff(diff(u[0](x), x), x)+p*(diff(diff(u[1](x), x), x))+p^2*(diff(diff(u[2](x), x), x))+p^3*(diff(diff(u[3](x), x), x))+p^4*(diff(diff(u[4](x), x), x))-R*(diff(u[0](x), x)+p*(diff(u[1](x), x))+p^2*(diff(u[2](x), x))+p^3*(diff(u[3](x), x))+p^4*(diff(u[4](x), x)))-A-k8*(w[0](x)+p*w[1](x)+p^2*w[2](x)+p^3*w[3](x)+p^4*w[4](x))-k7*(u[0](x)+p*u[1](x)+p^2*u[2](x)+p^3*u[3](x)+p^4*u[4](x))+k5*(theta[0](x)+p*theta[1](x)+p^2*theta[2](x)+p^3*theta[3](x)+p^4*theta[4](x))+k6*(f[0](x)+p*f[1](x)+p^2*f[2](x)+p^3*f[3](x)+p^4*f[4](x)))

(8)

HPMEt := (1-p)*(diff(w(x), `$`(x, 2)))+p*(diff(w(x), `$`(x, 2))-R*(diff(w(x), x))+k9*u(x)-k10*w(x))

(1-p)*(diff(diff(w[0](x), x), x)+p*(diff(diff(w[1](x), x), x))+p^2*(diff(diff(w[2](x), x), x))+p^3*(diff(diff(w[3](x), x), x))+p^4*(diff(diff(w[4](x), x), x)))+p*(diff(diff(w[0](x), x), x)+p*(diff(diff(w[1](x), x), x))+p^2*(diff(diff(w[2](x), x), x))+p^3*(diff(diff(w[3](x), x), x))+p^4*(diff(diff(w[4](x), x), x))-R*(diff(w[0](x), x)+p*(diff(w[1](x), x))+p^2*(diff(w[2](x), x))+p^3*(diff(w[3](x), x))+p^4*(diff(w[4](x), x)))+k9*(u[0](x)+p*u[1](x)+p^2*u[2](x)+p^3*u[3](x)+p^4*u[4](x))-k10*(w[0](x)+p*w[1](x)+p^2*w[2](x)+p^3*w[3](x)+p^4*w[4](x)))

(9)

for i from 0 to N do equ[1][i] := coeff(HPMEq, p, i) = 0 end do;

diff(diff(f[0](x), x), x) = 0

 

diff(diff(f[1](x), x), x)-k1*(diff(f[0](x), x))-k2*f[0](x) = 0

 

diff(diff(f[2](x), x), x)-k2*f[1](x)-k1*(diff(f[1](x), x)) = 0

 

diff(diff(f[3](x), x), x)-k2*f[2](x)-k1*(diff(f[2](x), x)) = 0

 

diff(diff(f[4](x), x), x)-k1*(diff(f[3](x), x))-k2*f[3](x) = 0

(10)

for i from 0 to N do equa[1][i] := coeff(HPMEr, p, i) = 0 end do;

diff(diff(theta[0](x), x), x) = 0

 

diff(diff(theta[1](x), x), x)-k11*(diff(theta[0](x), x))+k12*(diff(u[0](x), x))^2+k13*(diff(w[0](x), x))^2+k14*theta[0](x) = 0

 

diff(diff(theta[2](x), x), x)+2*k13*(diff(w[0](x), x))*(diff(w[1](x), x))-k11*(diff(theta[1](x), x))+2*k12*(diff(u[0](x), x))*(diff(u[1](x), x))+k14*theta[1](x) = 0

 

diff(diff(theta[3](x), x), x)+k12*(2*(diff(u[0](x), x))*(diff(u[2](x), x))+(diff(u[1](x), x))^2)+k14*theta[2](x)+k13*(2*(diff(w[0](x), x))*(diff(w[2](x), x))+(diff(w[1](x), x))^2)-k11*(diff(theta[2](x), x)) = 0

 

diff(diff(theta[4](x), x), x)+k12*(2*(diff(u[0](x), x))*(diff(u[3](x), x))+2*(diff(u[1](x), x))*(diff(u[2](x), x)))-k11*(diff(theta[3](x), x))+k14*theta[3](x)+k13*(2*(diff(w[0](x), x))*(diff(w[3](x), x))+2*(diff(w[1](x), x))*(diff(w[2](x), x))) = 0

(11)

for i from 0 to N do equat[1][i] := coeff(HPMEs, p, i) = 0 end do;

diff(diff(u[0](x), x), x) = 0

 

diff(diff(u[1](x), x), x)-R*(diff(u[0](x), x))-A-k7*u[0](x)+k5*theta[0](x)+k6*f[0](x)-k8*w[0](x) = 0

 

diff(diff(u[2](x), x), x)-R*(diff(u[1](x), x))-k7*u[1](x)+k6*f[1](x)-k8*w[1](x)+k5*theta[1](x) = 0

 

diff(diff(u[3](x), x), x)-R*(diff(u[2](x), x))+k6*f[2](x)-k7*u[2](x)+k5*theta[2](x)-k8*w[2](x) = 0

 

diff(diff(u[4](x), x), x)-R*(diff(u[3](x), x))+k5*theta[3](x)+k6*f[3](x)-k7*u[3](x)-k8*w[3](x) = 0

(12)

``

for i from 0 to N do equati[1][i] := coeff(HPMEt, p, i) = 0 end do;

diff(diff(w[0](x), x), x) = 0

 

diff(diff(w[1](x), x), x)-R*(diff(w[0](x), x))-k10*w[0](x)+k9*u[0](x) = 0

 

diff(diff(w[2](x), x), x)-k10*w[1](x)+k9*u[1](x)-R*(diff(w[1](x), x)) = 0

 

diff(diff(w[3](x), x), x)-k10*w[2](x)+k9*u[2](x)-R*(diff(w[2](x), x)) = 0

 

diff(diff(w[4](x), x), x)+k9*u[3](x)-R*(diff(w[3](x), x))-k10*w[3](x) = 0

(13)

con[1][0] := f[0](-1) = 1, f[0](1) = 1:

-.5000000000*k2+0.3435019841e-1*k2^4+.5000000000*k2*x^2-.2500000000*k2^2*x^2+.2083333333*k2^2+0.4166666667e-1*k2^2*x^4-0.2083333333e-1*k2^3*x^4+.1041666667*k2^3*x^2+0.4166666667e-1*k1^2*k2+0.5952380952e-3*k2^3*k1*x^7-0.8472222222e-1*k2^3+0.2480158730e-4*k2^4*x^8+0.4166666667e-2*x^6*k1^2*k2^2+0.8333333333e-2*k2*x^5*k1^3-0.9722222222e-2*k1*k2^3*x^5-0.3472222222e-1*k1^2*k2^2*x^4-0.2777777778e-1*k2*x^3*k1^3+0.5046296296e-1*k1*k2^3*x^3+0.6805555556e-1*k2^2*k1^2*x^2-0.4133597884e-1*k1*k2^3*x+0.1944444444e-1*k2*k1^3*x+1.+0.1388888889e-2*k2^3*x^6+0.1666666667e-1*k1*k2^2*x^5+0.4166666667e-1*k2*x^4*k1^2-.1111111111*k2^2*k1*x^3+0.9444444444e-1*k1*k2^2*x-0.8333333333e-1*k2*k1^2*x^2+.1666666667*k2*k1*x^3-0.3750000000e-1*k1^2*k2^2-0.6944444444e-3*k2^4*x^6+0.8680555556e-2*k2^4*x^4-0.4236111111e-1*k2^4*x^2-.1666666667*k1*k2*x

 

1-(1/2)*k2+(277/8064)*k2^4+(1/2)*k2*x^2-(1/4)*k2^2*x^2+(5/24)*k2^2+(1/24)*k2^2*x^4-(1/48)*k2^3*x^4+(5/48)*k2^3*x^2+(1/24)*k1^2*k2+(1/1680)*k2^3*k1*x^7-(61/720)*k2^3+(1/40320)*k2^4*x^8+(1/240)*x^6*k1^2*k2^2+(1/120)*k2*x^5*k1^3-(7/720)*k1*k2^3*x^5-(5/144)*k1^2*k2^2*x^4-(1/36)*k2*x^3*k1^3+(109/2160)*k1*k2^3*x^3+(49/720)*k2^2*k1^2*x^2-(125/3024)*k1*k2^3*x+(7/360)*k2*k1^3*x+(1/720)*k2^3*x^6+(1/60)*k1*k2^2*x^5+(1/24)*k2*x^4*k1^2-(1/9)*k2^2*k1*x^3+(17/180)*k1*k2^2*x-(1/12)*k2*k1^2*x^2+(1/6)*k2*k1*x^3-(3/80)*k1^2*k2^2-(1/1440)*k2^4*x^6+(5/576)*k2^4*x^4-(61/1440)*k2^4*x^2-(1/6)*k1*k2*x

 

2.400000000*k2+0.3589208394e-1*k2^4+1.104000000*k2^2+2.713333334*k1*k2+1.904000000*k1^2*k2+0.115520003e-1*k2^3+.939244445*k1*k2^2+.3973226666*k1^2*k2^2+0.1412642116e-1*k1*k2^3+.9218444444*k1^3*k2

(14)

NULL

"cond[1][0]:=theta[0](-1)=0.1, theta[0](1)=1,w[0](-1)=0, w[0](1)=0,u[0](-1)=0, u[0](1)=0:  for j from 1 to N do:  cond[1][j]:=theta[j](-1)=0, theta[j](1)=0,w[j](-1)=0, w[j](1)=0,u[j](-1)=0, u[j](1)=0:  end do:    for i from 0 to N do:  dsolve({equa[1][i],cond[1][i]},theta[i](x));  theta[i](x):=rhs(`%`):    end do:    theta(x):=evalf(simplify(sum(theta[n](x),n=0..N)));  convert(theta(x),'rational'); "

Error, (in dsolve) found the following equations not depending on the unknowns of the input system: {u[0](-1) = 0, u[0](1) = 0, w[0](-1) = 0, w[0](1) = 0}

 

theta[0](x)+theta[1](x)+theta[2](x)+theta[3](x)+theta[4](x)

 

theta[0](x)+theta[1](x)+theta[2](x)+theta[3](x)+theta[4](x)

(15)

``

"condi[1][0]:=theta[0](-1)=0.1, theta[0](1)=1,w[0](-1)=0, w[0](1)=0,u[0](-1)=0, u[0](1)=0,f[0](-1)=1, f[0](1)=1:  for j from 1 to N do:  condi[1][j]:=theta[j](-1)=0, theta[j](1)=0,w[j](-1)=0, w[j](1)=0,u[j](-1)=0, u[j](1)=0, f[j](-1)=0, f[j](1)=0:  end do:    for i from 0 to N do:  dsolve({equat[1][i],condi[1][i]},u[i](x));  u[i](x):=rhs(`%`):    end do:    u(x):=evalf(simplify(sum(u[n](x),n=0..N)))"

Error, (in dsolve) found the following equations not depending on the unknowns of the input system: {f[0](-1) = 1, f[0](1) = 1, w[0](-1) = 0, w[0](1) = 0, theta[0](-1) = 1/10, theta[0](1) = 1}

 

u[0](x)+u[1](x)+u[2](x)+u[3](x)+u[4](x)

(16)

``

"condit[1][0]:=theta[0](-1)=0.1, theta[0](1)=1,w[0](-1)=0, w[0](1)=0,u[0](-1)=0, u[0](1)=0,f[0](-1)=1, f[0](1)=1:  for j from 1 to N do:  condit[1][j]:=theta[j](-1)=0, theta[j](1)=0,w[j](-1)=0, w[j](1)=0,u[j](-1)=0, u[j](1)=0, f[j](-1)=0, f[j](1)=0:  end do:    for i from 0 to N do:  dsolve({equati[1][i],condit[1][i]},w[i](x));  w[i](x):=rhs(`%`):    end do:    w(x):=evalf(simplify(sum(w[n](x),n=0..N)))"

Error, (in dsolve) found the following equations not depending on the unknowns of the input system: {f[0](-1) = 1, f[0](1) = 1, u[0](-1) = 0, u[0](1) = 0, theta[0](-1) = 1/10, theta[0](1) = 1}

 

w[0](x)+w[1](x)+w[2](x)+w[3](x)+w[4](x)

(17)

NULL

``

``


 

Download completecode.mw

Hello,

I got some problems with command solve .

I have to solve 6 equations with 6 unknowns. The problem is that Maple solves this system in a wrong way - the values calculated by the command are bad. I would like to ask if there is any command in Maple while solving the equations that are responsible for possible approximations when solving equations.
In the attachment I will insert the code I used.

https://www.pastiebin.com/5ce6a1943f548

Hi freind,

Anybody knows what happen to this coding?

why this error happens? how can i fix it?

thank you!

Hi everyone,

I was wondering how I could modify the thickness of edges in a graph displayed as a Maple plot through DrawGraph. The point is, the graph comprises 100 vertices and 1000 edges. By default, edge thickness is set as 2 but due to the high number of edges I would like to set edge thickness to1 or even 0. How can I do so?

Here is an example with a random graph:

with(GraphTheory) : with(RandomGraphs) : G := RandomGraph(100, 1000) : DrawGraph(G)

 

Thank you very much

Good day,

I was recently using Maple 2019 for work on a project, and ran into an error. This error (which will be copied and pasted below for others to test) occurs when making assumptions across multiple lines (whether using the additionally function or not) while using IntegrationTools[Change]. It seems that, if during the process a variable that was within both the assumptions is subtracted from itself, the subtraction fails to happen and leaves what effectively equals 0 in the workings, making further workings impossible.

I'm wondering if anyone else is able to reproduce this error? I know the fix for it is to not disjoint the assumptions, but I am curious if others can easily reproduce it or if others have experiences with it!

As promised, below you will find my workings in order to reproduce this error!

Base Error:

restart;
assume(a>0,b>0,b>a,c>0,t>0);
interface(showassumed=0);
F := Int(sqrt(d-a*c^2*t),d=0...infinity);
assume(b>a);
IntegrationTools[Change](F,-a*t*c^2+d=-y,y)


Simple Fix:

restart;
assume(a>0,b>0,b>a,c>0,t>0);
interface(showassumed=0);
F := Int(sqrt(d-a*c^2*t),d=0...infinity);
IntegrationTools[Change](F,-a*t*c^2+d=-y,y)


Error Without Interface Change:

restart;
assume(a>0,b>a,c>0,t>0);
F := Int(sqrt(d-a*c^2*t),d=0...infinity);
assume(b>a);
IntegrationTools[Change](F,-a*t*c^2+d=-y,y)


Error When Using Additionally:

restart;
assume(a>0,b>a,c>0,t>0);
interface(showassumed=0);
F := Int(sqrt(d-a*c^2*t),d=0...infinity);
additionally(b>a);
IntegrationTools[Change](F,-a*t*c^2+d=-y,y)

 

restart;
lambda := 1;
                               1
mu := 1;
                               1
alpha := 1;
                               1
v := 2;
                               2
delta := 1;
                               1
m := 1;
                               1
d := 3;
                               3
l := 1;
                               1
omega := -(1/2)*a*lambda^2-a*m^2+2*a*mu*v-delta*l*m-(1/2)*delta*lambda^2+2*delta*mu*v-l^2*mu-(1/2)*lambda^2*mu+2*mu^2*v-2*a*mu-2*delta*mu-2*mu^2;
                            1      
                            - a + 1
                            2      
a[0] := ((2*d*v-2*d-lambda)*(1/2))*sqrt(2)*sqrt(gamma*(a+delta+mu))/gamma;
                    (1/2)                (1/2)
                 5 2      (gamma (a + 2))     
                 -----------------------------
                            2 gamma           
a[1] := 0;
                               0
a[2] := -(2*(1/2))*sqrt(2)*sqrt(gamma*(a+delta+mu))*(d^2*v-d^2-d*lambda+mu)/gamma;
                     (1/2)                (1/2)
                  7 2      (gamma (a + 2))     
                - -----------------------------
                              gamma            
Omega := lambda^2-4*mu*v+4*mu;
                               -3
H := (-lambda+sqrt(-Omega)*tan((1/2)*sqrt(-Omega)*xi))/(2*(v-1));
                  1   1  (1/2)    /1  (1/2)   \
                - - + - 3      tan|- 3      xi|
                  2   2           \2          /
u := a[0]+a[1]*(d+H)+a[2]/(d+H);
              (1/2)                (1/2)
           5 2      (gamma (a + 2))     
           -----------------------------
                      2 gamma           

                       (1/2)                (1/2)    
                    7 2      (gamma (a + 2))         
              - -------------------------------------
                      /5   1  (1/2)    /1  (1/2)   \\
                gamma |- + - 3      tan|- 3      xi||
                      \2   2           \2          //

eta := -l*y-m*x+omega*t;
                               /1      \  
                      -y - x + |- a + 1| t
                               \2      /  
u := a[0]+a[1]*(d+H)+a[2]/(d+H);
              (1/2)                (1/2)
           5 2      (gamma (a + 2))     
           -----------------------------
                      2 gamma           

                       (1/2)                (1/2)    
                    7 2      (gamma (a + 2))         
              - -------------------------------------
                      /5   1  (1/2)    /1  (1/2)   \\
                gamma |- + - 3      tan|- 3      xi||
                      \2   2           \2          //

f := diff(u, xi);
                                  /                      2\
       (1/2)                (1/2) |3   3    /1  (1/2)   \ |
    7 2      (gamma (a + 2))      |- + - tan|- 3      xi| |
                                  \4   4    \2          / /
    -------------------------------------------------------
                                                 2         
                  /5   1  (1/2)    /1  (1/2)   \\          
            gamma |- + - 3      tan|- 3      xi||          
                  \2   2           \2          //          
S := diff(u, xi);
                                  /                      2\
       (1/2)                (1/2) |3   3    /1  (1/2)   \ |
    7 2      (gamma (a + 2))      |- + - tan|- 3      xi| |
                                  \4   4    \2          / /
    -------------------------------------------------------
                                                 2         
                  /5   1  (1/2)    /1  (1/2)   \\          
            gamma |- + - 3      tan|- 3      xi||          
                  \2   2           \2          //          
xi := x+y-(-2*alpha*m-delta*l-delta*m-2*l*mu)*t;
                          x + y + 6 t
eq := (-omega-a*m*m-delta*l*m-mu*l*l)*u-(gamma*u*u)*u+(a+delta+mu)*S;
            /   (1/2)                (1/2)
/  3      \ |5 2      (gamma (a + 2))     
|- - a - 3| |-----------------------------
\  2      / |           2 gamma           
            |                             
            \                             

                 (1/2)                (1/2)          \         /
              7 2      (gamma (a + 2))               |         |
   - ------------------------------------------------| - gamma |
           /5   1  (1/2)    /1  (1/2)              \\|         |
     gamma |- + - 3      tan|- 3      (x + y + 6 t)|||         |
           \2   2           \2                     ///         \

     (1/2)                (1/2)
  5 2      (gamma (a + 2))     
  -----------------------------
             2 gamma           

                 (1/2)                (1/2)          \     
              7 2      (gamma (a + 2))               |     
   - ------------------------------------------------|^3 + 
           /5   1  (1/2)    /1  (1/2)              \\|     
     gamma |- + - 3      tan|- 3      (x + y + 6 t)|||     
           \2   2           \2                     ///     

                                                    /          
                          1                         |          
  ------------------------------------------------- |7 (a + 2) 
                                                  2 \          
        /5   1  (1/2)    /1  (1/2)              \\             
  gamma |- + - 3      tan|- 3      (x + y + 6 t)||             
        \2   2           \2                     //             

                              /                                 2
   (1/2)                (1/2) |3   3    /1  (1/2)              \ 
  2      (gamma (a + 2))      |- + - tan|- 3      (x + y + 6 t)| 
                              \4   4    \2                     / 

  \\
  ||
  ||
  //
value(%);
            /   (1/2)                (1/2)
/  3      \ |5 2      (gamma (a + 2))     
|- - a - 3| |-----------------------------
\  2      / |           2 gamma           
            |                             
            \                             

                 (1/2)                (1/2)          \         /
              7 2      (gamma (a + 2))               |         |
   - ------------------------------------------------| - gamma |
           /5   1  (1/2)    /1  (1/2)              \\|         |
     gamma |- + - 3      tan|- 3      (x + y + 6 t)|||         |
           \2   2           \2                     ///         \

     (1/2)                (1/2)
  5 2      (gamma (a + 2))     
  -----------------------------
             2 gamma           

                 (1/2)                (1/2)          \     
              7 2      (gamma (a + 2))               |     
   - ------------------------------------------------|^3 + 
           /5   1  (1/2)    /1  (1/2)              \\|     
     gamma |- + - 3      tan|- 3      (x + y + 6 t)|||     
           \2   2           \2                     ///     

                                                    /          
                          1                         |          
  ------------------------------------------------- |7 (a + 2) 
                                                  2 \          
        /5   1  (1/2)    /1  (1/2)              \\             
  gamma |- + - 3      tan|- 3      (x + y + 6 t)||             
        \2   2           \2                     //             

                              /                                 2
   (1/2)                (1/2) |3   3    /1  (1/2)              \ 
  2      (gamma (a + 2))      |- + - tan|- 3      (x + y + 6 t)| 
                              \4   4    \2                     / 

  \\
  ||
  ||
  //

simplify(%);
Error, (in simplify/tools/_zn) too many levels of recursion

Q := exp(I*(-y-x+((1/2)*a+1)*t))*((5/2)*sqrt(2)*sqrt(gamma*(a+2))/gamma-7*sqrt(2)*sqrt(gamma*(a+2))/(gamma*(5/2+(1/2)*sqrt(3)*tan((1/2)*sqrt(3)*(x+y+6*t)))));
                                /   (1/2)                (1/2)
     /  /         /1      \  \\ |5 2      (gamma (a + 2))     
  exp|I |-y - x + |- a + 1| t|| |-----------------------------
     \  \         \2      /  // |           2 gamma           
                                |                             
                                \                             

                   (1/2)                (1/2)          \
                7 2      (gamma (a + 2))               |
     - ------------------------------------------------|
             /5   1  (1/2)    /1  (1/2)              \\|
       gamma |- + - 3      tan|- 3      (x + y + 6 t)|||
             \2   2           \2                     ///
                                /   (1/2)                (1/2)
     /  /         /1      \  \\ |5 2      (gamma (a + 2))     
  exp|I |-y - x + |- a + 1| t|| |-----------------------------
     \  \         \2      /  // |           2 gamma           
                                |                             
                                \                             

                   (1/2)                (1/2)          \
                7 2      (gamma (a + 2))               |
     - ------------------------------------------------|
             /5   1  (1/2)    /1  (1/2)              \\|
       gamma |- + - 3      tan|- 3      (x + y + 6 t)|||
             \2   2           \2                     ///
plot3d(Re(Q), x = -40 .. -37, y = -40 .. -37, t = -10 .. 10);
 

Dear Maple friends~

Recently I am thinking a question about how to use Maple to prove an equation based on a known partial differential equationand its boundary conditions.

Although I can Prove it with hand computation ,it still has some difficulty and it will be really hard if its partial differential equation become more complex(As a matter of fact, it will happen).So I think of Maple and want to take advantage of computer.However,I get few ideas how to realize it .The details are as follows:

alias(u=u(x,t)):
pde:=diff(u,t)-diff(u,x$2,t)+4*u^2*diff(u,x)=3*u*diff(u,x)*diff(u,x$2)+u^2*diff(u,x$3);
N:=5;#actually N can be any positive integer!
bcs:=eval(u,x=-infinity)=0,seq(eval(diff(u,x$ha),x=-infinity)=0,ha=1..N),eval(u,x=infinity)=0,seq(eval(diff(u,x$ha),x=infinity)=0,ha=1..N);
E:=Int(u^4+2*u^2*diff(u,x)^2-diff(u,x)^4/3,x=-infinity..infinity);

#try to prove the following equation
diff(E,t)=0

The written proof is as follows:

Therfore,I submit such a problem and look forward your solutions and suggestions sincerely~

Hy everyone,

i'm writing a code wich ends with an Explore including multiple parameters (8) ; my problem is that if i want to change every parameter, elaborating time becames too long, because Maple evaluates every variation of every parameter every time.
I'm looking for something like a button, which works like this: when i change parameters in explore maple doesn't evaluate the function, and when i click the button maple evaluates one time all the changed parameters.

Any suggestion? 

Thanks in advance

Please help me for removing an error in my code.

Thank you


 

"   restart:     NL:=960:    LL:=4:      BB:=0.6 :  T:=16:    MM:=NL*(LL+1):          for  NC  from 0 by 1 to MM-1  do       S:=BB+(2*Pi*NC/T)*I;          powerFactor := 0.05 * (sqrt(2.0) - 1.202081528);     powerTerm := sqrt(S)*sqrt(49*S^(2)+280*S+800)/sqrt(S+4);       preFactor := 1/((exp(sqrt(2.0)*powerTerm/10.0)-1.0)*S);       XS(NC+1):= preFactor * ((-exp(-powerFactor*powerTerm) + exp(powerFactor*powerTerm)) * exp(sqrt(2.0)*powerTerm/20.0));    end  do;    for  timeCounter from 0 by 1 to  NL-1  do     totalTerm:=0;     for KK from 0 to NL-1 do        for L from 0 to LL do           Term1:=Re(XS(KK+L*NL+1))+I*(Im(XS(KK+L*NL+1)));           Term2:=exp((timeCounter*KK*2*Pi/NL)*I);           totalTerm:=totalTerm+Term1*Term2;        end do     end do     XT(timeCounter+1):=((2.0/T)*exp(BB*timeCounter*T/NL)*(-0.5*Re(XS(1))+Re(totalTerm)));     TT(timeCounter+1):=(timeCounter*T)/NL;         end do    "

Error, invalid loop statement termination

"   restart:    NL:=960:  LL:=4:  BB:=0.6 :  T:=16:    MM:=NL*(LL+1):       for NC  from 0 by 1 to MM-1  do     S:=BB+(2*Pi*NC/T)*I;    powerFactor := 0.05 * (sqrt(2.0) - 1.202081528);   powerTerm := sqrt(S)*sqrt(49*S^2+280*S+800)/sqrt(S+4);    preFactor := 1/((exp(sqrt(2.0)*powerTerm/10.0)-1.0)*S);     XS(NC+1):= preFactor * ((-exp(-powerFactor*powerTerm) + exp(powerFactor*powerTerm)) * exp(sqrt(2.0)*powerTerm/20.0));    end  do;    for timeCounter from 0 by 1 to NL-1  do  totalTerm:=0;     for KK from 0 to NL-1 do        for L from 0 to LL do  Term1:=Re(XS(KK+L*NL+1))+I*(Im(XS(KK+L*NL+1)));  Term2:=exp((timeCounter*KK*2*Pi/NL)*I);  totalTerm:=totalTerm+Term1*Term2;        end do     end do   XT(timeCounter+1):=((2.0/T)*exp(BB*timeCounter*T/NL)*(-0.5*Re(XS(1))+Re(totalTerm)));   TT(timeCounter+1):=(timeCounter*T)/NL;      end do    "

 

``

``


 

Download

 

Hello,

How I can write a code for the determination of Laplacian in a new form that is introduced in the maple code (First line).

Thank you.

FOR

Maple Worksheet - Error

Failed to load the worksheet //convert/FOR
 

Download FOR

 

 

How may I please use maple tools in communication engineering applications. May I please have any example model

Hi,

There seems to be an issue with pdsolve, which is similar to https://mapleprimes.com/questions/222498-Issues-With-Pdsolve.

pdsolve([diff(u(x, t), t) = diff(u(x, t), x, x), u(x, 0) = 1, u(0, t) = 0, u(2, t) = 0]); # works

pdsolve([diff(u(t, x), t) = diff(u(t, x), x, x), u(0, x) = 1, u(t, 0) = 0, u(t, 2) = 0]); # swapped arguments, works

pdsolve([diff(u(x, t), t) = diff(u(x, t), x, x), u(x, 0) = 1, u(-1, t) = 0, u(1, t) = 0]); # translate by -1, works

pdsolve([diff(u(t, x), t) = diff(u(t, x), x, x), u(0, x) = 1, u(t, -1) = 0, u(t, 1) = 0]); # swapped arguments and translate by -1, doesn't work

The solution for the last example doesn't incorporate the initial condition correctly, while it is the same as the third example (except for swapped arguments). Not sure if this is still a problem in Maple 2019, though.

restart;
with(Physics);
with(LinearAlgebra);
N := 4;


Cf := Matrix(6, 6, (z, p) -> C[z, p, 1], shape = symmetric);
sigma[1] := Vector(6, [sigma[1, 1, 1], sigma[2, 2, 1], sigma[3, 3, 1], sigma[1, 2, 1], sigma[1, 3, 1], sigma[2, 3, 1]]);
varepsilon[1] := Vector(6, [varepsilon[1, 1, 1], varepsilon[2, 2, 1], varepsilon[3, 3, 1], gamma[1, 2, 1], gamma[1, 3, 1], gamma[2, 3, 1]]);
sigma[1] := Cf . (varepsilon[1]);





for i from 2 to N do
    C[i] := Matrix(6, 6, (z, p) -> C[z, p, i], shape = symmetric);
    sigma[i] := Vector(6, [sigma[1, 1, i], sigma[2, 2, i], sigma[3, 3, i], sigma[1, 2, i], sigma[1, 3, i], sigma[2, 3, i]]);
    varepsilon[i] := Vector(6, [varepsilon[1, 1, i], varepsilon[2, 2, i], varepsilon[3, 3, i], gamma[1, 2, i], gamma[1, 3, i], gamma[2, 3, i]]);
    sigma[i] := (C[i]) . (varepsilon[i]);
end do;



B[1] := 0;

for i to N do
    Parameters(epsilon11c, C[1, 1, i], C[1, 2, i], C[2, 2, i], C[2, 3, i], R[i], A[i], B[i + 1], P);
end do;



g[1](r);
ux[1] := (x, r) -> epsilon[1][1]*x + g[1](r);
ur[1] := r -> A[1]*r + B[1]*1/r;
varepsilon[1][1] := epsilon11c;
varepsilon[1][2] := r -> (A[1]*r + B[1]*1/r)*1/r;
varepsilon[1][3] := r -> diff(ur[1](r), r);
varepsilon[1][3](R[2]);



for i from 2 to N - 1 do 
g[i](r); 
ux[i] := (x, r) -> epsilon[i][1]*x + g[i](r); 
ur[i] := r -> A[i]*r + B[i]*1/r; 
varepsilon[i][1] := epsilon11c; 
varepsilon[i][2] := r -> (A[i]*r + B[i]*1/r)*1/r; 
varepsilon[i][3] := r -> diff(ur[i](r), r); 
varepsilon[i][2](r); i;
end do;
i;
varepsilon[2][2](r);

Hi everyone,

 

I am currently writing a code on maple and I am finding difficulties in this section.

When I define the functions this way, the result I get from the loop "for" for varepsilon[i][2](r) is the same and doesnt depend on i value. I also tried to define it another way that would give me different results but I would end up with being unable to replace the variable "r" with its values (I would get r(R2)).

I would be grateful if you could advice me with this matter.

Thank you in advance.

How to do the partition of integer?
If I input:
>Partition(10,2)
then output is:
>[[1, 9], [2, 8], [3, 7], [4, 6],[5,5]]
-------------------------------------------------
"10" is the number that I want to part,and "2" means that there are "two" number's sum = 10
Sorry my Engilsh is not good,but I really need help.
no other restriction!!

First 683 684 685 686 687 688 689 Last Page 685 of 2425