salim-barzani

165 Reputation

3 Badges

0 years, 152 days

MaplePrimes Activity


These are questions asked by salim-barzani

i am looking for simplify this type of simplifying assume beta is Real and there is any stuf package for working with complex and conjugate automaticaly

NULL

restart

with(inttrans)

with(PDEtools)

with(DEtools)

with(DifferentialAlgebra)

"with(Student[ODEs][Solve]): "

with(IntegrationTools)

with(inttrans)

with(PDEtools)

with(Physics)

with(PolynomialTools)

with(RootFinding)

with(SolveTools)

with(LinearAlgebra)

with(sumtools)

declare(u(x, t), conjugate(u(x, t)))

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

(1)

undeclare(prime)

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

(2)

B__0 := I*G(x)^3*conjugate(G(x))^2+(2*I)*G(x)^2*(diff(G(x), x))+(2*I)*(diff(G(x), x))*G(x)*conjugate(G(x))

I*G(x)^3*conjugate(G(x))^2+(2*I)*G(x)^2*(diff(G(x), x))+(2*I)*(diff(G(x), x))*G(x)*conjugate(G(x))

(3)

"G(x):=beta*exp(I*x) "

proc (x) options operator, arrow, function_assign; Physics:-`*`(beta, exp(Physics:-`*`(I, x))) end proc

(4)

R__0 := diff(G(x), `$`(x, 2))

-beta*exp(I*x)

(5)

B__0

I*beta^3*(exp(I*x))^3*conjugate(beta*exp(I*x))^2-2*beta^3*(exp(I*x))^3-2*beta^2*(exp(I*x))^2*conjugate(beta*exp(I*x))

(6)

"#`B__0 `must equal to (I*beta^(5)*exp(I*x)) after simplify betwen expresion  what code need i don't know"?""

B1 := laplace(B__0, t, s)

(-2*beta^2*exp((2*I)*x)*conjugate(beta*exp(I*x))+(I*conjugate(beta*exp(I*x))+1+I)*(conjugate(beta*exp(I*x))+(-1+I))*exp((3*I)*x)*beta^3)/s

(7)

R1 := laplace(R__0, t, s)

-beta*exp(I*x)/s

(8)

B2 := invlaplace(B1/s, s, t)

(-2*beta^2*exp((2*I)*x)*conjugate(beta*exp(I*x))+(I*conjugate(beta*exp(I*x))+1+I)*(conjugate(beta*exp(I*x))+(-1+I))*exp((3*I)*x)*beta^3)*t

(9)

R2 := invlaplace(R1/s, s, t)

-beta*exp(I*x)*t

(10)

Sol := B2+R2

(-2*beta^2*exp((2*I)*x)*conjugate(beta*exp(I*x))+(I*conjugate(beta*exp(I*x))+1+I)*(conjugate(beta*exp(I*x))+(-1+I))*exp((3*I)*x)*beta^3)*t-beta*exp(I*x)*t

(11)

simplify((-2*beta^2*exp((2*I)*x)*conjugate(beta*exp(I*x))+(I*conjugate(beta*exp(I*x))+1+I)*(conjugate(beta*exp(I*x))+(-1+I))*exp((3*I)*x)*beta^3)*t-beta*exp(I*x)*t)

(I*exp((3*I)*x)*conjugate(beta*exp(I*x))^2*beta^2-2*exp((2*I)*x)*conjugate(beta*exp(I*x))*beta-2*exp((3*I)*x)*beta^2-exp(I*x))*beta*t

(12)

expand((I*exp((3*I)*x)*conjugate(beta*exp(I*x))^2*beta^2-2*exp((2*I)*x)*conjugate(beta*exp(I*x))*beta-2*exp((3*I)*x)*beta^2-exp(I*x))*beta*t)

I*beta^3*t*(exp(I*x))^3*conjugate(beta)^2*(exp(-I*conjugate(x)))^2-2*t*beta^2*(exp(I*x))^2*conjugate(beta)*exp(-I*conjugate(x))-2*t*(exp(I*x))^3*beta^3-beta*exp(I*x)*t

(13)
 

NULL

Download simplify.mw

Hi
i write my code for calculate this type of function but the result is so different from mine i  will post here i hope someone tell me where is problem

i have this

i want this

Download EX1.mw

Hi
i did calculation part by part of adomian laplace method but if we can make a loop for it is gonna be so great and take back a lot of time

restart

with(inttrans)

pde := diff(u(x, t), t)+u(x, t)*(diff(u(x, t), x)) = t^2*x+x

diff(u(x, t), t)+u(x, t)*(diff(u(x, t), x)) = t^2*x+x

