adel-00

125 Reputation

9 Badges

11 years, 184 days

MaplePrimes Activity


These are questions asked by adel-00

H all expert

first this Expression 

ni := diff(Q(x, t), t)+a*Q*(x, t)*(diff(Q(x, t), x))+b*(diff(Q(x, t), t$3))+d*(diff(Q(x, t), t$5)) = 0

then I want to solve  diff(Q(x, t), t$5) 

diff(Q(x, t), t$5) = solve(ni, diff(Q(x, t), t$5))#eq2

p (x, t) :=H1(t)*Q(x*H2(t), H3(t)) #assumption 

k := diff(p(x, t), t)+a*p(x, t)*(diff(p(x, t), x))+diff(p(x, t), t$3)+d*(diff(p(x, t), t$5))+c*p(x, t) #eq3

r := subs(diff(Q(x, t), t$5), k) #subs eq2 in eq3

i recived error

SUBS1.mw

restart:

sys:={-diff(v(x,t),t)+0.5*p*diff(u(x,t),x,x)+q*u(x,t)*(u(x,t)^2+v(x,t)^2)=0,diff(u(x,t),t)+0.5*p*diff(v(x,t),x,x)+q*v(x,t)*(u(x,t)^2+v(x,t)^2)=0};
        /                      /  2         \
        |/ d         \         | d          |
sys := < |--- u(x, t)| + 0.5 p |---- v(x, t)|
        |\ dt        /         |   2        |
        \                      \ dx         /

               /       2          2\       / d         \
   + q v(x, t) \u(x, t)  + v(x, t) / = 0, -|--- v(x, t)|
                                           \ dt        /

           /  2         \                                      \ 
           | d          |             /       2          2\    | 
   + 0.5 p |---- u(x, t)| + q u(x, t) \u(x, t)  + v(x, t) / = 0 >
           |   2        |                                      | 
           \ dx         /                                      / 
eq1 := diff(u(x,t),t) = u__t(x,t):
eq2 := diff(v(x,t),t) = v__t(x,t):

sys_tmp := subs(eq1, eq2, sys):

sys_new := sys_tmp union {eq1, eq2}:

Boundary conditions:
bc :=
    u(0,t) = 2,
    v(0,t) = 0;
                 bc := u(0, t) = 2, v(0, t) = 0
Initial conditions:
ic :=
    u(x,0) = tanh(2*Pi),
    v(x,0) = tanh(2*Pi),
    u__t(x,0) = 0,
    v__t(x,0) = 0;
 
ic := u(x, 0) = tanh(2 Pi), v(x, 0) = tanh(2 Pi), u__t(x, 0) = 0, 

  v__t(x, 0) = 0
Solve the system:
pdsol := pdsolve(subs(p=1, q=0.5, sys_new), {ic, bc}, numeric);

Hi all,

how to use semilogplot here

plots[odeplot](res1, [[t, N(t)]], 0.1e-2 .. 1000, axes = boxed, tickmarks = [3, 2], color = red, thickness = 1, linestyle = solid, titlefont = [Helvetica, roman, 18], labeldirections = [horizontal, vertical], labelfont = [Helvetica, roman, 24])

Hi 

I forgot how to display the output ar an array i.e. (r,u(r)) (table of data)

I am sure i will find answers here.

a:=-0.1:alpha:=0.2:

dsys:={diff(u(r),r,r)+((1-alpha)/r+r^(alpha-2))*diff(u(r),r)=a};

res1:=dsolve(dsys union {u(0.05)=0,u(1)=0},numeric);

 

 

When a and b are from 0 to 1 it works!! but from -1 to -0.05 not i wonder why?

a1:=1.9:alpha:=0.2:
ode1 := diff( y(x), x$2 ) + x^(-1)* diff( y(x), x )  = 2*a1*(1+x^(2-alpha)/((2-alpha)^2*GAMMA(2-alpha))):
    bc1 := y(0)=subs(r=-0.05,a1/4*(r^2-1)), y(-1)=0:
a:=-1:b:=-0.05:
N := 20:h := (b-a)/N:
X := k -> a+k*h: 
'X'[k] = X(k):
Yp  := k -> (y[k+1]-y[k-1])/2/((1+alpha)*GAMMA(1+alpha)*h^(alpha)):Ypp := k -> (y[k+1]-2*y[k]+y[k-1])/((2-alpha)*GAMMA(2-alpha)*(h^(2-alpha))^2):
for k from 1 to N-1 do
eq[k] := eval( ode1,
                    {x=X(k), y(x)=y[k],
                     diff(y(x),x)=Yp(k),
                     diff(y(x),x$2)=Ypp(k)} ):
    end do:

eq[0] := y[0] = rhs(bc1[1]):
eq[N] := y[N] = rhs(bc1[2]):
    fd_sol1 := fsolve( {seq( eq[k], k=0..N )}, {seq( y[k], k=0..N )} ):
fd_table1 := eval( seq([X(k),y[k]],k=0..N), fd_sol1 ):Matrix([fd_table1]):
infolevel[dsolve] := 3:
#exact_sol1 := combine(dsolve( { ode1, bc1 }, y(x) )):
infolevel[dsolve] := 0:

P1:=plot([fd_table1], x=a..b,color=[black], linestyle = solid, symbolsize=16,axes=boxed);

 

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