mehdi jafari

764 Reputation

13 Badges

11 years, 207 days

MaplePrimes Activity


These are questions asked by mehdi jafari

how this integro-differential equation can be solved?
any assumption or suggestion is appreciated. tnx in advance

restart

eq:=diff(y(x),x)=y(x)+exp(x)*exp(-3*x)/2+int(exp(x+t)*y(t),t=0..x);

IC:=y(0)=1;

diff(y(x), x) = y(x)+(1/2)*exp(x)*exp(-3*x)+int(exp(x+t)*y(t), t = 0 .. x)

 

y(0) = 1

(1)

eq2:=g(x)=int(exp(x+t)*y(t),t=0..x);

g(x) = int(exp(x+t)*y(t), t = 0 .. x)

(2)

IC_2:=eval(eq2,[x=0,y=1])

g(0) = 0

(3)

sys:={diff(eq2,x),subs(rhs(eq2)=lhs(eq2),eq)}

{diff(g(x), x) = int(exp(x+t)*y(t), t = 0 .. x)+exp(2*x)*y(x), diff(y(x), x) = y(x)+(1/2)*exp(x)*exp(-3*x)+g(x)}

(4)

dsolve(sys union {IC,IC_2},numeric)

Error, (in dsolve/numeric/process_input) input system must be an ODE system, got independent variables {t, x}

 

Download integro-diffrential_problem.mw

Hi dear mapleprime users, i have a problem in a change of varibales if the following ode. i want to use "r=R*rs,u(r)=h*u(R*rs)" variable changes in ode, how can i do that, R is a constant. tnx for the help

restart;with(Student[ODEs]):

y := (1 + diff(u(r), r))*diff(u(r), r, r) + (1 + vs*u(r)/r + (1 - vs)/2*diff(u(r), r))*diff(u(r), r)/r - (1 + (1 + vs)/(2*r)*u(r))*u(r)/r^2

(1+diff(u(r), r))*(diff(diff(u(r), r), r))+(1+vs*u(r)/r+(1/2)*(1-vs)*(diff(u(r), r)))*(diff(u(r), r))/r-(1+(1/2)*(1+vs)*u(r)/r)*u(r)/r^2

(1)

constants := constants, R:

subs(r=R*rs,u(r)=h*u(R*rs),y) ;convert(%,D)

(1+diff(u(R*rs), R*rs))*(diff(diff(u(R*rs), R*rs), R*rs))+(1+vs*u(R*rs)/(R*rs)+(1/2)*(1-vs)*(diff(u(R*rs), R*rs)))*(diff(u(R*rs), R*rs))/(R*rs)-(1+(1/2)*(1+vs)*u(R*rs)/(R*rs))*u(R*rs)/(R^2*rs^2)

 

Error, invalid input: diff received R*rs, which is not valid for its 2nd argument

 
 

 

Download change_of_variables.mw

Hi. Can maple compute right and left eigenvectors of a matrix?

Hi. I want to plot an sphere animating equator on the sphere(earth). please help me. Tnx.

i have two euations including integration which has two unkwnon x1 and x2.
how can i get these equations solved, thanks for the help.

restart:

with(DirectSearch)

[BoundedObjective, CompromiseProgramming, DataFit, ExponentialWeightedSum, GlobalOptima, GlobalSearch, Minimax, ModifiedTchebycheff, Search, SolveEquations, WeightedProduct, WeightedSum]

(1)

with(LinearAlgebra):

with(Student:-Calculus1):

with(Student:-NumericalAnalysis):

A:=convert(taylor(exp(Q),Q,6),polynom);

1+Q+(1/2)*Q^2+(1/6)*Q^3+(1/24)*Q^4+(1/120)*Q^5

(2)

Q:=a[11]*(E[r])^2+a[22]*(E[theta])^2+2*a[12]*E[r]*E[theta];

E[r]^2*a[11]+2*E[r]*E[theta]*a[12]+E[theta]^2*a[22]

(3)

psi:=0.5*c*(exp(Q)-1);

.5*c*(exp(E[r]^2*a[11]+2*E[r]*E[theta]*a[12]+E[theta]^2*a[22])-1)

(4)

F:=Matrix(3,3,[[lambda[r],0,0],[0,lambda[theta],0],[0,0,lambda[z]]]);

Matrix(3, 3, {(1, 1) = lambda[r], (1, 2) = 0, (1, 3) = 0, (2, 1) = 0, (2, 2) = lambda[theta], (2, 3) = 0, (3, 1) = 0, (3, 2) = 0, (3, 3) = lambda[z]})

