Items tagged with dsolve dsolve Tagged Items Feed

 

DEAR SIR

ANYONE CAN HELP TO COMPUTE TIME IN DSOLVE COMMAND?

restart

with(plots)

Nb := 0.1e-4; Nt := 0.1e-4; Sc := 3.0; Sb := 15; Pe := 1; Bi := .5; Pr := 6.8; c[4] := 0; c[6] := .3; c[8] := .4; k[1] := 0; k[2] := 1; k[3] := 0; Un := .1; M := .5

Eq1 := (101-100*lambda)*(1+c[2]*phi(eta))*(diff(f(eta), `$`(eta, 3)))+(diff(f(eta), `$`(eta, 2)))*(f(eta)+g(eta)+c[2]*(diff(phi(eta), eta)))-(diff(f(eta), eta))^2-M*(diff(f(eta), eta)-k[2])+k[2]+Un*(k[2]-(1/2)*eta*(diff(f(eta), `$`(eta, 2)))-(diff(f(eta), eta))) = 0

(101-100*lambda)*(1+c[2]*phi(eta))*(diff(diff(diff(f(eta), eta), eta), eta))+(diff(diff(f(eta), eta), eta))*(f(eta)+g(eta)+c[2]*(diff(phi(eta), eta)))-(diff(f(eta), eta))^2-.6*(diff(f(eta), eta))+1.6-0.5000000000e-1*eta*(diff(diff(f(eta), eta), eta)) = 0

(1)

Eq2 := (101-100*lambda)*(1+c[2]*phi(eta))*(diff(g(eta), `$`(eta, 3)))+(diff(g(eta), `$`(eta, 2)))*(f(eta)+g(eta)+c[2]*(diff(phi(eta), eta)))-(diff(g(eta), eta))^2-M*(diff(g(eta), eta)-k[2])+k[2]+Un*(k[2]-(1/2)*eta*(diff(g(eta), `$`(eta, 2)))-(diff(g(eta), eta))) = 0

(101-100*lambda)*(1+c[2]*phi(eta))*(diff(diff(diff(g(eta), eta), eta), eta))+(diff(diff(g(eta), eta), eta))*(f(eta)+g(eta)+c[2]*(diff(phi(eta), eta)))-(diff(g(eta), eta))^2-.6*(diff(g(eta), eta))+1.6-0.5000000000e-1*eta*(diff(diff(g(eta), eta), eta)) = 0

(2)

Eq3 := (1+c[4]*phi(eta))*(diff(theta(eta), `$`(eta, 2)))+Pr*(diff(theta(eta), eta))*(f(eta)+g(eta))+Nb*Pr*(diff(theta(eta), eta))*(diff(phi(eta), eta))*(1+c[6]*(2*phi(eta)+1))+Nt*Pr*(diff(theta(eta), eta))^2+c[4]*(diff(theta(eta), eta))*(diff(phi(eta), eta))-(1/2)*Pr*eta*Un*(diff(theta(eta), eta)) = 0

diff(diff(theta(eta), eta), eta)+6.8*(diff(theta(eta), eta))*(f(eta)+g(eta))+0.68e-4*(diff(theta(eta), eta))*(diff(phi(eta), eta))*(1.3+.6*phi(eta))+0.68e-4*(diff(theta(eta), eta))^2-.3400000000*eta*(diff(theta(eta), eta)) = 0

(3)

Eq4 := (1+c[6]*phi(eta))*(diff(phi(eta), `$`(eta, 2)))+Sc*(f(eta)+g(eta))*(diff(phi(eta), eta))+c[6]*(diff(phi(eta), eta))^2+Nt*(diff(theta(eta), `$`(eta, 2)))/Nb-(1/2)*Sc*eta*Un*(diff(phi(eta), eta)) = 0

(1+.3*phi(eta))*(diff(diff(phi(eta), eta), eta))+3.0*(f(eta)+g(eta))*(diff(phi(eta), eta))+.3*(diff(phi(eta), eta))^2+1.000000000*(diff(diff(theta(eta), eta), eta))-.1500000000*eta*(diff(phi(eta), eta)) = 0

(4)

Eq5 := (1+c[8]*phi(eta))*(diff(chi(eta), `$`(eta, 2)))+c[8]*(diff(phi(eta), eta))*(diff(chi(eta), eta))-Pe*(chi(eta)*(diff(phi(eta), `$`(eta, 2)))+(diff(phi(eta), eta))*(diff(chi(eta), eta)))+Sb*(diff(chi(eta), eta))*(f(eta)+g(eta))-(1/2)*Sb*eta*Un*(diff(chi(eta), eta)) = 0

(1+.4*phi(eta))*(diff(diff(chi(eta), eta), eta))-.6*(diff(phi(eta), eta))*(diff(chi(eta), eta))-chi(eta)*(diff(diff(phi(eta), eta), eta))+15*(diff(chi(eta), eta))*(f(eta)+g(eta))-.7500000000*eta*(diff(chi(eta), eta)) = 0

(5)

Vc[2] := [.2, .3, .4]

etainf := 1.85

bcs := (D(f))(0) = k[1], (D(g))(0) = k[3], f(0) = 0, g(0) = 0, (D(theta))(0) = -Bi*(1-theta(0))/(1+c[4]*phi(0)), Nb*(D(phi))(0)*(1+c[6]*(2*phi(0)+1))+Nt*(D(theta))(0) = 0, chi(0) = 1, (D(f))(etainf) = k[2], (D(g))(etainf) = k[2], theta(etainf) = 0, phi(etainf) = 0, chi(etainf) = 0

(D(f))(0) = 0, (D(g))(0) = 0, f(0) = 0, g(0) = 0, (D(theta))(0) = -.5+.5*theta(0), 0.1e-4*(D(phi))(0)*(1.3+.6*phi(0))+0.1e-4*(D(theta))(0) = 0, chi(0) = 1, (D(f))(1.85) = 1, (D(g))(1.85) = 1, theta(1.85) = 0, phi(1.85) = 0, chi(1.85) = 0

(6)

dsys := {Eq1, Eq2, Eq3, Eq4, Eq5, bcs}

for i to 3 do c[2] := Vc[2][i]; dsol[i] := dsolve(dsys, numeric, continuation = lambda); print(c[2]); print(dsol[i](0)) end do

.2

 

[eta = 0., chi(eta) = HFloat(1.0), diff(chi(eta), eta) = HFloat(3.888290578689045), f(eta) = HFloat(0.0), diff(f(eta), eta) = HFloat(0.0), diff(diff(f(eta), eta), eta) = HFloat(2.244199282192492), g(eta) = HFloat(0.0), diff(g(eta), eta) = HFloat(0.0), diff(diff(g(eta), eta), eta) = HFloat(2.244199282192492), phi(eta) = HFloat(-2.044191234673432), diff(phi(eta), eta) = HFloat(5.227515304629519), theta(eta) = HFloat(0.2317093657771352), diff(theta(eta), eta) = HFloat(-0.38414531711143246)]

 

.3

 

[eta = 0., chi(eta) = HFloat(1.0), diff(chi(eta), eta) = HFloat(4.148187853914835), f(eta) = HFloat(0.0), diff(f(eta), eta) = HFloat(0.0), diff(diff(f(eta), eta), eta) = HFloat(3.1086884419918364), g(eta) = HFloat(0.0), diff(g(eta), eta) = HFloat(0.0), diff(diff(g(eta), eta), eta) = HFloat(3.1086884419918364), phi(eta) = HFloat(-2.049332060722701), diff(phi(eta), eta) = HFloat(5.527786294980874), theta(eta) = HFloat(0.2216792480031605), diff(theta(eta), eta) = HFloat(-0.38916037599841974)]

 

.4

 

[eta = 0., chi(eta) = HFloat(0.9999999999999998), diff(chi(eta), eta) = HFloat(4.580796631072469), f(eta) = HFloat(0.0), diff(f(eta), eta) = HFloat(0.0), diff(diff(f(eta), eta), eta) = HFloat(5.687607599246298), g(eta) = HFloat(0.0), diff(g(eta), eta) = HFloat(0.0), diff(diff(g(eta), eta), eta) = HFloat(5.687607599246298), phi(eta) = HFloat(-2.0568809171520708), diff(phi(eta), eta) = HFloat(6.0203396482123575), theta(eta) = HFloat(0.20686299926628238), diff(theta(eta), eta) = HFloat(-0.39656850036685887)]

(7)

NULL

 

 

Download 3DAKc2w_-_Copy.mw

hi.please help me for solve this equation

i encounter with error''

Error, (in StringTools:-IsPrefix) second argument must be a string''

equations which be solved attached as pdf file

thanks

Kernel4.mw

root.pdf


 

restart

with(LinearAlgebra):

Typesetting:-Settings(functionassign=false):

NULL

Constants

 

landa := 0.404e11; -1; mu := 0.27e11; -1; alpha := 0.23e-4; -1; rho := 2707; -1; k := 204; -1; c := 903; -1; nu := .3; -1; E := 0.70e11; -1; T0 := 293; -1; omega := 0.1e-1

0.1e-1

(1.1.1)

beta := alpha*(3*landa+2*mu):

NULL

varpi := 0.1e-1; -1; No := 15

15

(1.1.2)

 

 

Eq[1] := besselj(0, xi*b)*(eval(diff(bessely(0, xi*r), r), r = a))-(eval(diff(besselj(0, xi*r), r), r = a))*bessely(0, xi*b):

 

wf1 := unapply(Eq[1], xi):

1

 

1.794010904

 

1

 

2

 

1.794010904

 

1

 

3

 

4.802060761

 

2

 

4

 

4.802060761

 

2

 

5

 

4.802060761

 

2

 

6

 

7.908961712

 

3

 

7

 

7.908961712

 

3

 

8

 

7.908961712

 

3

 

9

 

11.03509457

 

4

 

10

 

11.03509457

 

4

 

11

 

11.03509457

 

4

 

12

 

11.03509457

 

4

 

13

 

14.16798650

 

5

 

14

 

14.16798650

 

5

 

15

 

14.16798650

 

5

 

16

 

17.30400975

 

6

(1.2.1)

Eq[2] := MTM:-besselj(1, eta*b)*(eval(diff(MTM:-bessely(1, eta*r), r), r = a))-(eval(diff(MTM:-besselj(1, eta*r), r), r = a))*MTM:-bessely(1, eta*b):

