KIRAN SAJJAN

40 Reputation

7 Badges

2 years, 192 days

MaplePrimes Activity


These are replies submitted by KIRAN SAJJAN

surface_EX1.mw  @tomleslie

I m not able to find my error. I want to draw the Two-D plots what are the mistake check it sir.

I want draw like below mentioned plots

Thank you

@KIRAN SAJJAN

These vales i needed i m getting wrong values 

Here I m getting wrong answer for f(x), Theta(x), and phi(x)
 

``

restart:

PDEtools[declare](f(x), prime = x)

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

 

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

(1)

PDEtools[declare](Theta(x), prime = x)

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

 

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

(2)

PDEtools[declare](Phi(x), prime = x)

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

 

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

(3)

N := 3; M := .1; Kp := .1; Gr := 0.1e-1; Gc := 0.1e-1; Pr := 1; S := 0.1e-1; Sc := .78; Kc := 0.1e-1; La := 1

3

 

.1

 

.1

 

0.1e-1

 

0.1e-1

 

1

 

0.1e-1

 

.78

 

0.1e-1

 

1

(4)

``

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)

(5)

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)

(6)

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

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

(7)

HPMEq1 := (1-p)*(diff(f(x), x, x, x))+p*(diff(f(x), x, x, x)+(1/2)*(diff(f(x), x, x))*f(x)-(M^2+Kp)*(diff(f(x), x)-La)+Gr*Theta(x)+Gc*Phi(x))

(1-p)*(diff(diff(diff(f[0](x), x), x), x)+p*(diff(diff(diff(f[1](x), x), x), x))+p^2*(diff(diff(diff(f[2](x), x), x), x))+p^3*(diff(diff(diff(f[3](x), x), x), x)))+p*(diff(diff(diff(f[0](x), x), x), x)+p*(diff(diff(diff(f[1](x), x), x), x))+p^2*(diff(diff(diff(f[2](x), x), x), x))+p^3*(diff(diff(diff(f[3](x), x), x), x))+(1/2)*(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)))*(f[0](x)+p*f[1](x)+p^2*f[2](x)+p^3*f[3](x))-.11*(diff(f[0](x), x))-.11*p*(diff(f[1](x), x))-.11*p^2*(diff(f[2](x), x))-.11*p^3*(diff(f[3](x), x))+.11+0.1e-1*Theta[0](x)+0.1e-1*p*Theta[1](x)+0.1e-1*p^2*Theta[2](x)+0.1e-1*p^3*Theta[3](x)+0.1e-1*Phi[0](x)+0.1e-1*p*Phi[1](x)+0.1e-1*p^2*Phi[2](x)+0.1e-1*p^3*Phi[3](x))

(8)

HPMEq2 := (1-p)*(diff(Theta(x), x, x))/Pr+p*((diff(Theta(x), x, x))/Pr+(1/2)*(diff(Theta(x), x))*f(x)+S*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*(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))+(1/2)*(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)))*(f[0](x)+p*f[1](x)+p^2*f[2](x)+p^3*f[3](x))+0.1e-1*Theta[0](x)+0.1e-1*p*Theta[1](x)+0.1e-1*p^2*Theta[2](x)+0.1e-1*p^3*Theta[3](x))

(9)

HPMEq3 := (1-p)*(diff(Phi(x), x, x))/Sc+p*((diff(Phi(x), x, x))/Sc+(1/2)*(diff(Phi(x), x))*f(x)+Kc*Phi(x))

1.282051282*(1-p)*(diff(diff(Phi[0](x), x), x)+p*(diff(diff(Phi[1](x), x), x))+p^2*(diff(diff(Phi[2](x), x), x))+p^3*(diff(diff(Phi[3](x), x), x)))+p*(1.282051282*(diff(diff(Phi[0](x), x), x))+1.282051282*p*(diff(diff(Phi[1](x), x), x))+1.282051282*p^2*(diff(diff(Phi[2](x), x), x))+1.282051282*p^3*(diff(diff(Phi[3](x), x), x))+(1/2)*(diff(Phi[0](x), x)+p*(diff(Phi[1](x), x))+p^2*(diff(Phi[2](x), x))+p^3*(diff(Phi[3](x), x)))*(f[0](x)+p*f[1](x)+p^2*f[2](x)+p^3*f[3](x))+0.1e-1*Phi[0](x)+0.1e-1*p*Phi[1](x)+0.1e-1*p^2*Phi[2](x)+0.1e-1*p^3*Phi[3](x))

(10)

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

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

 

diff(diff(diff(f[1](x), x), x), x)+(1/2)*(diff(diff(f[0](x), x), x))*f[0](x)-.11*(diff(f[0](x), x))+.11+0.1e-1*Theta[0](x)+0.1e-1*Phi[0](x) = 0

 