(5)

sigma[r]:=-p+diff(psi,E[r])*F[1,1]^2;

-p+.5*c*(2*E[r]*a[11]+2*E[theta]*a[12])*exp(E[r]^2*a[11]+2*E[r]*E[theta]*a[12]+E[theta]^2*a[22])*lambda[r]^2

(6)

sigma[theta]:=-p+diff(psi,E[theta])*F[2,2]^2;

-p+.5*c*(2*E[r]*a[12]+2*E[theta]*a[22])*exp(E[r]^2*a[11]+2*E[r]*E[theta]*a[12]+E[theta]^2*a[22])*lambda[theta]^2

(7)

sigma[z]:=-p+diff(psi,E[z])*F[3,3]^2;

-p

(8)

p1:=diff(psi,E[r])*F[1,1]^2;#Pressure is constituted form 3 parts, one part is p1, other part is p2 and a constant p0

.5*c*(2*E[r]*a[11]+2*E[theta]*a[12])*exp(E[r]^2*a[11]+2*E[r]*E[theta]*a[12]+E[theta]^2*a[22])*lambda[r]^2

(9)

E[r]:=0.5*(lambda[r]^2-1);

.5*lambda[r]^2-.5

(10)

E[theta]:=0.5*(lambda[theta]^2-1);

.5*lambda[theta]^2-.5

(11)

E[z]:=0.5*(lambda[z]^2-1);

.5*lambda[z]^2-.5

(12)

lambda[r]:=x2*sqrt((r^2-x1)/x2)/r;

x2*((r^2-x1)/x2)^(1/2)/r

(13)

lambda[theta]:=r/sqrt((r^2-x1)/x2);

r/((r^2-x1)/x2)^(1/2)

(14)

lambda[z]:=1/x2;

1/x2

(15)

sigma[r];

-p+.5*c*(2*(.5*x2*(r^2-x1)/r^2-.5)*a[11]+2*(.5*r^2*x2/(r^2-x1)-.5)*a[12])*exp((.5*x2*(r^2-x1)/r^2-.5)^2*a[11]+2*(.5*x2*(r^2-x1)/r^2-.5)*(.5*r^2*x2/(r^2-x1)-.5)*a[12]+(.5*r^2*x2/(r^2-x1)-.5)^2*a[22])*x2*(r^2-x1)/r^2

(16)

sigma[theta]:

sigma[z]:

#p2:=int((sigma[r]-sigma[theta])/r,r):%Pressure is constituted form 2 parts, one part is p1, other part is p2 and and a constant p0

Digits:=10:

c:=790000:

a[11]:=0.539:

a[22]:=0.368:

a[12]:=0.653:

p_in:=10000:

p_out:=0:

r_in:=5.4e-3:

r_out:=6.1e-3:

F_a:=0.381846:

p21:=(c/2)*(((r^2-x1)/r^3)-(x2*r/(r^2-x1)))*exp(Q);

395000*((r^2-x1)/r^3-x2*r/(r^2-x1))*exp(.539*(.5*x2*(r^2-x1)/r^2-.5)^2+1.306*(.5*x2*(r^2-x1)/r^2-.5)*(.5*r^2*x2/(r^2-x1)-.5)+.368*(.5*r^2*x2/(r^2-x1)-.5)^2)

(17)

p22:=(c/2)*Int(exp(Q)*(3*x2*r^6-r^6+5*x1*r^4-x1*x2*r^4-7*x1^2*r^2+3*x1^3)/(r^4*(r^2-x1)^2),r=r_in..r_out);#This is the part that should be maintained as an integral until the final solution

395000*(Int(exp(.539*(.5*x2*(r^2-x1)/r^2-.5)^2+1.306*(.5*x2*(r^2-x1)/r^2-.5)*(.5*r^2*x2/(r^2-x1)-.5)+.368*(.5*r^2*x2/(r^2-x1)-.5)^2)*(3*r^6*x2-r^6-r^4*x1*x2+5*r^4*x1-7*r^2*x1^2+3*x1^3)/(r^4*(r^2-x1)^2), r = 0.54e-2 .. 0.61e-2))

(18)

p2:=p21-p22;#p2 is computed using the integration by part method