wf2 := unapply(Eq[2], eta):

1

 

1.958510605

 

1

 

2

 

1.958510605

 

1

 

3

 

4.857021628

 

2

 

4

 

4.857021628

 

2

 

5

 

4.857021628

 

2

 

6

 

7.941288451

 

3

 

7

 

7.941288451

 

3

 

8

 

7.941288451

 

3

 

9

 

11.05802155

 

4

 

10

 

11.05802155

 

4

 

11

 

11.05802155

 

4

 

12

 

11.05802155

 

4

 

13

 

14.18576207

 

5

 

14

 

14.18576207

 

5

 

15

 

14.18576207

 

5

 

16

 

17.31852918

 

6

(1.2.2)

 

for m to MM do K0[m] := proc (r, m) options operator, arrow; BesselJ(0, xi[m]*r)*BesselY(0, xi[m]*b)-BesselJ(0, xi[m]*b)*BesselY(0, xi[m]*r) end proc; KK0[m] := proc (r, m) options operator, arrow; diff(K0[m](r, m), r) end proc; K1[n] := proc (r, n) options operator, arrow; BesselJ(1, eta__n*r)*BesselY(1, eta__n*b)-BesselJ(1, eta__n*b)*BesselY(1, eta__n*r) end proc; KK1[n] := proc (r, n) options operator, arrow; diff(K1[n](r, n), r) end proc end do

proc (r, m) options operator, arrow; BesselJ(0, xi[m]*r)*BesselY(0, xi[m]*b)-BesselJ(0, xi[m]*b)*BesselY(0, xi[m]*r) end proc

 

proc (r, m) options operator, arrow; MTM:-diff(K0[m](r, m), r) end proc

 

proc (r, n) options operator, arrow; BesselJ(1, eta__n*r)*BesselY(1, eta__n*b)-BesselJ(1, eta__n*b)*BesselY(1, eta__n*r) end proc

 

proc (r, n) options operator, arrow; MTM:-diff(K1[n](r, n), r) end proc

 

proc (r, m) options operator, arrow; BesselJ(0, xi[m]*r)*BesselY(0, xi[m]*b)-BesselJ(0, xi[m]*b)*BesselY(0, xi[m]*r) end proc

 

proc (r, m) options operator, arrow; MTM:-diff(K0[m](r, m), r) end proc

 

proc (r, n) options operator, arrow; BesselJ(1, eta__n*r)*BesselY(1, eta__n*b)-BesselJ(1, eta__n*b)*BesselY(1, eta__n*r) end proc

 

proc (r, n) options operator, arrow; MTM:-diff(K1[n](r, n), r) end proc

 

proc (r, m) options operator, arrow; BesselJ(0, xi[m]*r)*BesselY(0, xi[m]*b)-BesselJ(0, xi[m]*b)*BesselY(0, xi[m]*r) end proc

 

proc (r, m) options operator, arrow; MTM:-diff(K0[m](r, m), r) end proc

 

proc (r, n) options operator, arrow; BesselJ(1, eta__n*r)*BesselY(1, eta__n*b)-BesselJ(1, eta__n*b)*BesselY(1, eta__n*r) end proc

 

proc (r, n) options operator, arrow; MTM:-diff(K1[n](r, n), r) end proc

 

proc (r, m) options operator, arrow; BesselJ(0, xi[m]*r)*BesselY(0, xi[m]*b)-BesselJ(0, xi[m]*b)*BesselY(0, xi[m]*r) end proc

 

proc (r, m) options operator, arrow; MTM:-diff(K0[m](r, m), r) end proc

 

proc (r, n) options operator, arrow; BesselJ(1, eta__n*r)*BesselY(1, eta__n*b)-BesselJ(1, eta__n*b)*BesselY(1, eta__n*r) end proc

 

proc (r, n) options operator, arrow; MTM:-diff(K1[n](r, n), r) end proc

 

proc (r, m) options operator, arrow; BesselJ(0, xi[m]*r)*BesselY(0, xi[m]*b)-BesselJ(0, xi[m]*b)*BesselY(0, xi[m]*r) end proc

 

proc (r, m) options operator, arrow; MTM:-diff(K0[m](r, m), r) end proc

 

proc (r, n) options operator, arrow; BesselJ(1, eta__n*r)*BesselY(1, eta__n*b)-BesselJ(1, eta__n*b)*BesselY(1, eta__n*r) end proc

 

proc (r, n) options operator, arrow; MTM:-diff(K1[n](r, n), r) end proc

 

proc (r, m) options operator, arrow; BesselJ(0, xi[m]*r)*BesselY(0, xi[m]*b)-BesselJ(0, xi[m]*b)*BesselY(0, xi[m]*r) end proc

 

proc (r, m) options operator, arrow; MTM:-diff(K0[m](r, m), r) end proc

 

proc (r, n) options operator, arrow; BesselJ(1, eta__n*r)*BesselY(1, eta__n*b)-BesselJ(1, eta__n*b)*BesselY(1, eta__n*r) end proc

 

proc (r, n) options operator, arrow; MTM:-diff(K1[n](r, n), r) end proc

(1.2.3)

U1 := -(int(r*K0[m]*(diff(K1[n], r)+K1[n]/r), r = a .. b))/(int(r*K0[m]^2, r = a .. b)); -1; U2 := -(int(r*K1[n]*(diff(K0[m], r)), r = a .. b))/(int(r*K1[n]^2, r = a .. b)); -1; U3 := (int(r^2*omega^2*K1[n], r = a .. b))/(int(r*K1[n]^2, r = a .. b))

0.1555555555e-3/K1[0]

(1.2.4)

m := 0; -1; for m to MM do M__m := int(r*K1[m](r, m)^2, r = a .. b); bb__m := 1/M__m end do

int(r*K1[1](r, 1)^2, r = 1 .. 2)

 

1/(int(r*K1[1](r, 1)^2, r = 1 .. 2))

 

int(r*K1[2](r, 2)^2, r = 1 .. 2)

 

1/(int(r*K1[2](r, 2)^2, r = 1 .. 2))

 

int(r*K1[3](r, 3)^2, r = 1 .. 2)

 

1/(int(r*K1[3](r, 3)^2, r = 1 .. 2))

 

int(r*K1[4](r, 4)^2, r = 1 .. 2)

 

1/(int(r*K1[4](r, 4)^2, r = 1 .. 2))

 

int(r*K1[5](r, 5)^2, r = 1 .. 2)

 

1/(int(r*K1[5](r, 5)^2, r = 1 .. 2))

 

int(r*K1[6](r, 6)^2, r = 1 .. 2)

 

1/(int(r*K1[6](r, 6)^2, r = 1 .. 2))

(1.2.5)

MM; 1; n; 1; m; 1; U1; 1; U2; 1; U3; 1; xi

6

 

0

 

7

 

-(2/3)*K1[0]/K0[7]

 

0

 

0.1555555555e-3/K1[0]

 

xi

(1.2.6)

for m to MM do for n to MM do dsys := {diff(S[m][n](t), t, t, t)+xi^2*[m]*(diff(S[m][n](t), t, t))+(-U1*U2+`η__η__n__`^2)*(diff(S[m][n](t), t))+xi[m]^2*`η__η__n__`^2*S[m][n](t) = -(2*U2*bb[m]/(Pi*xi[m])*(-BesselJ(0, xi[m]*b)/BesselJ(1, xi[m]*a)))*q+xi^2*[m]*U3} end do end do; sol := dsolve(dsys)

Error, (in StringTools:-IsPrefix) second argument must be a string

 

 

NULL

for m to MM do for n to MM do dsys2 := {diff(Q__mn(t), t, t, t)+xi[m]^2*(diff(Q__mn(t), t, t))+(-U1*U2+eta__n^2)*(diff(Q__mn(t), t))+xi[m]^2*eta__n^2*Q__mn(t) = -2*BesselJ(0, xi[m]*b)*U1*U2*b__m*(1-exp(-xi[m]^2*t))/(BesselJ(1, xi[m]*a)*Pi*xi[m]^3)} end do end do;

sol2 := dsolve(dsys2)

Error, (in dsolve) invalid input: `PDEtools/sdsolve` expects its 1st argument, SYS, to be of type Or(set({`<>`, `=`, algebraic}), list({`<>`, `=`, algebraic}), `casesplit/ans`(list, list)), but received [{Q__mn(t)*pochhammer(1-n, n)+(1497143767/5000000)*(diff(Q__mn(t), [`$`(t, t)]))+eta__n^2*(diff(Q__mn(t), t))+(1497143767/5000000)*eta__n^2*Q__mn(t) = 0}]

 

``

NULL

NULL

 

Download Kernel4.mw

Dear All,

I am going to solve the following systems of ODEs but get the error: Newton iteration is not converging.
Could you please share your idea with me. In the case of AA=-0.2,0,0.2,0.4,...; I could get the solution.
Thank you in advance.


restart;
with(plots);
Pr := 2; Le := 2; nn := 2; Nb := .1; Nt := .1; QQ := .1; SS := .1; BB := .1; CC := .1; Ec := .1; MM := .2;AA:=-0.4;

Eq1 := diff(f(eta), `$`(eta, 3))+f(eta).(diff(f(eta), `$`(eta, 2)))-2.*nn/(nn+1).((diff(f(eta), eta))^2)-MM.(diff(f(eta), eta)) = 0; Eq2 := 1/Pr.(diff(theta(eta), `$`(eta, 2)))+f(eta).(diff(theta(eta), eta))-4.*nn/(nn+1).(diff(f(eta), eta)).theta(eta)+Nb.(diff(theta(eta), eta)).(diff(h(eta), eta))+Nt.((diff(theta(eta), eta))^2)+Ec.((diff(f(eta), `$`(eta, 2)))^2)-QQ.theta(eta) = 0;
Eq3 := diff(h(eta), `$`(eta, 2))+Le.f(eta).(diff(h(eta), eta))+Nt/Nb.(diff(theta(eta), `$`(eta, 2))) = 0;

bcs := f(0) = SS, (D(f))(0) = 1+AA.((D@@2)(f))(0), theta(0) = 1+BB.(D(theta))(0), phi(0) = 1+CC.(D(phi))(0), (D(f))(etainf) = 0, theta(etainf) = 0, phi(etainf) = 0