(1)

eq := laplace(pde, t, s)

s*laplace(u(x, t), t, s)-u(x, 0)+laplace(u(x, t)*(diff(u(x, t), x)), t, s) = x*(s^2+2)/s^3

(2)

eq2 := subs({u(x, 0) = 0}, eq)

s*laplace(u(x, t), t, s)+laplace(u(x, t)*(diff(u(x, t), x)), t, s) = x*(s^2+2)/s^3

(3)

NULL

lap := s^alpha*laplace(u(x, t), t, s) = x*(s^2+2)/s^3-laplace(u(x, t)*(diff(u(x, t), x)), t, s)

s^alpha*laplace(u(x, t), t, s) = x*(s^2+2)/s^3-laplace(u(x, t)*(diff(u(x, t), x)), t, s)

(4)

lap1 := lap/s^alpha

laplace(u(x, t), t, s) = (x*(s^2+2)/s^3-laplace(u(x, t)*(diff(u(x, t), x)), t, s))/s^alpha

(5)

NULL

lap2 := invlaplace(lap1, s, t)

u(x, t) = -invlaplace(s^(-alpha)*laplace(u(x, t)*(diff(u(x, t), x)), t, s), s, t)+x*(invlaplace(s^(-1-alpha), s, t)+2*invlaplace(s^(-3-alpha), s, t))

(6)

NULL

lap3 := u(x, t) = t^alpha*x/GAMMA(alpha+1)+2*x*t^(alpha+2)/GAMMA(alpha+3)-invlaplace(laplace(u(x, t)*(diff(u(x, t), x)), t, s)/s^alpha, s, t)

u(x, t) = t^alpha*x/GAMMA(1+alpha)+2*x*t^(alpha+2)/GAMMA(3+alpha)-invlaplace(laplace(u(x, t)*(diff(u(x, t), x)), t, s)/s^alpha, s, t)

(7)

NULL

NULL

NULL

NULL

``

(8)

u[1](x, t) = -invlaplace(laplace(u[0](x, t)*(diff(u[0](x, t), x)), t, s)/s^alpha, s, t)

u[1](x, t) = -invlaplace(laplace(u[0](x, t)*(diff(u[0](x, t), x)), t, s)/s^alpha, s, t)

(9)

"u[0](x,t):=(t^alpha x)/(GAMMA(1+alpha))+(2 x t^(alpha+2))/(GAMMA(3+alpha))"

proc (x, t) options operator, arrow, function_assign; t^alpha*x/GAMMA(1+alpha)+2*x*t^(alpha+2)/GAMMA(3+alpha) end proc

(10)

n := N

N

(11)

k := K

K

(12)

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

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

(13)

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

(t^alpha*x/GAMMA(1+alpha)+2*x*t^(alpha+2)/GAMMA(3+alpha))*(t^alpha/GAMMA(1+alpha)+2*t^(alpha+2)/GAMMA(3+alpha))

 

u[1](x, t)*(t^alpha/GAMMA(1+alpha)+2*t^(alpha+2)/GAMMA(3+alpha))+(t^alpha*x/GAMMA(1+alpha)+2*x*t^(alpha+2)/GAMMA(3+alpha))*(diff(u[1](x, t), x))

 

u[2](x, t)*(t^alpha/GAMMA(1+alpha)+2*t^(alpha+2)/GAMMA(3+alpha))+u[1](x, t)*(diff(u[1](x, t), x))+(t^alpha*x/GAMMA(1+alpha)+2*x*t^(alpha+2)/GAMMA(3+alpha))*(diff(u[2](x, t), x))

 

u[3](x, t)*(t^alpha/GAMMA(1+alpha)+2*t^(alpha+2)/GAMMA(3+alpha))+u[2](x, t)*(diff(u[1](x, t), x))+u[1](x, t)*(diff(u[2](x, t), x))+(t^alpha*x/GAMMA(1+alpha)+2*x*t^(alpha+2)/GAMMA(3+alpha))*(diff(u[3](x, t), x))

(14)

S1 := u[1](x, t) = -invlaplace((t^alpha*x/GAMMA(1+alpha)+2*x*t^(alpha+2)/GAMMA(3+alpha))*(t^alpha/GAMMA(1+alpha)+2*t^(alpha+2)/GAMMA(3+alpha))/s^alpha, s, t)

u[1](x, t) = -x*(t^alpha)^2*invlaplace(s^(-alpha), s, t)*(1/GAMMA(1+alpha)^2+4*t^2/(GAMMA(3+alpha)*GAMMA(1+alpha))+4*t^4/GAMMA(3+alpha)^2)

(15)

NULL

NULL