395000*((r^2-x1)/r^3-x2*r/(r^2-x1))*exp(.539*(.5*x2*(r^2-x1)/r^2-.5)^2+1.306*(.5*x2*(r^2-x1)/r^2-.5)*(.5*r^2*x2/(r^2-x1)-.5)+.368*(.5*r^2*x2/(r^2-x1)-.5)^2)-395000*(Int(exp(.539*(.5*x2*(r^2-x1)/r^2-.5)^2+1.306*(.5*x2*(r^2-x1)/r^2-.5)*(.5*r^2*x2/(r^2-x1)-.5)+.368*(.5*r^2*x2/(r^2-x1)-.5)^2)*(3*r^6*x2-r^6-r^4*x1*x2+5*r^4*x1-7*r^2*x1^2+3*x1^3)/(r^4*(r^2-x1)^2), r = 0.54e-2 .. 0.61e-2))

(19)

 

p0:=(p_out+eval(p2,r=r_out));#p0 is the constant which is defined form the boundary conditions either p_out=subs(r=r_out,sigma[r]) or p_in=subs(r=r_in,sigma[r])

395000*(-4405655.099*x1+163.9344262-0.61e-2*x2/(-x1+0.3721e-4))*exp(.539*(13437.24805*x2*(-x1+0.3721e-4)-.5)^2+1.306*(13437.24805*x2*(-x1+0.3721e-4)-.5)*(0.18605e-4*x2/(-x1+0.3721e-4)-.5)+.368*(0.18605e-4*x2/(-x1+0.3721e-4)-.5)^2)-395000*(Int(exp(.539*(.5*x2*(r^2-x1)/r^2-.5)^2+1.306*(.5*x2*(r^2-x1)/r^2-.5)*(.5*r^2*x2/(r^2-x1)-.5)+.368*(.5*r^2*x2/(r^2-x1)-.5)^2)*(3*r^6*x2-r^6-r^4*x1*x2+5*r^4*x1-7*r^2*x1^2+3*x1^3)/(r^4*(r^2-x1)^2), r = 0.54e-2 .. 0.61e-2))

(20)

 

p:=p1+p2+p0;#p is the total pressure

395000.0*(.5390*x2*(r^2-x1)/r^2-1.1920+.6530*r^2*x2/(r^2-x1))*exp(.539*(.5*x2*(r^2-x1)/r^2-.5)^2+1.306*(.5*x2*(r^2-x1)/r^2-.5)*(.5*r^2*x2/(r^2-x1)-.5)+.368*(.5*r^2*x2/(r^2-x1)-.5)^2)*x2*(r^2-x1)/r^2+395000*((r^2-x1)/r^3-x2*r/(r^2-x1))*exp(.539*(.5*x2*(r^2-x1)/r^2-.5)^2+1.306*(.5*x2*(r^2-x1)/r^2-.5)*(.5*r^2*x2/(r^2-x1)-.5)+.368*(.5*r^2*x2/(r^2-x1)-.5)^2)-790000*(Int(exp(.539*(.5*x2*(r^2-x1)/r^2-.5)^2+1.306*(.5*x2*(r^2-x1)/r^2-.5)*(.5*r^2*x2/(r^2-x1)-.5)+.368*(.5*r^2*x2/(r^2-x1)-.5)^2)*(3*r^6*x2-r^6-r^4*x1*x2+5*r^4*x1-7*r^2*x1^2+3*x1^3)/(r^4*(r^2-x1)^2), r = 0.54e-2 .. 0.61e-2))+395000*(-4405655.099*x1+163.9344262-0.61e-2*x2/(-x1+0.3721e-4))*exp(.539*(13437.24805*x2*(-x1+0.3721e-4)-.5)^2+1.306*(13437.24805*x2*(-x1+0.3721e-4)-.5)*(0.18605e-4*x2/(-x1+0.3721e-4)-.5)+.368*(0.18605e-4*x2/(-x1+0.3721e-4)-.5)^2)

(21)

#p:=H+H00;

eq1:=Int((sigma[r]-sigma[theta])/r,r=r_in..r_out);

Int((395000.0*(.5390*x2*(r^2-x1)/r^2-1.1920+.6530*r^2*x2/(r^2-x1))*exp(.539*(.5*x2*(r^2-x1)/r^2-.5)^2+1.306*(.5*x2*(r^2-x1)/r^2-.5)*(.5*r^2*x2/(r^2-x1)-.5)+.368*(.5*r^2*x2/(r^2-x1)-.5)^2)*x2*(r^2-x1)/r^2-395000.0*(.6530*x2*(r^2-x1)/r^2-1.0210+.3680*r^2*x2/(r^2-x1))*exp(.539*(.5*x2*(r^2-x1)/r^2-.5)^2+1.306*(.5*x2*(r^2-x1)/r^2-.5)*(.5*r^2*x2/(r^2-x1)-.5)+.368*(.5*r^2*x2/(r^2-x1)-.5)^2)*r^2*x2/(r^2-x1))/r, r = 0.54e-2 .. 0.61e-2)