diff(diff(diff(f[2](x), x), x), x)+(1/2)*(diff(diff(f[0](x), x), x))*f[1](x)+(1/2)*(diff(diff(f[1](x), x), x))*f[0](x)-.11*(diff(f[1](x), x))+0.1e-1*Theta[1](x)+0.1e-1*Phi[1](x) = 0

 

diff(diff(diff(f[3](x), x), x), x)+(1/2)*(diff(diff(f[0](x), x), x))*f[2](x)+(1/2)*(diff(diff(f[1](x), x), x))*f[1](x)+(1/2)*(diff(diff(f[2](x), x), x))*f[0](x)-.11*(diff(f[2](x), x))+0.1e-1*Theta[2](x)+0.1e-1*Phi[2](x) = 0

(11)

for i from 0 to N do equ[2][i] := coeff(HPMEq2, p, i) = 0 end do

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

 

diff(diff(Theta[1](x), x), x)+(1/2)*(diff(Theta[0](x), x))*f[0](x)+0.1e-1*Theta[0](x) = 0

 

diff(diff(Theta[2](x), x), x)+(1/2)*(diff(Theta[0](x), x))*f[1](x)+(1/2)*(diff(Theta[1](x), x))*f[0](x)+0.1e-1*Theta[1](x) = 0

 

diff(diff(Theta[3](x), x), x)+(1/2)*(diff(Theta[0](x), x))*f[2](x)+(1/2)*(diff(Theta[1](x), x))*f[1](x)+(1/2)*(diff(Theta[2](x), x))*f[0](x)+0.1e-1*Theta[2](x) = 0

(12)

for i from 0 to N do equ[3][i] := coeff(HPMEq3, p, i) = 0 end do

1.282051282*(diff(diff(Phi[0](x), x), x)) = 0

 

1.282051282*(diff(diff(Phi[1](x), x), x))+(1/2)*(diff(Phi[0](x), x))*f[0](x)+0.1e-1*Phi[0](x) = 0

 

1.282051282*(diff(diff(Phi[2](x), x), x))+(1/2)*(diff(Phi[0](x), x))*f[1](x)+(1/2)*(diff(Phi[1](x), x))*f[0](x)+0.1e-1*Phi[1](x) = 0

 

1.282051282*(diff(diff(Phi[3](x), x), x))+(1/2)*(diff(Phi[0](x), x))*f[2](x)+(1/2)*(diff(Phi[1](x), x))*f[1](x)+(1/2)*(diff(Phi[2](x), x))*f[0](x)+0.1e-1*Phi[2](x) = 0

(13)

cond[1][0] := f[0](0) = 0, (D(f[0]))(0) = 0, Theta[0](0) = 1, Phi[0](0) = 1, Theta[0](5) = 0, Phi[0](5) = 0, (D(f[0]))(5) = 1; for j to N do cond[1][j] := f[j](0) = 0, (D(f[j]))(0) = 0, Theta[j](0) = 0, Phi[j](0) = 0, Theta[j](5) = 0, Phi[j](5) = 0, (D(f[j]))(5) = 0 end do

ans := dsolve({cond[1][0], equ[1][0], equ[2][0], equ[3][0]})

{Phi[0](x) = -(1/5)*x+1, Theta[0](x) = -(1/5)*x+1, f[0](x) = (1/10)*x^2}

(14)

for k to 3 do ans := `union`(ans, dsolve({cond[1][k], (eval({equ[1][k], equ[2][k], equ[3][k]}, ans))[]})) end do; for j from 0 to 3 do f[j](x) = eval(f[j](x), `~`[evalf](ans)) end do; for j from 0 to 3 do Theta[j](x) = eval(Theta[j](x), `~`[evalf](ans)) end do; for j from 0 to 3 do Phi[j](x) = eval(Phi[j](x), `~`[evalf](ans)) end do

Phi[3](x) = 0.1061288360e-7*x^10-0.2402855688e-7*x^9+0.7248453644e-6*x^8-0.9648079535e-5*x^7+0.4540935411e-6*x^6-0.4470852750e-5*x^5+0.5843971476e-3*x^4+0.1037090128e-3*x^3+0.8513437276e-2*x

(15)

"Theta(x):= evalf(eval(Theta(x), ans));  convert(Theta(x),'rational'); subs(x=1,Theta(x));"

0.1561249804e-1

(16)

"f(x):= evalf(eval(f(x), ans));  convert(f(x),'rational'); subs(x=1,f(x))"

-0.1358056204e-1

(17)

"Phi(x):= evalf(eval(Phi(x), ans));  convert(Phi(x),'rational'); subs(x=1, Phi(x));"

0.9188590027e-2

(18)

``


 

Download ham_final-1.mw

@KIRAN SAJJAN

Here the following image

1 2 3 4 5 6 Page 6 of 6