u[1](x, t) = x*GAMMA(2*alpha+1)*t^(3*alpha)/(GAMMA(1+alpha)^2*GAMMA(3*alpha+1))-4*x*GAMMA(2*alpha+3)*t^(3*alpha+2)/(GAMMA(1+alpha)*GAMMA(3+alpha)*GAMMA(3*alpha+3))-4*`xΓ`(2*alpha+5)/(GAMMA(3+alpha)^2*GAMMA(3*alpha+3))

u[1](x, t) = x*GAMMA(2*alpha+1)*t^(3*alpha)/(GAMMA(1+alpha)^2*GAMMA(3*alpha+1))-4*x*GAMMA(2*alpha+3)*t^(3*alpha+2)/(GAMMA(1+alpha)*GAMMA(3+alpha)*GAMMA(3*alpha+3))-4*`xΓ`(2*alpha+5)/(GAMMA(3+alpha)^2*GAMMA(3*alpha+3))

(16)

NULL

u[2](x, t) = -invlaplace(laplace(u[1](x, t)*(diff(u(x, t), x)), t, s)/s^alpha, s, t)

NULL

NULL


for get definition use this pdf for fractional derivation

[Copyrighted material removed by moderator - see https://doi.org/10.4236/am.2018.94032]

Download solving_example_1.mw

Hi

i use other code for equation too when i use allvalues(Root(...)) it is more near but question is this why not satisfy the ode equation this is my equation this parameter are find for this ODe why not satisfy otherwise my equestions must be wrong!

restart

with(PDEtools)

undeclare(prime)

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

(1)

with(DEtools)

``

with(LinearAlgebra)

with(sumtools)

eq0 := 2*beta*g[1]^3*r[0]^3+2*p^2*sigma*g[1]*r[0]^3 = 0

eq1 := 6*beta*g[1]^3*r[0]^2*r[1]+3*p^2*sigma*g[1]*r[0]^2*r[1]+6*beta*f[0]*g[1]^2*r[0]^2 = 0

eq2 := 6*beta*g[1]^3*r[0]^2*r[2]+6*beta*g[1]^3*r[0]*r[1]^2+2*p^2*sigma*g[1]*r[0]^2*r[2]+p^2*sigma*g[1]*r[0]*r[1]^2+12*beta*f[0]*g[1]^2*r[0]*r[1]+6*beta*f[1]*g[1]^2*r[0]^2+6*beta*f[0]^2*g[1]*r[0]-k^2*sigma*g[1]*r[0]-2*w*g[1]*r[0] = 0

eq3 := 12*beta*g[1]^3*r[0]*r[1]*r[2]+2*beta*g[1]^3*r[1]^3+2*p^2*sigma*g[1]*r[0]*r[1]*r[2]+12*beta*f[0]*g[1]^2*r[0]*r[2]+6*beta*f[0]*g[1]^2*r[1]^2+12*beta*f[1]*g[1]^2*r[0]*r[1]+p^2*sigma*f[1]*r[0]*r[1]+6*beta*f[0]^2*g[1]*r[1]+12*beta*f[0]*f[1]*g[1]*r[0]-k^2*sigma*g[1]*r[1]+2*beta*f[0]^3-k^2*sigma*f[0]-2*w*g[1]*r[1]-2*w*f[0] = 0

eq4 := 6*beta*g[1]^3*r[0]*r[2]^2+6*beta*g[1]^3*r[1]^2*r[2]+2*p^2*sigma*g[1]*r[0]*r[2]^2+p^2*sigma*g[1]*r[1]^2*r[2]+12*beta*f[0]*g[1]^2*r[1]*r[2]+12*beta*f[1]*g[1]^2*r[0]*r[2]+6*beta*f[1]*g[1]^2*r[1]^2+2*p^2*sigma*f[1]*r[0]*r[2]+p^2*sigma*f[1]*r[1]^2+6*beta*f[0]^2*g[1]*r[2]+12*beta*f[0]*f[1]*g[1]*r[1]+6*beta*f[1]^2*g[1]*r[0]-k^2*sigma*g[1]*r[2]+6*beta*f[0]^2*f[1]-k^2*sigma*f[1]-2*w*g[1]*r[2]-2*w*f[1] = 0

eq5 := 6*beta*g[1]^3*r[1]*r[2]^2+3*p^2*sigma*g[1]*r[1]*r[2]^2+6*beta*f[0]*g[1]^2*r[2]^2+12*beta*f[1]*g[1]^2*r[1]*r[2]+3*p^2*sigma*f[1]*r[1]*r[2]+12*beta*f[0]*f[1]*g[1]*r[2]+6*beta*f[1]^2*g[1]*r[1]+6*beta*f[0]*f[1]^2 = 0

eq6 := 2*beta*g[1]^3*r[2]^3+2*p^2*sigma*g[1]*r[2]^3+6*beta*f[1]*g[1]^2*r[2]^2+2*p^2*sigma*f[1]*r[2]^2+6*beta*f[1]^2*g[1]*r[2]+2*beta*f[1]^3 = 0

NULL

NULL

COEFFS := solve({eq0, eq1, eq2, eq3, eq4, eq5, eq6}, {p, f[0], f[1], g[1]}, explicit)

NULL

ode := 2*beta*U(xi)^3+(-k^2*sigma-2*w)*U(xi)+(diff(diff(U(xi), xi), xi))*p^2*sigma = 0

2*beta*U(xi)^3+(-k^2*sigma-2*w)*U(xi)+(diff(diff(U(xi), xi), xi))*p^2*sigma = 0

(2)

P := f[0]+sum(f[i]*R(xi)^i, i = 1 .. 1)+sum(g[i]*((diff(R(xi), xi))/R(xi))^i, i = 1 .. 1)

f[0]+f[1]*R(xi)+g[1]*(diff(R(xi), xi))/R(xi)

(3)

case1 := {p = -sqrt(2)*sqrt(sigma*(4*r[0]*r[2]-r[1]^2)*(k^2*sigma+2*w))/(sigma*(4*r[0]*r[2]-r[1]^2)), f[0] = -(k^2*sigma+2*w)*r[1]/sqrt(-2*beta*(4*r[0]*r[2]-r[1]^2)*(k^2*sigma+2*w)), f[1] = -(2*(k^2*sigma+2*w))*r[2]/sqrt(-2*beta*(4*r[0]*r[2]-r[1]^2)*(k^2*sigma+2*w)), g[1] = -sqrt(-2*beta*(4*r[0]*r[2]-r[1]^2)*(k^2*sigma+2*w))/(beta*(4*r[0]*r[2]-r[1]^2))}

{p = -2^(1/2)*(sigma*(4*r[0]*r[2]-r[1]^2)*(k^2*sigma+2*w))^(1/2)/(sigma*(4*r[0]*r[2]-r[1]^2)), f[0] = -(k^2*sigma+2*w)*r[1]/(-2*beta*(4*r[0]*r[2]-r[1]^2)*(k^2*sigma+2*w))^(1/2), f[1] = -2*(k^2*sigma+2*w)*r[2]/(-2*beta*(4*r[0]*r[2]-r[1]^2)*(k^2*sigma+2*w))^(1/2), g[1] = -(-2*beta*(4*r[0]*r[2]-r[1]^2)*(k^2*sigma+2*w))^(1/2)/(beta*(4*r[0]*r[2]-r[1]^2))}

(4)

NULL

``

(5)

K := diff(R(xi), xi) = r[0]+r[1]*R(xi)+r[2]*R(xi)^2

diff(R(xi), xi) = r[0]+r[1]*R(xi)+r[2]*R(xi)^2

(6)

S1 := subs(K, P)

f[0]+f[1]*R(xi)+g[1]*(r[0]+r[1]*R(xi)+r[2]*R(xi)^2)/R(xi)

(7)

NULL

C1 := subs(case1, S1)

-(k^2*sigma+2*w)*r[1]/(-2*beta*(4*r[0]*r[2]-r[1]^2)*(k^2*sigma+2*w))^(1/2)-2*(k^2*sigma+2*w)*r[2]*R(xi)/(-2*beta*(4*r[0]*r[2]-r[1]^2)*(k^2*sigma+2*w))^(1/2)-(-2*beta*(4*r[0]*r[2]-r[1]^2)*(k^2*sigma+2*w))^(1/2)*(r[0]+r[1]*R(xi)+r[2]*R(xi)^2)/(beta*(4*r[0]*r[2]-r[1]^2)*R(xi))

(8)

f := U(xi) = C1

U(xi) = -(k^2*sigma+2*w)*r[1]/(-2*beta*(4*r[0]*r[2]-r[1]^2)*(k^2*sigma+2*w))^(1/2)-2*(k^2*sigma+2*w)*r[2]*R(xi)/(-2*beta*(4*r[0]*r[2]-r[1]^2)*(k^2*sigma+2*w))^(1/2)-(-2*beta*(4*r[0]*r[2]-r[1]^2)*(k^2*sigma+2*w))^(1/2)*(r[0]+r[1]*R(xi)+r[2]*R(xi)^2)/(beta*(4*r[0]*r[2]-r[1]^2)*R(xi))

(9)

NULL

SO := subs(case1, ode)

2*beta*U(xi)^3+(-k^2*sigma-2*w)*U(xi)+2*(diff(diff(U(xi), xi), xi))*(k^2*sigma+2*w)/(4*r[0]*r[2]-r[1]^2) = 0

(10)

NULL

odetest(f, SO)


same_equation_different_parameter.mw

restart

with(PDEtools)

undeclare(prime)

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

(1)

with(DEtools)

NULL

with(DifferentialAlgebra)

"with(Student[ODEs][Solve]): "

with(IntegrationTools)

with(inttrans)

with(PDEtools)

with(Physics)

with(PolynomialTools)

with(RootFinding)

with(SolveTools)

with(LinearAlgebra)

with(sumtools)

pde := I*(diff(psi(x, t), t))+alpha*(diff(psi(x, t), `$`(x, 2)))+(beta[3]*abs(psi(x, t))+beta[4]*abs(psi(x, t))^2)*psi(x, t)+gamma*(diff(abs(psi(x, t))^2, `$`(x, 2)))*psi(x, t)/abs(psi(x, t)) = 0

case1 := {k = k, lambda = sqrt(-1/(18*alpha*beta[4]+18*gamma*beta[4]))*beta[3], w = -(9*alpha*k^2*beta[4]+2*beta[3]^2)/(9*beta[4]), A[0] = -beta[3]/(3*beta[4]), A[1] = beta[3]/(3*beta[4]), B[1] = 0}

" psi(x,t):=U(xi)*exp(I*(-k*x+w*t+theta))"

proc (x, t) options operator, arrow, function_assign; U(xi)*exp(I*(-k*x+w*t+theta)) end proc

(2)

" U(xi):=-(beta[3] (cosh(xi)-sinh(xi)))/(3 beta[4] cosh(xi))"

proc (xi) options operator, arrow, function_assign; -(1/3)*beta[3]*(cosh(xi)-sinh(xi))/(beta[4]*cosh(xi)) end proc

(3)

convert(U(xi), trig)

-(1/3)*beta[3]*(cosh(xi)-sinh(xi))/(beta[4]*cosh(xi))

(4)

xi := sqrt(-1/(18*alpha*beta[4]+18*gamma*beta[4]))*beta[3]*(2*alpha*kt+x)

(-1/(18*alpha*beta[4]+18*gamma*beta[4]))^(1/2)*beta[3]*(2*alpha*kt+x)

(5)

S := psi(x, t)

-(1/3)*beta[3]*(cosh((-1/(18*alpha*beta[4]+18*gamma*beta[4]))^(1/2)*beta[3]*(2*alpha*kt+x))-sinh((-1/(18*alpha*beta[4]+18*gamma*beta[4]))^(1/2)*beta[3]*(2*alpha*kt+x)))*exp(I*(-k*x+t*w+theta))/(beta[4]*cosh((-1/(18*alpha*beta[4]+18*gamma*beta[4]))^(1/2)*beta[3]*(2*alpha*kt+x)))

(6)

solution := subs(case1, S)

-(1/3)*beta[3]*(cosh((-1/(18*alpha*beta[4]+18*gamma*beta[4]))^(1/2)*beta[3]*(2*alpha*kt+x))-sinh((-1/(18*alpha*beta[4]+18*gamma*beta[4]))^(1/2)*beta[3]*(2*alpha*kt+x)))*exp(I*(-k*x-(1/9)*(9*alpha*k^2*beta[4]+2*beta[3]^2)*t/beta[4]+theta))/(beta[4]*cosh((-1/(18*alpha*beta[4]+18*gamma*beta[4]))^(1/2)*beta[3]*(2*alpha*kt+x)))

(7)

pdetest(psi(x, t) = -beta[3]*(cosh(sqrt(-1/(18*alpha*beta[4]+18*gamma*beta[4]))*beta[3]*(2*alpha*k+x))-sinh(sqrt(-1/(18*alpha*beta[4]+18*gamma*beta[4]))*beta[3]*(2*alpha*k+x)))*exp(I*(-k*x-(9*alpha*k^2*beta[4]+2*beta[3]^2)*t/(9*beta[4])+theta))/(3*beta[4]*cosh(sqrt(-1/(18*alpha*beta[4]+18*gamma*beta[4]))*beta[3]*(2*alpha*k+x)))*exp(I*(-k*x-(9*alpha*k^2*beta[4]+2*beta[3]^2)*t/(9*beta[4])+theta)), pde)

Error, (in pdetest) unable to determine the indeterminate function

 

NULL

 

 

 

 

Download pde-solve.mw

First 8 9 10 11 12 Page 10 of 12