Error, (in dsolve/numeric/ComputeSolution) Newton iteration is not converging

I've been trying to numerically solve (and plot) this equation. Maple tells me that some matrix is singular - I have no idea, what I can do.

eq := diff(y(x), `$`(x, 3))-(diff(y(x), x))*(diff(y(x), x))+1 = 0;

cond := (D(y))(0) = 0, (D(y))(1) = 1, ((D@@2)(y))(0) = 0

de := dsolve({cond, eq}, y(x), numeric);

Error, (in dsolve/numeric/bvp) matrix is singular

I am unable to solve the attached optimal control problem,please any one who many help  me in guideing .tnx

restart:
unprotect('gamma');

L:=b[1]*c(t)+b[2]*i(t)+w[1]*(u[1])^2/2+w[2]*(u[2])^2/2+w[3]*(u[3])^2/2;
1 2 1 2 1 2
b[1] c(t) + b[2] i(t) + - w[1] u[1] + - w[2] u[2] + - w[3] u[3]
2 2 2
H:=L+lambda[1](t)*((1-p*Psi)*tau+phi* v + delta *r-lambda*(1-u[3])*s-u[1]*varphi*s -mu*s ) +lambda[2](t)*(p*Psi*tau + u[1]*vartheta*s -gamma*lambda* (1-u[3])*v-(mu+phi)*v ) +lambda[3](t)*( (1-u[3])*rho*lambda* (s +gamma*v)+(1-q)* u[2]*eta*i -(mu +beta +chi)*c ) +lambda[4](t)* ((1-rho)*(1-u[3])*lambda*( s +gamma*v) +chi*c - u[2]*eta*i - (mu +alpha )*i) +lambda[5](t)*( beta*c + u[2]*q*eta*i -(mu +delta)*r);
1 2 1 2 1 2
b[1] c(t) + b[2] i(t) + - w[1] u[1] + - w[2] u[2] + - w[3] u[3] + lambda[1](t
2 2 2

) ((1 - p Psi) tau + phi v + delta r - lambda (1 - u[3]) s - u[1] varphi s

- mu s) + lambda[2](t) (p Psi tau + u[1] vartheta s

- gamma lambda (1 - u[3]) v - (mu + phi) v) + lambda[3](t) ((1 - u[3]) rho

lambda (s + gamma v) + (1 - q) u[2] eta i - (mu + beta + chi) c) + lambda[4](t

) ((1 - rho) (1 - u[3]) lambda (s + gamma v) + chi c - u[2] eta i

- (mu + alpha) i) + lambda[5](t) (beta c + u[2] q eta i - (mu + delta) r)
du1:=diff(H,u[1]);

w[1] u[1] - lambda[1](t) varphi s + lambda[2](t) vartheta s
du2:=diff(H,u[2]);du3:=diff(H,u[3]);
w[2] u[2] + lambda[3](t) (1 - q) eta i - lambda[4](t) eta i

+ lambda[5](t) q eta i
w[3] u[3] + lambda[1](t) lambda s + lambda[2](t) gamma lambda v

- lambda[3](t) rho lambda (s + gamma v)

- lambda[4](t) (1 - rho) lambda (s + gamma v)

ddu1 := -A[1] u[1] + psi[1](t) beta x[1] x[3] - psi[2](t) beta x[1] x[3]

ddu2 := -A[2] u[2] - psi[3](t) k x[2]
sol_u1 := solve(du1, u[1]);
s(t) (lambda[1](t) varphi - lambda[2](t) vartheta)
--------------------------------------------------
w[1]
sol_u2 := solve(du2, u[2]);sol_u3 := solve(du3, u[3]);
eta i (-lambda[3](t) + lambda[3](t) q + lambda[4](t) - lambda[5](t) q)
----------------------------------------------------------------------
w[2]
1
---- (lambda (-lambda[1](t) s - lambda[2](t) gamma v + lambda[3](t) rho s
w[3]

+ lambda[3](t) rho gamma v + lambda[4](t) s + lambda[4](t) gamma v

- lambda[4](t) rho s - lambda[4](t) rho gamma v))
Dx2:=subs(u[1]= s*(lambda[1](t)*varphi-lambda[2](t)*vartheta)/w[1] ,u[2]= eta*i*(-lambda[3](t)+lambda[3](t)*q+lambda[4](t)-lambda[5](t)*q)/w[2], u[3]=-lambda*(lambda[1](t)*s+lambda[2](t)*gamma*v-lambda[3](t)*rho*s-lambda[3](t)*rho*gamma*v-lambda[4](t)*s-lambda[4](t)*gamma*v+lambda[4](t)*rho*s+lambda[4](t)*rho*gamma*v)/w[3] ,H );
2 2
s (lambda[1](t) varphi - lambda[2](t) vartheta)
b[1] c(t) + b[2] i(t) + -------------------------------------------------
2 w[1]

2 2 2
eta i (-lambda[3](t) + lambda[3](t) q + lambda[4](t) - lambda[5](t) q)
+ ------------------------------------------------------------------------- +
2 w[2]

1 / 2
------ \lambda (lambda[1](t) s + lambda[2](t) gamma v - lambda[3](t) rho s
2 w[3]

- lambda[3](t) rho gamma v - lambda[4](t) s - lambda[4](t) gamma v

/
\ |
+ lambda[4](t) rho s + lambda[4](t) rho gamma v)^2/ + lambda[1](t) |(1
\

/ 1
- p Psi) tau + phi v + delta r - lambda |1 + ---- (lambda (lambda[1](t) s
\ w[3]

+ lambda[2](t) gamma v - lambda[3](t) rho s - lambda[3](t) rho gamma v

- lambda[4](t) s - lambda[4](t) gamma v + lambda[4](t) rho s

\
+ lambda[4](t) rho gamma v))| s
/

2 \
s (lambda[1](t) varphi - lambda[2](t) vartheta) varphi |
- ------------------------------------------------------- - mu s| +
w[1] /

/
|
lambda[2](t) |p Psi tau
\

2
s (lambda[1](t) varphi - lambda[2](t) vartheta) vartheta /
+ --------------------------------------------------------- - gamma lambda |1 +
w[1] \

1
---- (lambda (lambda[1](t) s + lambda[2](t) gamma v - lambda[3](t) rho s
w[3]

- lambda[3](t) rho gamma v - lambda[4](t) s - lambda[4](t) gamma v

\
\ |
+ lambda[4](t) rho s + lambda[4](t) rho gamma v))| v - (mu + phi) v| +
/ /

// 1
lambda[3](t) ||1 + ---- (lambda (lambda[1](t) s + lambda[2](t) gamma v
\\ w[3]

- lambda[3](t) rho s - lambda[3](t) rho gamma v - lambda[4](t) s

\
- lambda[4](t) gamma v + lambda[4](t) rho s + lambda[4](t) rho gamma v))|
/

1 / 2 2
rho lambda (s + gamma v) + ---- \(1 - q) eta i (-lambda[3](t)
w[2]

\ \
+ lambda[3](t) q + lambda[4](t) - lambda[5](t) q)/ - (mu + beta + chi) c| +
/

/
| / 1
lambda[4](t) |(1 - rho) |1 + ---- (lambda (lambda[1](t) s
\ \ w[3]

+ lambda[2](t) gamma v - lambda[3](t) rho s - lambda[3](t) rho gamma v

- lambda[4](t) s - lambda[4](t) gamma v + lambda[4](t) rho s

\
+ lambda[4](t) rho gamma v))| lambda (s + gamma v) + chi c
/

2 2
eta i (-lambda[3](t) + lambda[3](t) q + lambda[4](t) - lambda[5](t) q)
- ------------------------------------------------------------------------
w[2]

\ /
| |
- (mu + alpha) i| + lambda[5](t) |beta c
/ \

+

2 2
eta i (-lambda[3](t) + lambda[3](t) q + lambda[4](t) - lambda[5](t) q) q
--------------------------------------------------------------------------
w[2]

\
|
- (mu + delta) r|
/
ode1:=diff(lambda[1](t),t)=-diff(H,s);ode2:=diff(lambda[2](t),t)=-diff(H,v);ode3:=diff(psi[3](t),t)=-diff(H,c);ode4:=diff(lambda[4](t),t)=-diff(H,i);ode5:=diff(lambda[5](t),t)=-diff(H,r);
d
--- lambda[1](t) = -lambda[1](t) (-lambda (1 - u[3]) - u[1] varphi - mu)
dt

- lambda[2](t) u[1] vartheta - lambda[3](t) (1 - u[3]) rho lambda

- lambda[4](t) (1 - rho) (1 - u[3]) lambda
d
--- lambda[2](t) = -lambda[1](t) phi
dt

- lambda[2](t) (-gamma lambda (1 - u[3]) - mu - phi)

- lambda[3](t) (1 - u[3]) rho lambda gamma

- lambda[4](t) (1 - rho) (1 - u[3]) lambda gamma
d
--- psi[3](t) = -lambda[3](t) (-mu - beta - chi) - lambda[4](t) chi
dt

- lambda[5](t) beta
d
--- lambda[4](t) = -lambda[3](t) (1 - q) u[2] eta
dt

- lambda[4](t) (-u[2] eta - mu - alpha) - lambda[5](t) u[2] q eta
d
--- lambda[5](t) = -lambda[1](t) delta - lambda[5](t) (-mu - delta)
dt
restart:
#Digits:=10:


