salim-barzani

1560 Reputation

9 Badges

1 years, 22 days

MaplePrimes Activity


These are questions asked by salim-barzani

this example is easiest one for getting solution but i can't collect each part and do like elite i can do each part seperatly but it take to much time i want collect solution and do by easier way if possible this is a laplace adomian decomposition methd which contain adomian polynomial too i want upgrade the code, can any one help the  process for get better vision of this topic 
i do upload some picture and my mw. for more undrestanding

and please can any one explan why when i take laplace why is write D[2](u)(x, 0) must be D[1]?

restart

with(inttrans)

with(PDEtools)

with(LinearAlgebra)

NULL

with(SolveTools)

undeclare(prime)

`There is no more prime differentiation variable; all derivatives will be displayed as indexed functions`

(1)

with(PDEtools)

declare()

`Declared :`

 

u(x, t)*`to be displayed as`*u

 

`The prime differentiation variable has not been declared yet`

 

`Displayed derivatives and declared functions will be copied and pasted "as they were entered"`

(2)

declare(u(x, t))

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

(3)

eq := diff(u(x, t), `$`(t, 2))+u(x, t)^2-(diff(u(x, t), x))^2 = 0

diff(diff(u(x, t), t), t)+u(x, t)^2-(diff(u(x, t), x))^2 = 0

(4)

NULL

eqs := laplace(eq, t, s)

s^2*laplace(u(x, t), t, s)-(D[2](u))(x, 0)-s*u(x, 0)+laplace(u(x, t)^2, t, s)-laplace((diff(u(x, t), x))^2, t, s) = 0

(5)

solve({eqs}, {laplace(u(x, t), t, s)})

{laplace(u(x, t), t, s) = (s*u(x, 0)+(D[2](u))(x, 0)-laplace(u(x, t)^2, t, s)+laplace((diff(u(x, t), x))^2, t, s))/s^2}

(6)

subs({u(x, 0) = 0, (D[2](u))(x, 0) = exp(x)}, %)

{laplace(u(x, t), t, s) = (exp(x)-laplace(u(x, t)^2, t, s)+laplace((diff(u(x, t), x))^2, t, s))/s^2}

(7)

eq3 := invlaplace(%, s, t)

{u(x, t) = exp(x)*t-(int(u(x, _U1)^2*(t-_U1), _U1 = 0 .. t))+int((diff(u(x, _U1), x))^2*(t-_U1), _U1 = 0 .. t)}

(8)

NULL

NULL

NULL

"u[0](x,t):=exp(x)*t"

proc (x, t) options operator, arrow, function_assign; exp(x)*t end proc

(9)

n := N

N

(10)

k := K

K

(11)

f := proc (u) options operator, arrow; u^2 end proc

proc (u) options operator, arrow; u^2 end proc

(12)

for j from 0 to 3 do A[j] := subs(lambda = 0, (diff(f(seq(sum(lambda^i*u[i](x, t), i = 0 .. 20), m = 1 .. 2)), [`$`(lambda, j)]))/factorial(j)) end do

(exp(x))^2*t^2

 

2*exp(x)*t*u[1](x, t)

 

u[1](x, t)^2+2*exp(x)*t*u[2](x, t)

 

2*u[1](x, t)*u[2](x, t)+2*exp(x)*t*u[3](x, t)

(13)

NULL

NULL

n := N

N

(14)

k := K

K

(15)

f := proc (u) options operator, arrow; (diff(u, x))^2 end proc

proc (u) options operator, arrow; (diff(u, x))^2 end proc

(16)

for j from 0 to 3 do B[j] := subs(lambda = 0, (diff(f(seq(sum(lambda^i*u[i](x, t), i = 0 .. 20), m = 1 .. 2)), [`$`(lambda, j)]))/factorial(j)) end do

(exp(x))^2*t^2

 

2*exp(x)*t*(diff(u[1](x, t), x))

 

(diff(u[1](x, t), x))^2+2*exp(x)*t*(diff(u[2](x, t), x))

 