(22)

eq2:=Int(2*Pi*sigma[z]*r,r=r_in..r_out);

Int(2*Pi*(-395000.0*(.5390*x2*(r^2-x1)/r^2-1.1920+.6530*r^2*x2/(r^2-x1))*exp(.539*(.5*x2*(r^2-x1)/r^2-.5)^2+1.306*(.5*x2*(r^2-x1)/r^2-.5)*(.5*r^2*x2/(r^2-x1)-.5)+.368*(.5*r^2*x2/(r^2-x1)-.5)^2)*x2*(r^2-x1)/r^2-395000*((r^2-x1)/r^3-x2*r/(r^2-x1))*exp(.539*(.5*x2*(r^2-x1)/r^2-.5)^2+1.306*(.5*x2*(r^2-x1)/r^2-.5)*(.5*r^2*x2/(r^2-x1)-.5)+.368*(.5*r^2*x2/(r^2-x1)-.5)^2)+790000*(Int(exp(.539*(.5*x2*(r^2-x1)/r^2-.5)^2+1.306*(.5*x2*(r^2-x1)/r^2-.5)*(.5*r^2*x2/(r^2-x1)-.5)+.368*(.5*r^2*x2/(r^2-x1)-.5)^2)*(3*r^6*x2-r^6-r^4*x1*x2+5*r^4*x1-7*r^2*x1^2+3*x1^3)/(r^4*(r^2-x1)^2), r = 0.54e-2 .. 0.61e-2))-395000*(-4405655.099*x1+163.9344262-0.61e-2*x2/(-x1+0.3721e-4))*exp(.539*(13437.24805*x2*(-x1+0.3721e-4)-.5)^2+1.306*(13437.24805*x2*(-x1+0.3721e-4)-.5)*(0.18605e-4*x2/(-x1+0.3721e-4)-.5)+.368*(0.18605e-4*x2/(-x1+0.3721e-4)-.5)^2))*r, r = 0.54e-2 .. 0.61e-2)

(23)

#eq1:=Quadrature((sigma[r]-sigma[theta])/r,r=r_in..r_out,method=gaussian[5],output=value):

#eq2:=Quadrature(2*Pi*sigma[z]*r,r=r_in..r_out,method=gaussian[5],output=value):

eq1=evalf(p_out-p_in)

Int((395000.0*(.5390*x2*(r^2-x1)/r^2-1.1920+.6530*r^2*x2/(r^2-x1))*exp(.539*(.5*x2*(r^2-x1)/r^2-.5)^2+1.306*(.5*x2*(r^2-x1)/r^2-.5)*(.5*r^2*x2/(r^2-x1)-.5)+.368*(.5*r^2*x2/(r^2-x1)-.5)^2)*x2*(r^2-x1)/r^2-395000.0*(.6530*x2*(r^2-x1)/r^2-1.0210+.3680*r^2*x2/(r^2-x1))*exp(.539*(.5*x2*(r^2-x1)/r^2-.5)^2+1.306*(.5*x2*(r^2-x1)/r^2-.5)*(.5*r^2*x2/(r^2-x1)-.5)+.368*(.5*r^2*x2/(r^2-x1)-.5)^2)*r^2*x2/(r^2-x1))/r, r = 0.54e-2 .. 0.61e-2) = -10000.

(24)

eq2=F_a