unprotect('gamma');
lambda:=0.51:
mu:=0.002:
beta:=0.0115:
delta:=0.003:
alpha:=0.33:
chi:=0.00274:
k:=6.24:
gamma:=0.4:
rho:=0.338:;tau=1000:;Psi:=0.1:;p:=0.6:;phi:=0.001:;eta:=0.001124:q:=0.6:varphi:=0.9:;vatheta:=0.9:
b[1]:=2:;b[2]:=3:;w[1]:=4:;w[2]:=5:;w[3]:=6:
#u[1]:=s(t)*(lambda[1](t)*varphi-lambda[2](t)*vartheta)/w[1]:
#u[2]:=eta*i*(-lambda[3](t)+lambda[3](t)*q+lambda[4](t)-lambda[5](t)*q)/w[2]:;u[3]:=lambda*(-lambda[1](t)*s-lambda[2](t)*gamma*v+lambda[3](t)*rho*s+lambda[3](t)*rho*gamma*v+lambda[4](t)*s+lambda[4](t)*gamma*v-lambda[4](t)*rho*s-lambda[4](t)*rho*gamma*v)/w[3]:
ics := s(0)=8200, v(0)=2800,c(0)=1100,i(0)=1500,r(0)=200,lambda[1](20)=0,lambda[2](20)=0,lambda[3](20)=0,lambda[4](20)=0,lambda[5](20)=0:
ode1:=diff(s(t),t)=(1-p*Psi)*tau+phi* v(t) + delta *r(t)-lambda*(1-u[3])*s(t)-u[1]*varphi*s(t) -mu*s(t),
diff(v(t), t) =p*Psi*tau + u[1]*vartheta*s(t) -gamma*lambda* (1-u[3])*v(t)-(mu+phi)*v(t) ,
diff(c(t), t) =(1-u[3])*rho*lambda* (s(t) +gamma*v(t))+(1-q)* u[2]*eta*i(t) -(mu +beta +chi)*c(t),
diff(i(t), t) =(1-rho)*(1-u[3])*lambda*( s(t) +gamma*v(t)) +chi*c(t) - u[2]*eta*i(t) - (mu +alpha )*i(t),
diff(r(t), t) = beta*c(t) + u[2]*q*eta*i(t) -(mu +delta)*r(t),
diff(lambda[1](t), t) = -lambda[1](t)*(-lambda*(1-u[3])-u[1]*varphi-mu)-lambda[2](t)*u[1]*vartheta-lambda[3](t)*(1-u[3])*rho*lambda-lambda[4](t)*(1-rho)*(1-u[3])*lambda,diff(lambda[2](t),t)=-lambda[1](t)*phi-lambda[2](t)*(-gamma*lambda*(1-u[3])-mu-phi)-lambda[3](t)*(1-u[3])*rho*lambda*gamma-lambda[4](t)*(1-rho)*(1-u[3])*lambda*gamma,diff(lambda[3](t),t)=-lambda[3](t)*(-mu-beta-chi)-lambda[4](t)*chi-lambda[5](t)*beta,diff(lambda[4](t),t)=-lambda[3](t)*(1-q)*u[2]*eta-lambda[4](t)*(-u[2]*eta-mu-alpha)-lambda[5](t)*u[2]*q*eta,diff(lambda[5](t),t)=-lambda[1](t)*delta-lambda[5](t)*(-mu-delta);
d
--- s(t) = (1 - p Psi) tau + phi v(t) + delta r(t) - lambda (1 - u[3]) s(t)
dt

d
- u[1] varphi s(t) - mu s(t), --- v(t) = p Psi tau + u[1] vartheta s(t)
dt

d
- gamma lambda (1 - u[3]) v(t) - (mu + phi) v(t), --- c(t) = (1 - u[3]) rho lambda
dt

(s(t) + gamma v(t)) + (1 - q) u[2] eta - (mu + beta + chi) c(t), 0 = (1

- rho) (1 - u[3]) lambda (s(t) + gamma v(t)) + chi c(t) - u[2] eta - mu

d d
- alpha, --- r(t) = beta c(t) + u[2] q eta - (mu + delta) r(t), ---
dt dt

lambda[1](t) = -lambda[1](t) (-lambda (1 - u[3]) - u[1] varphi - mu)

- lambda[2](t) u[1] vartheta - lambda[3](t) (1 - u[3]) rho lambda

d
- lambda[4](t) (1 - rho) (1 - u[3]) lambda, --- lambda[2](t) =
dt
-lambda[1](t) phi - lambda[2](t) (-gamma lambda (1 - u[3]) - mu - phi)

- lambda[3](t) (1 - u[3]) rho lambda gamma

d
- lambda[4](t) (1 - rho) (1 - u[3]) lambda gamma, --- lambda[3](t) =
dt
d
-lambda[3](t) (-mu - beta - chi) - lambda[4](t) chi - lambda[5](t) beta, ---
dt

lambda[4](t) = -lambda[3](t) (1 - q) u[2] eta

- lambda[4](t) (-u[2] eta - mu - alpha) - lambda[5](t) u[2] q eta,

d
--- lambda[5](t) = -lambda[1](t) delta - lambda[5](t) (-mu - delta)
dt

sol := dsolve({c(0) = 0, i(0) = 0, r(0) = .1, s(0) = 0, v(0) = 0, diff(c(t), t) = (1-u[3])*rho*lambda*(s(t)+gamma*v(t))+(1-q)*u[2]*eta*i(t)-(mu+beta+chi)*c(t), diff(i(t), t) = (1-rho)*(1-u[3])*lambda*(s(t)+gamma*v(t))+chi*c(t)-u[2]*eta*i(t)-(mu+alpha)*i(t), diff(r(t), t) = beta*c(t)+u[2]*q*eta*i(t)-(mu+delta)*r(t), diff(s(t), t) = (1-p*Psi)*tau+phi*v(t)+delta*r(t)-lambda*(1-u[3])*s(t)-u[1]*varphi*s(t)-mu*s(t), diff(v(t), t) = p*Psi*tau+u[1]*vartheta*s(t)-gamma*lambda*(1-u[3])*v(t)-(mu+phi)*v(t), diff(lambda[1](t), t) = -lambda[1](t)*(-lambda*(1-u[3])-u[1]*varphi-mu)-lambda[2](t)*u[1]*vartheta-lambda[3](t)*(1-u[3])*rho*lambda-lambda[4](t)*(1-rho)*(1-u[3])*lambda, diff(lambda[2](t), t) = -lambda[1](t)*phi-lambda[2](t)*(-gamma*lambda*(1-u[3])-mu-phi)-lambda[3](t)*(1-u[3])*rho*lambda*gamma-lambda[4](t)*(1-rho)*(1-u[3])*lambda*gamma, diff(lambda[3](t), t) = -lambda[3](t)*(-mu-beta-chi)-lambda[4](t)*chi-lambda[5](t)*beta, diff(lambda[4](t), t) = -lambda[3](t)*(1-q)*u[2]*eta-lambda[4](t)*(-u[2]*eta-mu-alpha)-lambda[5](t)*u[2]*q*eta, diff(lambda[5](t), t) = -lambda[1](t)*delta-lambda[5](t)*(-mu-delta), lambda[1](20) = 0, lambda[2](20) = 0, lambda[3](20) = 0, lambda[4](20) = 0, lambda[5](20) = 0}, type = numeric);
Error, (in dsolve/numeric/process_input) invalid specification of initial conditions, got 1 = 0

sol:=dsolve([ode1,ics],numeric, method = bvp[midrich],maxmesh=500);

Error, (in dsolve/numeric/process_input) system must be entered as a set/list of expressions/equations

dsolve[':-interactive']({});
Error, `:=` unexpected
sol:=dsolve([ode1,ics],numeric, method = bvp[midrich],maxmesh=500);
Error, (in dsolve/numeric/process_input) system must be entered as a set/list of expressions/equations

eq1:=diff(s(t), t)=(1-p*Psi)*tau+phi* v(t) + delta *r(t)-lambda*(1-u[3])*s(t)-u[1]*varphi*s(t) -mu*s(t);
eq2:diff(v(t), t) =p*Psi*tau + u[1]*vartheta*s(t) -gamma*lambda* (1-u[3])*v(t)-(mu+phi)*v(t);
eq3:=diff(c(t), t) =(1-u[3])*rho*lambda* (s(t) +gamma*v(t))+(1-q)* u[2]*eta*i(t) -(mu +beta +chi)*c(t);
eq4:=diff(i(t), t) =(1-rho)*(1-u[3])*lambda*( s(t) +gamma*v(t)) +chi*c(t) - u[2]*eta*i(t) - (mu +alpha )*i(t);
eq5:=diff(r(t), t) = beta*c(t) + u[2]*q*eta*i(t) -(mu +delta)*r(t);

d
--- s(t) = (1 - p Psi) tau + phi v(t) + delta r(t) - lambda (1 - u[3]) s(t)
dt

- u[1] varphi s(t) - mu s(t)
d
--- v(t) = p Psi tau + u[1] vartheta s(t) - gamma lambda (1 - u[3]) v(t)
dt

- (mu + phi) v(t)
d
--- c(t) = (1 - u[3]) rho lambda (s(t) + gamma v(t)) + (1 - q) u[2] eta i(t)
dt

- (mu + beta + chi) c(t)
d
--- i(t) = (1 - rho) (1 - u[3]) lambda (s(t) + gamma v(t)) + chi c(t)
dt

- u[2] eta i(t) - (mu + alpha) i(t)
d
--- r(t) = beta c(t) + u[2] q eta i(t) - (mu + delta) r(t)
dt
eq6:=diff(Q(t),t)=b[1]*c(t)+b[2]*i(t)+w[1]*(u[1])^2/2+w[2]*(u[2])^2/2+w[3]*(u[3])^2/2;
d 1 2 1 2 1 2
--- Q(t) = b[1] c(t) + b[2] i(t) + - w[1] u[1] + - w[2] u[2] + - w[3] u[3]
dt 2 2 2
ics:=s(0)=8200, v(0)=2800,c(0)=1100,i(0)=1500,r(0)=200,Q(0)=6700;
s(0) = 8200, v(0) = 2800, c(0) = 1100, i(0) = 1500, r(0) = 200, Q(0) = 6700
sol0:=dsolve({eq1,eq2,eq3,eq4,eq5,eq6,ics},type=numeric,stiff=true,'parameters'=[u[1],u[2],u[3]],abserr=1e-15,relerr=1e-12,maxfun=0,range=0..50):
Error, (in dsolve/numeric/process_input) system must be entered as a set/list of expressions/equations
with(plots):
Q0:=6700;
6700
obj:=proc(u)
global sol0,Q0;
local ob1;
try
sol0('parameters'=[u[1],u[2],u[3]]):
ob1:=subs(sol0(20.),Q(t)):
catch :
ob1:=0;
end try;
#ob1:=subs(sol0(20.),Q(t));
if ob1>Q0 then Q0:=ob1;print(Q0,u);end;
ob1;
end proc;
proc(u) ... end;
obj([1,1,1]);
0
obj([3,2.5],4);
0
u0:=Vector(3,[0.,0.,0.],datatype=float[8]);
Vector[column](%id = 85973880)