2*(diff(u[1](x, t), x))*(diff(u[2](x, t), x))+2*exp(x)*t*(diff(u[3](x, t), x))

(17)

"#` know we need find all term of  u[0]=exp(x)*t` #` u`[1]=-invlaplace(1/(s^(2))(`A__0`+`B__0`))  u[2]=-invlaplace(1/(s^(2))(`A__1`+`B__1`))   ans so on ... at end i want collect all of them and find final result even if is aproximate and want do test of pde too "

NULL

Download explananing_of_get_solution.mw

Almost i did 10 method for this ode equation all of them are succes but this one is giving me some confusing and i am looking for  get my answer, the mothod say if we have the auxilary equation if substitute the solution of this auxilary equation in our series solution then substitute in ode equation must be satisfy but it is not satisfy so when he did assumption for the auxilary equation he say it satisfy if we sabstitute this assumption in our series solution!

My question is this how we get thus assumption ? and why finding exact  solution of auxilary equation not satisfy?

restart

with(PDEtools)

with(LinearAlgebra)

with(Physics)

with(SolveTools)

undeclare(prime)

`There is no more prime differentiation variable; all derivatives will be displayed as indexed functions`

(1)

NULL

Fode := (-delta*eta^2+alpha*eta)*(diff(diff(U(xi), xi), xi))-U(xi)*(2*eta*gamma*theta*(delta*eta-alpha)*U(xi)^2+eta^2*delta*k^2+(-alpha*k^2-2*delta*k)*eta+2*k*alpha+delta) = 0

(-delta*eta^2+alpha*eta)*(diff(diff(U(xi), xi), xi))-U(xi)*(2*gamma*eta*theta*(delta*eta-alpha)*U(xi)^2+eta^2*delta*k^2+(-alpha*k^2-2*delta*k)*eta+2*k*alpha+delta) = 0

(2)

NULL

F := sum(a[i]*G(xi)^i, i = 0 .. 1)

a[0]+a[1]*G(xi)

(3)

``

(4)

D1 := diff(F, xi)

a[1]*(diff(G(xi), xi))

(5)

NULL

S := (diff(G(xi), xi))^2 = G(xi)^4+A[2]*G(xi)^2+A[1]

(diff(G(xi), xi))^2 = G(xi)^4+A[2]*G(xi)^2+A[1]

(6)

S1 := diff(G(xi), xi) = sqrt(G(xi)^4+A[2]*G(xi)^2+A[1])

diff(G(xi), xi) = (G(xi)^4+A[2]*G(xi)^2+A[1])^(1/2)

(7)

E1 := subs(S1, D1)

a[1]*(G(xi)^4+A[2]*G(xi)^2+A[1])^(1/2)

(8)

D2 := diff(E1, xi)

(1/2)*a[1]*(4*G(xi)^3*(diff(G(xi), xi))+2*A[2]*G(xi)*(diff(G(xi), xi)))/(G(xi)^4+A[2]*G(xi)^2+A[1])^(1/2)

(9)

E2 := subs(S1, D2)

(1/2)*a[1]*(4*G(xi)^3*(G(xi)^4+A[2]*G(xi)^2+A[1])^(1/2)+2*A[2]*G(xi)*(G(xi)^4+A[2]*G(xi)^2+A[1])^(1/2))/(G(xi)^4+A[2]*G(xi)^2+A[1])^(1/2)

(10)

K := U(xi) = F

U(xi) = a[0]+a[1]*G(xi)

(11)

K1 := diff(U(xi), xi) = E1

diff(U(xi), xi) = a[1]*(G(xi)^4+A[2]*G(xi)^2+A[1])^(1/2)

(12)

K2 := diff(U(xi), xi, xi) = E2

diff(diff(U(xi), xi), xi) = (1/2)*a[1]*(4*G(xi)^3*(G(xi)^4+A[2]*G(xi)^2+A[1])^(1/2)+2*A[2]*G(xi)*(G(xi)^4+A[2]*G(xi)^2+A[1])^(1/2))/(G(xi)^4+A[2]*G(xi)^2+A[1])^(1/2)

