Question: Please help me with this DTM code

restart; Digits := 10; Ha := 2; R := 2; `θr` := .5; Rt := 1; B := 1.5; Xi := 0; U[0] := 0; U[1] := alpha; U[2] := -6+(1/16)*Rt*Xi; U[3] := (1/6)*beta; Theta[0] := -(1/2)*Rt Theta[1]:=phi:   delta:=(k)->`if`(k=0, 1,0);   for k  from 0 to 20do    U[k+4]:=((Ha^(2)+R)*U[k+2]+Xi*Theta[k+2])/(4(k+3)*(k+4)) 

Theta[k+2] := (-4*R*`θr`*(`θr`*Theta[k]+1)^2*(sum((i+1)*Theta[i+1]*(k-i+1)*Theta[k-i+1], i = 0 .. k))-B*(sum((i+1)*U[i+1]*(k-i+1)*U[k-i+1], i = 0 .. k))+(1/4)*Ha^2*B*(sum(U[i]*(k-i)*U[k-i], i = 0 .. k)))/((1+(4/3)*R*(`θr`*Theta[k]+1)^3)*(k+1)*(k+2))

 od:  u:=0:  theta:=0:  for k from 0 to 20 do  u:=u+U[k]*y^k:  theta:=theta+Theta[k]*y^k:  od:  print(expand(u)):

with(numapprox); pade(u, y, [3, 3])

pade(diff(u, `$`(y, 2)), y, [3, 3])

pade(theta, y, [3, 3])

solve({limit(pade(theta, y, [3, 3]), y = 1) = (1/2)*Rt, limit(pade(u, y, [3, 3]), y = 1) = 0, limit(pade(diff(u, `$`(y, 2)), y, [3, 3]), y = 1) = -12-(1/8)*Rt*Xi}, [alpha, beta, phi])

Please Wait...