mehdi jafari

774 Reputation

13 Badges

12 years, 94 days

MaplePrimes Activity


These are questions asked by mehdi jafari

I have a system of six ODEs. i solve them numerically using dolve,numeric command. the problem is setting step size for example stepsize=1e-5 or minstep=500 lead to a result of order 1e-2; But without using this option, results are of order integer numbers. could any one help? tnx in advance

EDITED
 

Download ode_problem.mw

i have a nonlinear inequality which is plotted using plots:-inequl
can i find an algebric solution for this inequality? for example sth like this : 0.08<t<10 
thnx in advance

 

restart:with(plots):with(Optimization):

with(SolveTools[Inequality]):

k := 1; c := 5; sigma := .85;N=10;

1

 

5

 

.85

 

N = 10

(1)

x:=t->4*exp(-t);

proc (t) options operator, arrow; 4*exp(-t) end proc

(2)

t0:=0.0065:

inequal(sigma*k/(2*c+k)*abs(x(t))<abs(x(t)-x(t0)),t=0..10,x=0..4)

 

 

 

NULL


 

Download inequality.mw

How these system of relations can be defined and plotted?(with any possible assumptions)

 

restart

x[n+1]=1/3*(2*x[n]*y[n]+4*x[n]*z[n])+1/12*(2*x[n-1]*y[n-1]+4*x[n-1]*z[n-1])

x[n+1] = (2/3)*x[n]*y[n]+(4/3)*x[n]*z[n]+(1/6)*x[n-1]*y[n-1]+(1/3)*x[n-1]*z[n-1]

(1)

y[n+1]=1/3*(1/4*x[n]*z[n]+y[n])+1/12*(1/4*x[n-1]*z[n-1]+y[n-1])

y[n+1] = (1/12)*x[n]*z[n]+(1/3)*y[n]+(1/48)*x[n-1]*z[n-1]+(1/12)*y[n-1]

(2)

z[n+1]=1/3*(x[n]*z[n]+2*y[n]*z[n])+1/12*(x[n-1]*z[n-1]+2*y[n-1]*z[n-1])

z[n+1] = (1/3)*x[n]*z[n]+(2/3)*y[n]*z[n]+(1/12)*x[n-1]*z[n-1]+(1/6)*y[n-1]*z[n-1]

(3)

 


 

Download problem.mw

i have a function which contains Ln and arctan fanctions in which the output function is complex.
how can i implicitplot this complex function? tnx for the help
 

restart

with(plots, implicitplot)

ode := diff(y(w), w)+(sqrt((12*Pi)(y(w)^2+m^2*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P,w=-10..0,Y=0..10)

 

evalf((eval(P,[w=1,Y=1])))

1.655474573+.8307038310*I

(4)

 

 


 

Download P2.mw

how i can solve a system of integral equations? thanks for the help.
 

restart; with(LinearAlgebra); with(VectorCalculus)

pin1 := 1858.; pout1 := 0; pin2 := 0.1858e5; pout2 := 0; S := 1; T := 10; Fa1 := 0.; Fa2 := 0.
``

T[rr] := -pin-C10*simplify(int(B^2*sqrt((r^2-A)/B)^(2+m)/r^3-r/sqrt((r^2-A)/B)^(2-m), r = s .. t))/S^m-C20*simplify(int(r/(B^2*sqrt((r^2-A)/B)^(2-n))-sqrt((r^2-A)/B)^(2+n)/r^3, r = s .. t))/S^n

eq1 := C10*simplify(int((-2*A*r^2+A^2)/(r^3*sqrt((r^2-A)/B)^(2-m)), r = s .. t))/S^m+C20*simplify(int((2*A*r^2-A^2)/(B^2*r^3*sqrt((r^2-A)/B)^(2-n)), r = s .. t))/S^n

eq2 := 2*Pi*simplify(int(T[rr]*r, r = s .. t))-2*Pi*C10*simplify(int((B^4*sqrt((r^2-A)/B)^(2+m)-r^2*sqrt((r^2-A)/B)^m)/(B^2*r), r = s .. t))/S^m-2*Pi*C20*simplify(int((-B^3*r^3+A*B^3*r+r^3)/(B^2*sqrt((r^2-A)/B)^(2-n)), r = s .. t))/S^n

A := 0.50456255261718905958813087648305534133592085046840e-2; B := 1.0000045465297826882965065372650452712135679772907; S := 1; T := 10; Eq1 := simplify(subs([t = sqrt(B*T^2+A), s = sqrt(B*S^2+A)], eq1)); Eq2 := simplify(subs([pin = 1858., t = sqrt(B*T^2+A), s = sqrt(B*S^2+A)], eq2))

6.283156738*(int(0.5045671411e-2*C10*r*(int((2.*r^2-0.5045625526e-2)*(.9999954530*r^2-0.5045602584e-2)^((1/2)*m)/(r^3*(r^2-0.5045625526e-2)), r = 1.002521906 .. 10.00027501))-0.5045625526e-2*C20*r*(int((2.*r^2-0.5045625526e-2)*(.9999954530*r^2-0.5045602584e-2)^((1/2)*n)/((r^2-0.5045625526e-2)*r^3), r = 1.002521906 .. 10.00027501))-1858.008448*r, r = 1.002521906 .. 10.00027501))-6.283128170*C10*(int((.9999954530*r^2-0.5045602584e-2)^((1/2)*m)*(0.13641e-4*r^2-0.5045694353e-2)/r, r = 1.002521906 .. 10.00027501))+6.283156738*C20*(int((0.1364100000e-4*r^3-0.5045694353e-2*r)*(.9999954530*r^2-0.5045602584e-2)^((1/2)*n)/(r^2-0.5045625526e-2), r = 1.002521906 .. 10.00027501))

(1)

``

Eq3 := simplify(subs([t = sqrt(B*T^2+A), s = sqrt(B*S^2+A)], eq1)); Eq4 := simplify(subs([pin = 0.1858e5, t = sqrt(B*T^2+A), s = sqrt(B*S^2+A)], eq2))

6.283156738*(int(0.5045671411e-2*C10*r*(int((2.*r^2-0.5045625526e-2)*(.9999954530*r^2-0.5045602584e-2)^((1/2)*m)/(r^3*(r^2-0.5045625526e-2)), r = 1.002521906 .. 10.00027501))-0.5045625526e-2*C20*r*(int((2.*r^2-0.5045625526e-2)*(.9999954530*r^2-0.5045602584e-2)^((1/2)*n)/((r^2-0.5045625526e-2)*r^3), r = 1.002521906 .. 10.00027501))-18580.08448*r, r = 1.002521906 .. 10.00027501))-6.283128170*C10*(int((.9999954530*r^2-0.5045602584e-2)^((1/2)*m)*(0.13641e-4*r^2-0.5045694353e-2)/r, r = 1.002521906 .. 10.00027501))+6.283156738*C20*(int((0.1364100000e-4*r^3-0.5045694353e-2*r)*(.9999954530*r^2-0.5045602584e-2)^((1/2)*n)/(r^2-0.5045625526e-2), r = 1.002521906 .. 10.00027501))

(2)

  ``

NULL

ANS := fsolve({Eq1 = pout1-pin1, Eq2 = Fa1, Eq3 = pout2-pin2, Eq4 = Fa2}, {C10, C20, m, n})

``

NULL

NULL


 

Download fsolve.mw

5 6 7 8 9 10 11 Last Page 7 of 25