(13)

L := eval(Fode, {K, K1, K2})

(1/2)*(-delta*eta^2+alpha*eta)*a[1]*(4*G(xi)^3*(G(xi)^4+A[2]*G(xi)^2+A[1])^(1/2)+2*A[2]*G(xi)*(G(xi)^4+A[2]*G(xi)^2+A[1])^(1/2))/(G(xi)^4+A[2]*G(xi)^2+A[1])^(1/2)-(a[0]+a[1]*G(xi))*(2*gamma*eta*theta*(delta*eta-alpha)*(a[0]+a[1]*G(xi))^2+eta^2*delta*k^2+(-alpha*k^2-2*delta*k)*eta+2*k*alpha+delta) = 0

(14)

L1 := normal((1/2)*(-delta*eta^2+alpha*eta)*a[1]*(4*G(xi)^3*(G(xi)^4+A[2]*G(xi)^2+A[1])^(1/2)+2*A[2]*G(xi)*(G(xi)^4+A[2]*G(xi)^2+A[1])^(1/2))/(G(xi)^4+A[2]*G(xi)^2+A[1])^(1/2)-(a[0]+a[1]*G(xi))*(2*gamma*eta*theta*(delta*eta-alpha)*(a[0]+a[1]*G(xi))^2+eta^2*delta*k^2+(-alpha*k^2-2*delta*k)*eta+2*k*alpha+delta) = 0)

 

collect(L1, {G(xi)})

(-2*delta*eta^2*gamma*theta*a[1]^3+2*alpha*eta*gamma*theta*a[1]^3-2*delta*eta^2*a[1]+2*alpha*eta*a[1])*G(xi)^3+(-6*delta*eta^2*gamma*theta*a[0]*a[1]^2+6*alpha*eta*gamma*theta*a[0]*a[1]^2)*G(xi)^2+(-6*delta*eta^2*gamma*theta*a[0]^2*a[1]+6*alpha*eta*gamma*theta*a[0]^2*a[1]-delta*eta^2*k^2*a[1]+alpha*eta*k^2*a[1]-delta*eta^2*A[2]*a[1]+alpha*eta*A[2]*a[1]+2*delta*eta*k*a[1]-2*alpha*k*a[1]-delta*a[1])*G(xi)-2*gamma*delta*eta^2*theta*a[0]^3+2*gamma*alpha*eta*theta*a[0]^3-delta*eta^2*k^2*a[0]+alpha*eta*k^2*a[0]+2*delta*eta*k*a[0]-2*alpha*k*a[0]-delta*a[0] = 0

(15)

eq0 := -2*delta*eta^2*gamma*theta*a[0]^3+2*alpha*eta*gamma*theta*a[0]^3-delta*eta^2*k^2*a[0]+alpha*eta*k^2*a[0]+2*delta*eta*k*a[0]-2*alpha*k*a[0]-delta*a[0] = 0

eq1 := -6*delta*eta^2*gamma*theta*a[0]^2*a[1]+6*alpha*eta*gamma*theta*a[0]^2*a[1]-delta*eta^2*k^2*a[1]+alpha*eta*k^2*a[1]-delta*eta^2*A[2]*a[1]+alpha*eta*A[2]*a[1]+2*delta*eta*k*a[1]-2*alpha*k*a[1]-delta*a[1] = 0

eq2 := -6*delta*eta^2*gamma*theta*a[0]*a[1]^2+6*alpha*eta*gamma*theta*a[0]*a[1]^2 = 0

eq3 := -2*delta*eta^2*gamma*theta*a[1]^3+2*alpha*eta*gamma*theta*a[1]^3-2*delta*eta^2*a[1]+2*alpha*eta*a[1] = 0

COEFFS := solve({eq0, eq1, eq2, eq3}, {alpha, eta, a[0], a[1]}, explicit)

case1 := COEFFS[4]