Q0:=0;
Q0 := 0
with(Optimization);
[ImportMPS, Interactive, LPSolve, LSSolve, Maximize, Minimize, NLPSolve,

QPSolve]
sol2:=NLPSolve(3,obj,initialpoint=u0,method=nonlinearsimplex,maximize,evaluationlimit=100):
sol0('parameters'=[3.18125786060723, 2.36800986932868]);
sol0(parameters = [3.18125786060723, 2.36800986932868])
for i from 1 to 3 do odeplot(sol0,[t,x[i](t)],0..20,thickness=3,axes=boxed);od;
Error, (in plots/odeplot) input is not a valid dsolve/numeric solution

 

HI all,

 

I have 

> sol2 := dsolve({odesys, H(0) = 4995, R(0) = 65000, W(0) = 102000, l(0) = 96000}, numeric, method = rosenbrock);
print(`output redirected...`); 
proc(x_rosenbrock) ... end;

 

I want to have a list of my solutions, t, H(t), R(t), W(t), l(t) that I can put into a spreadsheet (.csv, .txt, etc.), for 600 timesteps. 

 

There are some answers out there, but I am confused by them, and have not been able to make it work.

 

Thanks!

 

Hello,

 

I tried to plot the problem presented below:

restart; with(plots); C := setcolors(); with(LinearAlgebra);

formula1 := 2.6*BodyWeight*abs(sin(4*Pi*t));
2.6 BodyWeight |sin(4 Pi t)|
BodyWeight := 80*9.81;
plot(formula1, t = 0 .. 2);


eq2 := formula1-SpringConstant*y(t)-DampConstant*(diff(y(t), t)) = Mass*(diff(y(t), `$`(t, 2)));
2040.480 |sin(4 Pi t)| - SpringConstant y(t)

/ d \ / d / d \\
- DampConstant |--- y(t)| = Mass |--- |--- y(t)||
\ dt / \ dt \ dt //
DampConstant := 50;
50
Mass := .200;
Springt := 200;
200
SpringConstant := Youngsmodulus*Surface/DeltaLength;
DeltaLength := 0.2e-1-y(t);
Surface := .15;
Youngsmodulus := 6.5*10^6/(t+1)+6.5*10^6;
plot(Youngsmodulus, t = 0 .. 10000);

eq2;
2040.480 |sin(4 Pi t)|

/ 6 \
|6.5000000 10 6|
0.15 |------------- + 6.5000000 10 | y(t)
\ t + 1 / / d \
- ----------------------------------------- - 50 |--- y(t)| =
0.02 - y(t) \ dt /

/ d / d \\
0.200 |--- |--- y(t)||
\ dt \ dt //

incs := y(0) = 0, (D(y))(0) = 0;
eq4 := dsolve({eq2, incs}, y(t), type = numeric, method = lsode[backfull], maxfun = 0);
proc(x_lsode) ... end;

plots:-odeplot(eq4, [t, y(t)], 0 .. 5);

 When I try to plot it beyond t=5, Maple gives the following error:

Warning, could not obtain numerical solution at all points, plot may be incomplete

Does anyone know how to plot it even further?

 

 

Hi everyone,

I'm kinda new here, and I really hope you guys can help me through this. In my new case study, after some revision, i thought i might be trying to implement a shooting method. I tried my best to make it work/understand but i couldn't get to any result.

So, as attached (i re-do PV Satya Naraya's paper first to be more understand but .....)

 

Here is my questions and the worksheet:

1) really stuck in mind - what is the purpose of shooting method for some related study?

2) what is the meaning of error .............'use midpoint method intead" 

3) Worksheet - 1MASS_JEFF_SATYA_on_Beta.mw

Thanks in advanced. Really hope that someone can help/teach me how to solve the boundary value problem by shooting method. 

 

 

restart; with(plots); lambda := 1.0; m := 2.0; M := 2; R := .1; Pr := .75; G := .1; Sc := .6; Kr := .2; blt := 5

Eq1 := diff(f(eta), eta, eta, eta)+(1+lambda)*(f(eta)*(diff(f(eta), eta, eta))-(diff(f(eta), eta))^2)-(1+lambda)*M*(diff(f(eta), eta))+beta*((diff(f(eta), eta, eta))^2-f(eta)*(diff(f(eta), eta, eta, eta, eta))) = 0;

diff(diff(diff(f(eta), eta), eta), eta)+2.0*f(eta)*(diff(diff(f(eta), eta), eta))-2.0*(diff(f(eta), eta))^2-4.0*(diff(f(eta), eta))+beta*((diff(diff(f(eta), eta), eta))^2-f(eta)*(diff(diff(diff(diff(f(eta), eta), eta), eta), eta))) = 0

(1)

``

Eq2 := (1+(4/3)*R)*(diff(theta(eta), eta, eta))+Pr*(f(eta)*(diff(theta(eta), eta))-m*(diff(f(eta), eta))*theta(eta)+G*theta(eta)) = 0;
NULL``

1.133333333*(diff(diff(theta(eta), eta), eta))+.75*f(eta)*(diff(theta(eta), eta))-1.500*(diff(f(eta), eta))*theta(eta)+0.75e-1*theta(eta) = 0

(2)

Eq3 := diff(phi(eta), eta, eta)+Sc*(f(eta)*(diff(phi(eta), eta))-m*(diff(f(eta), eta))*phi(eta)-Kr*phi(eta)) = 0;

diff(diff(phi(eta), eta), eta)+.6*f(eta)*(diff(phi(eta), eta))-1.20*(diff(f(eta), eta))*phi(eta)-.12*phi(eta) = 0

(3)

bcs1 := f(0) = 0, (D(f))(0) = 1, (D(f))(blt) = 0, (D(D(f)))(blt) = 0, theta(0) = 1, theta(blt) = 0, phi(0) = 1, phi(blt) = 0;

f(0) = 0, (D(f))(0) = 1, (D(f))(5) = 0, ((D@@2)(f))(5) = 0, theta(0) = 1, theta(5) = 0, phi(0) = 1, phi(5) = 0

(4)

L := [1.0, 1.5, 2.0, 2.5];

[1.0, 1.5, 2.0, 2.5]

(5)

for k to 4 do R := dsolve(eval({Eq1, Eq2, Eq3, bcs1}, beta = L[k]), [f(eta), theta(eta), phi(eta)], numeric, output = listprocedure); Y || k := rhs(R[3]); YA || k := rhs(R[6]); YB || k := rhs(R[5]); YC || k := -rhs(R[8]) end do

Error, (in dsolve/numeric/bvp) system is singular at left endpoint, use midpoint method instead

 

R

 

``

 

NULL

 

Download 1MASS_JEFF_SATYA_on_Beta.mw

Hello, My problem is as following:

 

I have tried 2 options for solving the problem below, trying to plot the behaviour of a system to a predetermined function.

First I tried to use dsolve as usual:

restart; with(plots); C := setcolors(); with(LinearAlgebra);
eq1 := Force = Mass*(diff(y(t), `$`(t, 2)));
formula1 := 2.6*BodyWeight*abs(sin(4*Pi*t));
2.6 BodyWeight |sin(4 Pi t)|
BodyWeight := 80*9.81;
plot(formula1, t = 0 .. 2);


eq2 := formula1-SpringConstant*(diff(y(t), t)) = Mass*(diff(y(t), `$`(t, 2)));
/ d \ / d /
2040.480 |sin(4 Pi t)| - SpringConstant |--- y(t)| = Mass |--- |
\ dt / \ dt \

d \\
--- y(t)||
dt //
Mass := .200;
Springt := 200;
200
SpringConstant := Youngsmodulus*Surface/DeltaLength;
DeltaLength := 0.2e-1-y(t);
Surface := .15;
Youngsmodulus := 1600*10^6-20*t^2;
eq2;
/ 2 \ / d \
0.15 \-20 t + 1600000000/ |--- y(t)|
\ dt /
2040.480 |sin(4 Pi t)| - ------------------------------------- =
0.02 - y(t)

/ d / d \\
0.200 |--- |--- y(t)||
\ dt \ dt //

incs := y(0) = 0, (D(y))(0) = 0;
eq4 := dsolve({eq2, incs});
Warning: System is inconsistent

 

Second, I tried using a numerical solving, with maxfun.


restart; with(plots); C := setcolors(); with(LinearAlgebra);
eq1 := Force = Mass*(diff(y(t), `$`(t, 2)));
formula1 := 2.6*BodyWeight*abs(sin(4*Pi*t));
2.6 BodyWeight |sin(4 Pi t)|
BodyWeight := 80*9.81;
plot(formula1, t = 0 .. 2);


eq2 := formula1-SpringConstant*(diff(y(t), t)) = Mass*(diff(y(t), `$`(t, 2)));
/ d \ / d /
2040.480 |sin(4 Pi t)| - SpringConstant |--- y(t)| = Mass |--- |
\ dt / \ dt \

d \\
--- y(t)||
dt //
Mass := .200;
Springt := 200;
200
SpringConstant := Youngsmodulus*Surface/DeltaLength;
DeltaLength := 0.2e-1-y(t);
Surface := .15;
Youngsmodulus := 1600*10^6-20*t^2;
eq2;
/ 2 \ / d \
0.15 \-20 t + 1600000000/ |--- y(t)|
\ dt /
2040.480 |sin(4 Pi t)| - ------------------------------------- =
0.02 - y(t)

/ d / d \\
0.200 |--- |--- y(t)||
\ dt \ dt //

incs := y(0) = 0, (D(y))(0) = 0;
eq4 := dsolve({eq2, incs}, y(t), type = numeric, output = listprocedure, maxfun = 10^7);
[
[t = proc(t) ... end;, y(t) = proc(t) ... end;,
[

d ]
--- y(t) = proc(t) ... end;]
dt ]

test := rhs(eq4[2]);
proc(t) ... end;

This one does plot, but no further than 0.2*10^-6. I have tried compiling the data, but this has not worked yet.

 

Does anyone know a way to work around such a problem. Is it possible to plot the equation using a for loop? If yes, how?

 

 