Int(2*Pi*(-395000.0*(.5390*x2*(r^2-x1)/r^2-1.1920+.6530*r^2*x2/(r^2-x1))*exp(.539*(.5*x2*(r^2-x1)/r^2-.5)^2+1.306*(.5*x2*(r^2-x1)/r^2-.5)*(.5*r^2*x2/(r^2-x1)-.5)+.368*(.5*r^2*x2/(r^2-x1)-.5)^2)*x2*(r^2-x1)/r^2-395000*((r^2-x1)/r^3-x2*r/(r^2-x1))*exp(.539*(.5*x2*(r^2-x1)/r^2-.5)^2+1.306*(.5*x2*(r^2-x1)/r^2-.5)*(.5*r^2*x2/(r^2-x1)-.5)+.368*(.5*r^2*x2/(r^2-x1)-.5)^2)+790000*(Int(exp(.539*(.5*x2*(r^2-x1)/r^2-.5)^2+1.306*(.5*x2*(r^2-x1)/r^2-.5)*(.5*r^2*x2/(r^2-x1)-.5)+.368*(.5*r^2*x2/(r^2-x1)-.5)^2)*(3*r^6*x2-r^6-r^4*x1*x2+5*r^4*x1-7*r^2*x1^2+3*x1^3)/(r^4*(r^2-x1)^2), r = 0.54e-2 .. 0.61e-2))-395000*(-4405655.099*x1+163.9344262-0.61e-2*x2/(-x1+0.3721e-4))*exp(.539*(13437.24805*x2*(-x1+0.3721e-4)-.5)^2+1.306*(13437.24805*x2*(-x1+0.3721e-4)-.5)*(0.18605e-4*x2/(-x1+0.3721e-4)-.5)+.368*(0.18605e-4*x2/(-x1+0.3721e-4)-.5)^2))*r, r = 0.54e-2 .. 0.61e-2) = .381846

(25)

fsolve({eq1=evalf(p_out-p_in),eq2=F_a},{x1,x2});

fsolve({Int((395000.0*(.5390*x2*(r^2-x1)/r^2-1.1920+.6530*r^2*x2/(r^2-x1))*exp(.539*(.5*x2*(r^2-x1)/r^2-.5)^2+1.306*(.5*x2*(r^2-x1)/r^2-.5)*(.5*r^2*x2/(r^2-x1)-.5)+.368*(.5*r^2*x2/(r^2-x1)-.5)^2)*x2*(r^2-x1)/r^2-395000.0*(.6530*x2*(r^2-x1)/r^2-1.0210+.3680*r^2*x2/(r^2-x1))*exp(.539*(.5*x2*(r^2-x1)/r^2-.5)^2+1.306*(.5*x2*(r^2-x1)/r^2-.5)*(.5*r^2*x2/(r^2-x1)-.5)+.368*(.5*r^2*x2/(r^2-x1)-.5)^2)*r^2*x2/(r^2-x1))/r, r = 0.54e-2 .. 0.61e-2) = -10000., Int(2*Pi*(-395000.0*(.5390*x2*(r^2-x1)/r^2-1.1920+.6530*r^2*x2/(r^2-x1))*exp(.539*(.5*x2*(r^2-x1)/r^2-.5)^2+1.306*(.5*x2*(r^2-x1)/r^2-.5)*(.5*r^2*x2/(r^2-x1)-.5)+.368*(.5*r^2*x2/(r^2-x1)-.5)^2)*x2*(r^2-x1)/r^2-395000*((r^2-x1)/r^3-x2*r/(r^2-x1))*exp(.539*(.5*x2*(r^2-x1)/r^2-.5)^2+1.306*(.5*x2*(r^2-x1)/r^2-.5)*(.5*r^2*x2/(r^2-x1)-.5)+.368*(.5*r^2*x2/(r^2-x1)-.5)^2)+790000*(Int(exp(.539*(.5*x2*(r^2-x1)/r^2-.5)^2+1.306*(.5*x2*(r^2-x1)/r^2-.5)*(.5*r^2*x2/(r^2-x1)-.5)+.368*(.5*r^2*x2/(r^2-x1)-.5)^2)*(3*r^6*x2-r^6-r^4*x1*x2+5*r^4*x1-7*r^2*x1^2+3*x1^3)/(r^4*(r^2-x1)^2), r = 0.54e-2 .. 0.61e-2))-395000*(-4405655.099*x1+163.9344262-0.61e-2*x2/(-x1+0.3721e-4))*exp(.539*(13437.24805*x2*(-x1+0.3721e-4)-.5)^2+1.306*(13437.24805*x2*(-x1+0.3721e-4)-.5)*(0.18605e-4*x2/(-x1+0.3721e-4)-.5)+.368*(0.18605e-4*x2/(-x1+0.3721e-4)-.5)^2))*r, r = 0.54e-2 .. 0.61e-2) = .381846}, {x1, x2})

(26)

SolveEquations([eq1=evalf(p_out-p_in),eq2=F_a]);

Warning, objective function returns unfeasible value HFloat(undefined) for initial point [x1 = .9, x2 = .9]; trying to find a feasible initial point

 

Error, (in DirectSearch:-Search) cannot find feasible initial point; specify a new one

 

 

 

 

fsolve_problem.mw

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