{alpha = delta*(eta^2*k^2+eta^2*A[2]-2*eta*k+1)/(eta*k^2+eta*A[2]-2*k), eta = eta, a[0] = 0, a[1] = 1/(-gamma*theta)^(1/2)}

(16)

NULL

S

(diff(G(xi), xi))^2 = G(xi)^4+A[2]*G(xi)^2+A[1]

(17)

S1

diff(G(xi), xi) = (G(xi)^4+A[2]*G(xi)^2+A[1])^(1/2)

(18)

S2 := dsolve(S, G(xi))

G(xi) = -(1/2)*(-2*A[2]-2*(A[2]^2-4*A[1])^(1/2))^(1/2), G(xi) = (1/2)*(-2*A[2]-2*(A[2]^2-4*A[1])^(1/2))^(1/2), G(xi) = -(1/2)*(2*(A[2]^2-4*A[1])^(1/2)-2*A[2])^(1/2), G(xi) = (1/2)*(2*(A[2]^2-4*A[1])^(1/2)-2*A[2])^(1/2), G(xi) = JacobiSN((1/2)*(2*(A[2]^2-4*A[1])^(1/2)-2*A[2])^(1/2)*xi+c__1, (-2*(A[2]*(A[2]^2-4*A[1])^(1/2)-A[2]^2+2*A[1])*A[1])^(1/2)/(A[2]*(A[2]^2-4*A[1])^(1/2)-A[2]^2+2*A[1]))*A[1]*2^(1/2)/(A[1]*(-A[2]+(A[2]^2-4*A[1])^(1/2)))^(1/2)

(19)

K

U(xi) = a[0]+a[1]*G(xi)

(20)

K4 := subs(case1, K)

U(xi) = G(xi)/(-gamma*theta)^(1/2)

(21)

NULL

K5 := subs(S2, K4)

U(xi) = -(1/2)*(-2*A[2]-2*(A[2]^2-4*A[1])^(1/2))^(1/2)/(-gamma*theta)^(1/2)

(22)

NULL

F2 := subs(case1, Fode)

(-eta^2*delta+delta*(eta^2*k^2+eta^2*A[2]-2*eta*k+1)*eta/(eta*k^2+eta*A[2]-2*k))*(diff(diff(U(xi), xi), xi))-U(xi)*(2*gamma*eta*theta*(delta*eta-delta*(eta^2*k^2+eta^2*A[2]-2*eta*k+1)/(eta*k^2+eta*A[2]-2*k))*U(xi)^2+eta^2*delta*k^2+(-k^2*delta*(eta^2*k^2+eta^2*A[2]-2*eta*k+1)/(eta*k^2+eta*A[2]-2*k)-2*k*delta)*eta+2*k*delta*(eta^2*k^2+eta^2*A[2]-2*eta*k+1)/(eta*k^2+eta*A[2]-2*k)+delta) = 0

(23)

``

(24)

NULL

odetest(K5, F2)

-(1/2)*delta*eta*(A[2]^2-4*A[1])^(1/2)*(-2*(A[2]+(A[2]^2-4*A[1])^(1/2))/gamma)^(1/2)/((eta*k^2+eta*A[2]-2*k)*(-theta)^(1/2))

(25)


and i hope mapleprimes don't delete this question becuase of this pictures also it help for undrestanding

 

there is other picture for different auxilary equation just  add one multiply term for G(xi)^4 in case anyone needed i will upload

Download odetest.mw

how fixed that?

NULL

restart

NULL

A := Vector[row]([4, 0, 5])

Vector[row](%id = 36893490313998292860)

(1)

B := Vector[row]([3, 1, 0])

Vector[row](%id = 36893490313998279372)

(2)

C := Vector[row]([2, 1, 1])

Vector[row](%id = 36893490313998273820)

(3)

C.`&x`(A, B)

9

(4)

NULL

Download we.mw

In many papers, I've noticed that the solution to an ODE (ordinary differential equation) often emerges directly when there's only a single function involved. My question is: is there a way to generate solutions to an ODE by producing specific parameters?

 

restart

with(PDEtools)

with(LinearAlgebra)

with(Physics)