how i can calculate roots of the characteristic polynomial equations {dsys and dsys2}
and dsolve them with arbitrary initial condition for differennt amont of m and n?
thanks
Kr.mw

restart; a := 1; b := 2; Number := 10; q := 1; omega := 0.2e-1
``

Q1 := besselj(0, xi*b)*(eval(diff(bessely(0, xi*r), r), r = a))-(eval(diff(besselj(0, xi*r), r), r = a))*bessely(0, xi*b):

J := 0:

m := 0:

U1 := (int(r*K1[m]*(diff(K_01[m], r)+K_01[m]/r), r = a .. b))/(int(r*K1[m]^2, r = a .. b)); -1; U2 := -(int(r*K_01[m]*(diff(K1[m], r)), r = a .. b))/(int(r*K_01[m]^2, r = a .. b)); -1; U3 := (int(r^2*omega^2*K_01[m], r = a .. b))/(int(r*K_01[m]^2, r = a .. b))

0.6222222222e-3/K_01[12]

(1)

Q2 := besselj(1, eta*b)*(eval(diff(bessely(1, eta*r), r), r = a))-(eval(diff(besselj(1, eta*r), r), r = a))*bessely(1, eta*b):

E2 := unapply(Q2, eta):

m := 0:

 
dsys := {diff(S_mn(t), t, t, t)+xi[m]^2*(diff(S_mn(t), t, t))+(-U1*U2+eta__n^2)*(diff(S_mn(t), t))+xi[m]^2*eta__n^2*S_mn(t) = -(2*U2*b_m/(Pi*xi[m])*(-besselj(0, xi[m]*b)/besselj(1, xi[m]*a)))*q+xi[m]^2*U3}; 1; dsolve(dsys)

{S_mn(t) = (3111111111/5000000000000)/(K_01[12]*eta__n^2)+_C1*cos(eta__n*t)+_C2*sin(eta__n*t)+_C3*exp(-xi[12]^2*t)}

(2)

dsys2 := {diff(Q_mn(t), t, t, t)+xi[m]^2*(diff(Q_mn(t), t, t))+(-U1*U2+eta__n^2)*(diff(Q_mn(t), t))+xi[m]^2*eta__n^2*Q_mn(t) = -2*besselj(0, xi[m]*b)*U1*U2*b_m*(1-exp(-xi[m]^2*t))/(besselj(1, xi[m]*a)*Pi*xi[m]^3)}; 1; dsolve(dsys2)

{Q_mn(t) = _C1*exp(-xi[12]^2*t)+_C2*sin(eta__n*t)+_C3*cos(eta__n*t)}

(3)

``

 

``



Download Kr.mw

 

Hello guys,

I was just playing around with differential equations, when I noticed that symbolic solution is  different from the numerical.What is the reason for this strange behavior?


ODE := (diff(y(x), x))*(ln(y(x))+x) = 1

sol := dsolve({ODE, y(1) = 1}, y(x))

a := plot(op(2, sol), x = .75 .. 2, color = "Red");
sol2 := dsolve([ODE, y(1) = 1], numeric, range = .75 .. 2);

with(plots);
b := odeplot(sol2, .75 .. 2, thickness = 4);
display({a, b});

 

 

Strange_issue.mw

Mariusz Iwaniuk

Hi, i am trying to solve my PDEs with HPM method ,but i get strange errors.

first one is :Error, (in trig/reduce/reduce) Maple was unable to allocate enough memory to complete this computation.  Please see ?alloc,

but when i run my last function again,the error chages,let me show you.


restart;
lambda:=0.5;K[r]:=0.5;Sc:=0.5;Nb:=0.1;Nt:=0.1;Pr:=10;
                              0.5
                              0.5
                              0.5
                              0.1
                              0.1
                               10
> EQUATIONS;


equ1:=diff(f(eta),eta$4)-R*(diff(f(eta),eta)*diff(f(eta),eta$2)-f(eta)*diff(f(eta),eta$2))-2*K[r]*diff(g(eta),eta)=0;

equ2:=diff(g(eta),eta$2)-R*(diff(f(eta),eta)*g(eta)-f(eta)*diff(g(eta),eta))+2*K[r]*diff(f(eta),eta)=0;

equ3:=diff(theta(eta),eta$2)+Pr*R*f(eta)*diff(theta(eta),eta)+Nb*diff(phi(eta),eta)*diff(theta(eta),eta)+Nt*diff(theta(eta),eta)^2=0;

equ4:=diff(phi(eta),eta$2)+R*Sc*f(eta)*diff(phi(eta),eta)+diff(theta(eta),eta$2)*(Nt/Nb)=0;
/  d   /  d   /  d   /  d         \\\\     //  d         \ /  d  
|----- |----- |----- |----- f(eta)|||| - R ||----- f(eta)| |-----
\ deta \ deta \ deta \ deta       ////     \\ deta       / \ deta

   /  d         \\          /  d   /  d         \\\
   |----- f(eta)|| - f(eta) |----- |----- f(eta)|||
   \ deta       //          \ deta \ deta       ///

         /  d         \    
   - 1.0 |----- g(eta)| = 0
         \ deta       /    
     /  d   /  d         \\
     |----- |----- g(eta)||
     \ deta \ deta       //

            //  d         \                 /  d         \\
        - R ||----- f(eta)| g(eta) - f(eta) |----- g(eta)||
            \\ deta       /                 \ deta       //

              /  d         \    
        + 1.0 |----- f(eta)| = 0
              \ deta       /    
  /  d   /  d             \\               /  d             \
  |----- |----- theta(eta)|| + 10 R f(eta) |----- theta(eta)|
  \ deta \ deta           //               \ deta           /

           /  d           \ /  d             \
     + 0.1 |----- phi(eta)| |----- theta(eta)|
           \ deta         / \ deta           /

                             2    
           /  d             \     
     + 0.1 |----- theta(eta)|  = 0
           \ deta           /     
    /  d   /  d           \\                /  d           \
    |----- |----- phi(eta)|| + 0.5 R f(eta) |----- phi(eta)|
    \ deta \ deta         //                \ deta         /

                     /  d   /  d             \\    
       + 1.000000000 |----- |----- theta(eta)|| = 0
                     \ deta \ deta           //    
> BOUNDARY*CONDITIONS;


ics:=
f(0)=0,D(f)(0)=1,g(0)=0,theta(0)=1,phi(0)=1;
f(1)=lambda,D(f)(1)=0,g(1)=0,theta(1)=0,phi(1)=0;
   f(0) = 0, D(f)(0) = 1, g(0) = 0, theta(0) = 1, phi(0) = 1
  f(1) = 0.5, D(f)(1) = 0, g(1) = 0, theta(1) = 0, phi(1) = 0
> HPMs;


hpm1:=(1-p)*(diff(f(eta),eta$4)-2*K[r]*diff(g(eta),eta))+p*(diff(f(eta),eta$4)-R*(diff(f(eta),eta)*diff(f(eta),eta$2)-f(eta)*diff(f(eta),eta$2))-2*K[r]*diff(g(eta),eta))=0;

hpm2:=(1-p)*(diff(g(eta),eta$2)+2*K[r]*diff(f(eta),eta))+p*(diff(g(eta),eta$2)-R*(diff(f(eta),eta)*g(eta)-f(eta)*diff(g(eta),eta))+2*K[r]*diff(f(eta),eta))=0;

hpm3:=(1-p)*(diff(theta(eta),eta$2))+p*(diff(theta(eta),eta$2)+Pr*R*f(eta)*diff(theta(eta),eta)+Nb*diff(phi(eta),eta)*diff(theta(eta),eta)+Nt*diff(theta(eta),eta)^2)=0;

hpm4:=(1-p)*(diff(phi(eta),eta$2)+diff(theta(eta),eta$2)*(Nt/Nb))+p*(diff(phi(eta),eta$2)+R*Sc*f(eta)*diff(phi(eta),eta)+diff(theta(eta),eta$2)*(Nt/Nb))=0;

        //  d   /  d   /  d   /  d         \\\\
(1 - p) ||----- |----- |----- |----- f(eta)||||
        \\ deta \ deta \ deta \ deta       ////

         /  d         \\     //  d   /  d   /  d   /  d         \
   - 1.0 |----- g(eta)|| + p ||----- |----- |----- |----- f(eta)|
         \ deta       //     \\ deta \ deta \ deta \ deta       /

  \\\     //  d         \ /  d   /  d         \\
  ||| - R ||----- f(eta)| |----- |----- f(eta)||
  ///     \\ deta       / \ deta \ deta       //

            /  d   /  d         \\\       /  d         \\    
   - f(eta) |----- |----- f(eta)||| - 1.0 |----- g(eta)|| = 0
            \ deta \ deta       ///       \ deta       //    
        //  d   /  d         \\       /  d         \\     //  d  
(1 - p) ||----- |----- g(eta)|| + 1.0 |----- f(eta)|| + p ||-----
        \\ deta \ deta       //       \ deta       //     \\ deta

   /  d         \\
   |----- g(eta)||
   \ deta       //

       //  d         \                 /  d         \\
   - R ||----- f(eta)| g(eta) - f(eta) |----- g(eta)||
       \\ deta       /                 \ deta       //

         /  d         \\    
   + 1.0 |----- f(eta)|| = 0
         \ deta       //    
                                       /                         
        /  d   /  d             \\     |/  d   /  d             \
(1 - p) |----- |----- theta(eta)|| + p ||----- |----- theta(eta)|
        \ deta \ deta           //     \\ deta \ deta           /

  \               /  d             \
  | + 10 R f(eta) |----- theta(eta)|
  /               \ deta           /

         /  d           \ /  d             \
   + 0.1 |----- phi(eta)| |----- theta(eta)|
         \ deta         / \ deta           /

                           2\    
         /  d             \ |    
   + 0.1 |----- theta(eta)| | = 0
         \ deta           / /    
        //  d   /  d           \\
(1 - p) ||----- |----- phi(eta)||
        \\ deta \ deta         //

                 /  d   /  d             \\\     //  d   /  d   
   + 1.000000000 |----- |----- theta(eta)||| + p ||----- |-----
                 \ deta \ deta           ///     \\ deta \ deta

          \\                /  d           \
  phi(eta)|| + 0.5 R f(eta) |----- phi(eta)|
          //                \ deta         /

                 /  d   /  d             \\\    
   + 1.000000000 |----- |----- theta(eta)||| = 0
                 \ deta \ deta           ///    
f(eta)=sum(f[i](eta)*p^i,i=0..1);
                f(eta) = f[0](eta) + f[1](eta) p
g(eta)=sum(g[i](eta)*p^i,i=0..1);
                g(eta) = g[0](eta) + g[1](eta) p
theta(eta)=sum(theta[i](eta)*p^i,i=0..1);
          theta(eta) = theta[0](eta) + theta[1](eta) p
phi(eta)=sum(phi[i](eta)*p^i,i=0..1);
             phi(eta) = phi[0](eta) + phi[1](eta) p
> FORequ1;


A:=collect(expand(subs(f(eta)=f[0](eta)+f[1](eta)*p,g(eta)=g[0](eta)+g[1](eta)*p,hpm1)),p);
/      /  d            \ /  d   /  d            \\
|-1. R |----- f[1](eta)| |----- |----- f[1](eta)||
\      \ deta          / \ deta \ deta          //

                 /  d   /  d            \\\  3   /
   + R f[1](eta) |----- |----- f[1](eta)||| p  + |
                 \ deta \ deta          ///      \
      /  d            \ /  d   /  d            \\
-1. R |----- f[0](eta)| |----- |----- f[1](eta)||
      \ deta          / \ deta \ deta          //

          /  d            \ /  d   /  d            \\
   - 1. R |----- f[1](eta)| |----- |----- f[0](eta)||
          \ deta          / \ deta \ deta          //

                 /  d   /  d            \\
   + R f[0](eta) |----- |----- f[1](eta)||
                 \ deta \ deta          //

                 /  d   /  d            \\\  2   //  d   /  d   /
   + R f[1](eta) |----- |----- f[0](eta)||| p  + ||----- |----- |
                 \ deta \ deta          ///      \\ deta \ deta \

    d   /  d            \\\\       /  d            \
  ----- |----- f[1](eta)|||| - 1.0 |----- g[1](eta)|
   deta \ deta          ////       \ deta          /

          /  d            \ /  d   /  d            \\
   - 1. R |----- f[0](eta)| |----- |----- f[0](eta)||
          \ deta          / \ deta \ deta          //

                 /  d   /  d            \\\  
   + R f[0](eta) |----- |----- f[0](eta)||| p
                 \ deta \ deta          ///  

     /  d   /  d   /  d   /  d            \\\\
   + |----- |----- |----- |----- f[0](eta)||||
     \ deta \ deta \ deta \ deta          ////

         /  d            \    
   - 1.0 |----- g[0](eta)| = 0
         \ deta          /    
A1:=diff(f[0](eta),eta$4)-2*K[r]*(diff(g[0](eta),eta))=0;
A2:=diff(f[1](eta),eta$4)-2*K[r]*(diff(g[1](eta),eta))-R*(diff(f[0](eta),eta))*(diff(f[0](eta),eta$2))+R*f[0](eta)*(diff(f[0](eta),eta$2))=0;
/  d   /  d   /  d   /  d            \\\\       /  d            \   
|----- |----- |----- |----- f[0](eta)|||| - 1.0 |----- g[0](eta)| =
\ deta \ deta \ deta \ deta          ////       \ deta          /   

  0
/  d   /  d   /  d   /  d            \\\\       /  d            \
|----- |----- |----- |----- f[1](eta)|||| - 1.0 |----- g[1](eta)|
\ deta \ deta \ deta \ deta          ////       \ deta          /

       /  d            \ /  d   /  d            \\
   - R |----- f[0](eta)| |----- |----- f[0](eta)||
       \ deta          / \ deta \ deta          //

                 /  d   /  d            \\    
   + R f[0](eta) |----- |----- f[0](eta)|| = 0
                 \ deta \ deta          //    
icsA1:=f[0](0)=0,D(f[0])(0)=1,g[0](0)=0,f[0](1)=lambda,D(f[0])(1)=0,g[0](1)=0;
icsA2:=f[1](0)=0,D(f[1])(0)=0,g[1](0)=0,f[1](1)=0,D(f[1])(1)=0,g[1](1)=0;
   f[0](0) = 0, D(f[0])(0) = 1, g[0](0) = 0, f[0](1) = 0.5,

     D(f[0])(1) = 0, g[0](1) = 0
    f[1](0) = 0, D(f[1])(0) = 0, g[1](0) = 0, f[1](1) = 0,

      D(f[1])(1) = 0, g[1](1) = 0
>
FORequ2;


B:=collect(expand(subs(f(eta)=f[0](eta)+f[1](eta)*p,g(eta)=g[0](eta)+g[1](eta)*p,hpm2)),p);
/      /  d            \          
|-1. R |----- f[1](eta)| g[1](eta)
\      \ deta          /          

                 /  d            \\  3   /
   + R f[1](eta) |----- g[1](eta)|| p  + |
                 \ deta          //      \
      /  d            \          
-1. R |----- f[0](eta)| g[1](eta)
      \ deta          /          

          /  d            \          
   - 1. R |----- f[1](eta)| g[0](eta)
          \ deta          /          

                 /  d            \
   + R f[0](eta) |----- g[1](eta)|
                 \ deta          /

                 /  d            \\  2   //  d   /  d            
   + R f[1](eta) |----- g[0](eta)|| p  + ||----- |----- g[1](eta)
                 \ deta          //      \\ deta \ deta          

  \\       /  d            \        /  d            \          
  || + 1.0 |----- f[1](eta)| - 1. R |----- f[0](eta)| g[0](eta)
  //       \ deta          /        \ deta          /          

                 /  d            \\     /  d   /  d            \\
   + R f[0](eta) |----- g[0](eta)|| p + |----- |----- g[0](eta)||
                 \ deta          //     \ deta \ deta          //

         /  d            \    
   + 1.0 |----- f[0](eta)| = 0
         \ deta          /    
B1:=diff(g[0](eta),eta$2)+2*K[r]*(diff(f[0](eta),eta))=0;
B2:=diff(g[1](eta),eta$2)+2*K[r]*(diff(f[1](eta),eta))-R*(diff(f[0](eta),eta))*g[0](eta)+R*f[0](eta)*(diff(g[0](eta),eta))=0;
     /  d   /  d            \\       /  d            \    
     |----- |----- g[0](eta)|| + 1.0 |----- f[0](eta)| = 0
     \ deta \ deta          //       \ deta          /    
       /  d   /  d            \\       /  d            \
       |----- |----- g[1](eta)|| + 1.0 |----- f[1](eta)|
       \ deta \ deta          //       \ deta          /

              /  d            \          
          - R |----- f[0](eta)| g[0](eta)
              \ deta          /          

                        /  d            \    
          + R f[0](eta) |----- g[0](eta)| = 0
                        \ deta          /    
icsB1:=f[0](0)=0,D(f[0])(0)=1,g[0](0)=0,f[0](1)=lambda,D(f[0])(1)=0,g[0](1)=0;
icsB2:=f[1](0)=0,D(f[1])(0)=0,g[1](0)=0,f[1](1)=0,D(f[1])(1)=0,g[1](1)=0;
   f[0](0) = 0, D(f[0])(0) = 1, g[0](0) = 0, f[0](1) = 0.5,

     D(f[0])(1) = 0, g[0](1) = 0
    f[1](0) = 0, D(f[1])(0) = 0, g[1](0) = 0, f[1](1) = 0,

      D(f[1])(1) = 0, g[1](1) = 0
> FORequ3;


C:=collect(expand(subs(theta(eta)=theta[0](eta)+theta[1](eta)*p,phi(eta)=phi[0](eta)+phi[1](eta)*p,f(eta)=f[0](eta)+f[1](eta)*p,hpm3)),p);
 /                                     
 |                /  d                \
 |10. R f[1](eta) |----- theta[1](eta)|
 \                \ deta              /

          /  d              \ /  d                \
    + 0.1 |----- phi[1](eta)| |----- theta[1](eta)|
          \ deta            / \ deta              /

                               2\                              
          /  d                \ |  3   /                /  d   
    + 0.1 |----- theta[1](eta)| | p  + |10. R f[0](eta) |-----
          \ deta              / /      \                \ deta

                \                   /  d                \
   theta[1](eta)| + 10. R f[1](eta) |----- theta[0](eta)|
                /                   \ deta              /

          /  d              \ /  d                \
    + 0.1 |----- phi[0](eta)| |----- theta[1](eta)|
          \ deta            / \ deta              /

          /  d              \ /  d                \
    + 0.1 |----- phi[1](eta)| |----- theta[0](eta)|
          \ deta            / \ deta              /

                                                            /
          /  d                \ /  d                \\  2   |/
    + 0.2 |----- theta[0](eta)| |----- theta[1](eta)|| p  + ||
          \ deta              / \ deta              //      \\

     d   /  d                \\
   ----- |----- theta[1](eta)||
    deta \ deta              //

                      /  d                \
    + 10. R f[0](eta) |----- theta[0](eta)|
                      \ deta              /

          /  d              \ /  d                \
    + 0.1 |----- phi[0](eta)| |----- theta[0](eta)|
          \ deta            / \ deta              /

                               2\  
          /  d                \ |  
    + 0.1 |----- theta[0](eta)| | p
          \ deta              / /  

      /  d   /  d                \\    
    + |----- |----- theta[0](eta)|| = 0
      \ deta \ deta              //    
C1:=diff(theta[0](eta),eta$2)=0;
C2:=diff(theta[1](eta), eta, eta)+Pr*R*f[0](eta)*(diff(theta[0](eta), eta))+Nb*(diff(phi[0](eta), eta))*(diff(theta[0](eta), eta))+Nt*(diff(theta[0](eta), eta))^2=0;
                  d   /  d                \    
                ----- |----- theta[0](eta)| = 0
                 deta \ deta              /    
       /  d   /  d                \\
       |----- |----- theta[1](eta)||
       \ deta \ deta              //

                           /  d                \
          + 10 R f[0](eta) |----- theta[0](eta)|
                           \ deta              /

                /  d              \ /  d                \
          + 0.1 |----- phi[0](eta)| |----- theta[0](eta)|
                \ deta            / \ deta              /

                                     2    
                /  d                \     
          + 0.1 |----- theta[0](eta)|  = 0
                \ deta              /     