with(SolveTools)

undeclare(prime)

`There is no more prime differentiation variable; all derivatives will be displayed as indexed functions`

(1)

NULL

S := diff(F(xi), xi) = sqrt(P*F(xi)^4+Q*F(xi)^2+R)

diff(F(xi), xi) = (P*F(xi)^4+Q*F(xi)^2+R)^(1/2)

(2)

S1 := dsolve(S, F(xi))

xi-Intat(1/(P*_a^4+Q*_a^2+R)^(1/2), _a = F(xi))+c__1 = 0

(3)

S2 := (diff(F(xi), xi))^2 = P*F(xi)^4+Q*F(xi)^2+R

(diff(F(xi), xi))^2 = P*F(xi)^4+Q*F(xi)^2+R

(4)

S3 := dsolve(S2, F(xi))

F(xi) = -(1/2)*(-2*P*(Q+(-4*P*R+Q^2)^(1/2)))^(1/2)/P, F(xi) = (1/2)*(-2*P*(Q+(-4*P*R+Q^2)^(1/2)))^(1/2)/P, F(xi) = -(1/2)*2^(1/2)*(P*(-Q+(-4*P*R+Q^2)^(1/2)))^(1/2)/P, F(xi) = (1/2)*2^(1/2)*(P*(-Q+(-4*P*R+Q^2)^(1/2)))^(1/2)/P, F(xi) = JacobiSN((1/2)*(2*(-4*P*R+Q^2)^(1/2)-2*Q)^(1/2)*xi+c__1, (-2*(Q*(-4*P*R+Q^2)^(1/2)+2*R*P-Q^2)*R*P)^(1/2)/(Q*(-4*P*R+Q^2)^(1/2)+2*R*P-Q^2))*R*2^(1/2)/(R*(-Q+(-4*P*R+Q^2)^(1/2)))^(1/2)

(5)
 

NULL

Download get_all_solution_of_ode_by_generation.mw

i can do one by one for all case but i am intrested for this idea how we can do that for each equation automatically calculate all case without use one by one case ?
there is any other shorter way for get solution of this mw

all_case.mw

restart

with(PDEtools)

undeclare(prime)

`There is no more prime differentiation variable; all derivatives will be displayed as indexed functions`

(1)

with(DEtools)

S := diff(G(xi), xi) = G(xi)^2+A*G(xi)+B

diff(G(xi), xi) = G(xi)^2+A*G(xi)+B

(2)

S1 := dsolve(S, G(xi))

G(xi) = -(1/2)*A-(1/2)*tanh((1/2)*(A^2-4*B)^(1/2)*(c__1+xi))*(A^2-4*B)^(1/2)

(3)

A := 0

0

(4)

S

diff(G(xi), xi) = G(xi)^2+B

(5)

dsolve(S, G(xi))

G(xi) = tan(B^(1/2)*(c__1+xi))*B^(1/2)

(6)

restart

NULL

with(PDEtools)

undeclare(prime)

`There is no more prime differentiation variable; all derivatives will be displayed as indexed functions`

(7)

with(DEtools)

S := diff(G(xi), xi) = G(xi)^2+A*G(xi)+B

diff(G(xi), xi) = G(xi)^2+A*G(xi)+B

(8)

B := 0

0

(9)

S1 := dsolve(S, G(xi))

G(xi) = A/(-1+exp(-A*xi)*c__1*A)

(10)

NULL

restart

NULL

with(PDEtools)

undeclare(prime)

`There is no more prime differentiation variable; all derivatives will be displayed as indexed functions`

(11)

with(DEtools)

S := diff(G(xi), xi) = G(xi)^2+A*G(xi)+B

diff(G(xi), xi) = G(xi)^2+A*G(xi)+B

(12)

B := 0; A := 0

0

 

0

(13)

S1 := dsolve(S, G(xi))

G(xi) = 1/(-xi+c__1)

(14)
 

NULL

Download find_all_case_solution_of_ode_.mw

First 22 23 24 25 26 27 28 Last Page 24 of 33