icsC1:=theta[0](0)=1,theta[0](1)=0;
icsC2:=theta[1](0)=0,theta[1](1)=0,phi[0](0)=0,phi[0](1)=0;
                theta[0](0) = 1, theta[0](1) = 0
 theta[1](0) = 0, theta[1](1) = 0, phi[0](0) = 0, phi[0](1) = 0
> FORequ4;


E:=collect(expand(subs(theta(eta)=theta[0](eta)+theta[1](eta)*p,phi(eta)=phi[0](eta)+phi[1](eta)*p,f(eta)=f[0](eta)+f[1](eta)*p,hpm4)),p);
                 3 /  d              \   /                /  d   
0.5 R f[1](eta) p  |----- phi[1](eta)| + |0.5 R f[0](eta) |-----
                   \ deta            /   \                \ deta

             \                   /  d              \\  2   //
  phi[1](eta)| + 0.5 R f[1](eta) |----- phi[0](eta)|| p  + ||
             /                   \ deta            //      \\

    d   /  d              \\
  ----- |----- phi[1](eta)||
   deta \ deta            //

                 /  d   /  d                \\
   + 1.000000000 |----- |----- theta[1](eta)||
                 \ deta \ deta              //

                     /  d              \\  
   + 0.5 R f[0](eta) |----- phi[0](eta)|| p
                     \ deta            //  

     /  d   /  d              \\
   + |----- |----- phi[0](eta)||
     \ deta \ deta            //

                 /  d   /  d                \\    
   + 1.000000000 |----- |----- theta[0](eta)|| = 0
                 \ deta \ deta              //    
E1:=diff(phi[0](eta),eta$2)+Nt*(diff(theta[0](eta),eta$2))/Nb=0;
E2:=diff(phi[1](eta),eta$2)+Nt*(diff(theta[1](eta),eta$2))/Nb+R*Sc*f[0](eta)*(diff(phi[0](eta),eta))=0;
       /  d   /  d              \\
       |----- |----- phi[0](eta)||
       \ deta \ deta            //

                        /  d   /  d                \\    
          + 1.000000000 |----- |----- theta[0](eta)|| = 0
                        \ deta \ deta              //    
         /  d   /  d              \\
         |----- |----- phi[1](eta)||
         \ deta \ deta            //

                          /  d   /  d                \\
            + 1.000000000 |----- |----- theta[1](eta)||
                          \ deta \ deta              //

                              /  d              \    
            + 0.5 R f[0](eta) |----- phi[0](eta)| = 0
                              \ deta            /    
icsE1:=theta[0](0)=1,theta[0](1)=0,phi[0](0)=1,phi[0](1)=0;
icsE2:=theta[1](0)=0,theta[1](1)=0,phi[1](0)=0,phi[1](1)=0;
 theta[0](0) = 1, theta[0](1) = 0, phi[0](0) = 1, phi[0](1) = 0
 theta[1](0) = 0, theta[1](1) = 0, phi[1](0) = 0, phi[1](1) = 0
       
theta[0](eta) = -(152675527/100000000)*eta+1;
                                152675527        
              theta[0](eta) = - --------- eta + 1
                                100000000        
U:=f[1](eta)=0;
                         f[1](eta) = 0
Dsolve(A1,B1,icsA1,icsB1);
                  Dsolve(A1, B1, icsA1, icsB1)


sys:={ diff(g[0](eta), eta, eta)+1.0*(diff(f[0](eta), eta)) = 0, diff(f[0](eta), eta, eta, eta, eta)-1.0*(diff(g[0](eta), eta)) = 0};
    //  d   /  d   /  d   /  d            \\\\
   { |----- |----- |----- |----- f[0](eta)||||
    \\ deta \ deta \ deta \ deta          ////

            /  d            \      
      - 1.0 |----- g[0](eta)| = 0,
            \ deta          /      

     /  d   /  d            \\       /  d            \    \
     |----- |----- g[0](eta)|| + 1.0 |----- f[0](eta)| = 0 }
     \ deta \ deta          //       \ deta          /    /
IC_1:={ f[0](0) = 0, (D(f[0]))(0) = 1, g[0](0) = 0, f[0](1) = .5, (D(f[0]))(1) = 0, g[0](1) = 0,f[0](0) = 0, (D(f[0]))(0) = 1, g[0](0) = 0, f[0](1) = .5, (D(f[0]))(1) = 0, g[0](1) = 0};
    {f[0](0) = 0, f[0](1) = 0.5, g[0](0) = 0, g[0](1) = 0,

      D(f[0])(0) = 1, D(f[0])(1) = 0}
ans1 := combine(dsolve(sys union IC_1,{f[0](eta),g[0](eta)}),trig);
Error, (in dsolve) expecting an ODE or a set or list of ODEs. Received `union`(IC_1, sys)
>

Hello everybody.

I'm trying to obtain the numerical solution of a differential equation. Unfortunately, this prove to be quite challenging. I was able to obtain a rough solution using mathematica, but nothing more. The function is strictly increasing (for sure).

Any help is really REALLY appreciated, thanks!

 

``

deq1 := 1/(b-f(b)) = (2*(3-(1-f(b)*(diff(f(b), b, b)))/((diff(f(b), b))*(diff(f(b), b)))))/(1-2*(b-(1-f(b))/(diff(f(b), b))))

1/(b-f(b)) = 2*(3-(1-f(b)*(diff(diff(f(b), b), b)))/(diff(f(b), b))^2)/(1-2*b+2*(1-f(b))/(diff(f(b), b)))

(1)

ic1 := eval(f(b), b = 3/8) = 0, eval(f(b), b = 1/2) = 1/2

f(3/8) = 0, f(1/2) = 1/2

(2)

digits := 3

3

(3)

dsol1 := dsolve({deq1, ic1}, method = bvp[middefer], numeric, range = 3/8 .. 1/2)

Error, (in dsolve/numeric/bvp) initial Newton iteration is not converging

 

``

 

Download diffeqn.mw

How can i over come convergence error, i am unable to apply approxsoln appropriately and continouation as well. regards

N := 5;

-(1/2)*Pr*n*x*(diff(f(x), x))*(diff(theta(x), x))-(1/2)*Pr*(n+1)*f(x)*(diff(theta(x), x))-(1/2)*(n+1)*(diff(diff(theta(x), x), x))+Pr*gamma*((1/4)*(n^2-3*n+3)*x^2*(diff(f(x), x))*(diff(diff(f(x), x), x))*(diff(theta(x), x))+(1/4)*(2*n^2+5*n+3)*f(x)*(diff(f(x), x))*(diff(theta(x), x))+(1/4)*n(n+1)*x*f(x)*(diff(diff(f(x), x), x))*(diff(theta(x), x))+(1/4)*(2*n^2+3*n-3)*x*(diff(f(x), x))^2*(diff(theta(x), x))+(1/4)*(n-1)*x^2*(diff(diff(f(x), x), x))*(diff(theta(x), x))+(1/2)*n*(n+1)*x*f(x)*(diff(f(x), x))*(diff(diff(theta(x), x), x))+(1/4)*(n^2-1)*(diff(f(x), x))^2*(diff(theta(x), x))+(1/4)*(n+1)^2*f(x)^2*(diff(diff(theta(x), x), x))+(1/4)*(n-1)^2*x^2*(diff(f(x), x))^2*(diff(diff(theta(x), x), x))) = 0

(1)

bc := (D(theta))(0) = -Bi*(1-theta(0)), theta(N) = 0, f(0) = 0, (D(f))(0) = 0, (D(f))(N) = 1;

(D(theta))(0) = -Bi*(1-theta(0)), theta(5) = 0, f(0) = 0, (D(f))(0) = 0, (D(f))(5) = 1

(2)

a1 := dsolve(subs(beta = .1, n = .5, Pr = 10, gamma = .1, Bi = 50, {bc, eq1, eq2}), numeric, method = bvp[midrich], abserr = 10^(-8), output = array([seq(.1*i, i = 0 .. 10*N)]))

Error, (in dsolve/numeric/BVPSolve) initial Newton iteration is not converging

 

``

 

Download ehtasham.mwehtasham.mw

Dear all,

I am trying to solve the following system of equations by using dsolve, but I get the error:  error, (in RootOf) expression independent of, _Z, could you please help me to solve it. Thank you.

restart;
Digits := 20;
with(plots);
Nr := .1; Nb := .3; Nt := .1; Rb := 0; Lb := 1; Le := 10; Pe := 1; ss := .2; aa := .1; bb := .2; cc := .3; nn := 1.5;
Eq1 := nn.(diff(f(eta), eta))^(nn-1).(diff(f(eta), `$`(eta, 2)))-(nn+1)/(2.*nn+1).eta.(diff(theta(eta), eta)-Nr.(diff(h(eta), eta))-Rb.(diff(g(eta), eta))) = 0;
Eq2 := diff(theta(eta), `$`(eta, 2))+nn/(2.*nn+1).f(eta).(diff(theta(eta), eta))+Nb.(diff(theta(eta), eta)).(diff(h(eta), eta))+Nt.((diff(theta(eta), eta))^2) = 0;
Eq3 := diff(h(eta), `$`(eta, 2))+nn/(2.*nn+1).Le.f(eta).(diff(h(eta), eta))+Nt/Nb.(diff(theta(eta), `$`(eta, 2))) = 0;
Eq4 := diff(g(eta), `$`(eta, 2))+nn/(2.*nn+1).Lb.f(eta).(diff(g(eta), eta))-Pe.((diff(g(eta), eta)).(diff(h(eta), eta))+(diff(h(eta), `$`(eta, 2))).g(eta)) = 0;
etainf := 10;
bcs := f(0) = ss/Le.(D(h))(0), theta(0) = lambda+aa.(D(theta))(0), h(0) = lambda+bb.(D(h))(0), g(0) = lambda+cc.(D(g))(0), (D(f))(etainf) = 0, theta(etainf) = 0, h(etainf) = 0, g(etainf) = 0;
dsys := {Eq1, Eq2, Eq3, Eq4, bcs};
dsol := dsolve(dsys, numeric, continuation = lambda, output = procedurelist);
Error, (in RootOf) expression independent of, _Z

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