torabi

85 Reputation

3 Badges

9 years, 247 days

MaplePrimes Activity


These are replies submitted by torabi

@Mac Dude 

Thanks for your reply.

i attached my maple code.

Thanks

moadele_asli2_(2).mw

@Carl Love 

Thanks. this time this error is appeared.

Error, (in fproc) unable to store 'HFloat(HFloat(undefined))+HFloat(HFloat(undefined))*I' when datatype=float[8]
moadele_asli2.mw

@Rouben Rostamian  

Dear Rouben

Thanks so much if you answer me.

If we want to draw the  solution that you perform in last reply, what changes in the intervals should be made with existing data

till the form of figure be similar with those in that paper?
Also, I think the initial guess must be close to the point of equilibrium i.e. x0 and y0

Thanks

@Preben Alsholm 

Thanks.... Dear Alsholm

@Rouben Rostamian  

Thanks for your attention. If there is an error in input data, but the appearance of the graph should be similar, though with different data. Also, the limits of the axes may be similar to that of the article so that the shape can be seen in more detail in order to be able to compare better.

Also, I think there was a mistake in function G.

G := (t,x,y) -> mu*beta*x*y/(a+x^2) - d*y - eta*x*y;
 

@Rouben Rostamian  

It is optional for F and G.

I attached manuscript for more details.

Thanks

115006_listening_sample_task_-_matching_example_1_.pdf

 

how I can write above equation as a program code for fractional Adams-Bashforth-Moulton method in maple?

thanks

@Kitonum 

No numerical solution. I need a function that  satisfies zero boundary conditions.

for example u(r)=....  same as you find in general condition that u(R0) = U2, u(h) = U1

but this time u(R0) = 0, u(h) = 0

@Kitonum 

Thanks for the reply.

if U1=U2=0 then the function will be zero!. Is there other option for selecting this function u(r)?

thanks

@Rouben Rostamian  

thank you

I reform my equations but i gain only zero answer!!

I want gain other answer.

may you help me.

thanks

dsolve2.mw
 

restart; nt := 1; nb := 1; R0 := .9149; n := 2; PDE1 := (diff(r*(diff(theta(r), r)), r))/r+nb*(diff(theta(r), r))*(diff(sigma(r), r))+nt*(diff(theta(r), r))^2 = 0

((diff(diff(theta(r), r), r))*r+diff(theta(r), r))/r+(diff(theta(r), r))*(diff(sigma(r), r))+(diff(theta(r), r))^2 = 0

(1)

PDE2 := nb*(diff(r*(diff(sigma(r), r)), r))/r+nt*(diff((diff(theta(r), r))*r, r))/r = 0

(diff(sigma(r), r)+r*(diff(diff(sigma(r), r), r)))/r+((diff(diff(theta(r), r), r))*r+diff(theta(r), r))/r = 0

(2)

``

``

dsys5 := {PDE1, PDE2, sigma(R0) = 0, theta(R0) = 0, (D(theta))(0) = 0, ((D@@1)(sigma))(0) = 0}; res := dsolve(dsys5, 'maxmesh' = 900, numeric, method = bvp[middefer], output = array([.1]))

array( 1 .. 2, 1 .. 1, [( 2, 1 ) = (array( 1 .. 1, 1 .. 5, [( 1, 5 ) = (HFloat(0.0)), ( 1, 1 ) = (.1), ( 1, 4 ) = (HFloat(0.0)), ( 1, 3 ) = (HFloat(0.0)), ( 1, 2 ) = (HFloat(0.0))  ] )), ( 1, 1 ) = (array( 1 .. 5, [( 1 ) = (r), ( 2 ) = (sigma(r)), ( 3 ) = (diff(sigma(r), r)), ( 4 ) = (theta(r)), ( 5 ) = (diff(theta(r), r))  ] ))  ] )

(3)

res2 := dsolve(dsys5, 'maxmesh' = 900, numeric, method = bvp[middefer]);

proc (x_bvp) local res, data, solnproc, _ndsol, outpoint, i; option `Copyright (c) 2000 by Waterloo Maple Inc. All rights reserved.`; _EnvDSNumericSaveDigits := Digits; Digits := 15; if _EnvInFsolve = true then outpoint := evalf[_EnvDSNumericSaveDigits](x_bvp) else outpoint := evalf(x_bvp) end if; data := Array(1..4, {(1) = proc (outpoint) local X, Y, YP, yout, errproc, L, V, i; option `Copyright (c) 2000 by Waterloo Maple Inc. All rights reserved.`; X := Vector(8, {(1) = .0, (2) = .13069999999999998, (3) = .26139999999999997, (4) = .3921, (5) = .5228, (6) = .6535000000000001, (7) = .7842000000000001, (8) = .9149}, datatype = float[8], order = C_order); Y := Matrix(8, 4, {(1, 1) = .0, (1, 2) = .0, (1, 3) = .0, (1, 4) = .0, (2, 1) = .0, (2, 2) = .0, (2, 3) = .0, (2, 4) = .0, (3, 1) = .0, (3, 2) = .0, (3, 3) = .0, (3, 4) = .0, (4, 1) = .0, (4, 2) = .0, (4, 3) = .0, (4, 4) = .0, (5, 1) = .0, (5, 2) = .0, (5, 3) = .0, (5, 4) = .0, (6, 1) = .0, (6, 2) = .0, (6, 3) = .0, (6, 4) = .0, (7, 1) = .0, (7, 2) = .0, (7, 3) = .0, (7, 4) = .0, (8, 1) = .0, (8, 2) = .0, (8, 3) = .0, (8, 4) = .0}, datatype = float[8], order = C_order); YP := Matrix(8, 4, {(1, 1) = .0, (1, 2) = .0, (1, 3) = .0, (1, 4) = .0, (2, 1) = .0, (2, 2) = .0, (2, 3) = .0, (2, 4) = -.0, (3, 1) = .0, (3, 2) = .0, (3, 3) = .0, (3, 4) = -.0, (4, 1) = .0, (4, 2) = .0, (4, 3) = .0, (4, 4) = -.0, (5, 1) = .0, (5, 2) = .0, (5, 3) = .0, (5, 4) = -.0, (6, 1) = .0, (6, 2) = .0, (6, 3) = .0, (6, 4) = -.0, (7, 1) = .0, (7, 2) = .0, (7, 3) = .0, (7, 4) = -.0, (8, 1) = .0, (8, 2) = .0, (8, 3) = .0, (8, 4) = -.0}, datatype = float[8], order = C_order); errproc := proc (x_bvp) local outpoint, X, Y, yout, L, V, i; option `Copyright (c) 2000 by Waterloo Maple Inc. All rights reserved.`; Digits := 15; outpoint := evalf(x_bvp); X := Vector(8, {(1) = .0, (2) = .13069999999999998, (3) = .26139999999999997, (4) = .3921, (5) = .5228, (6) = .6535000000000001, (7) = .7842000000000001, (8) = .9149}, datatype = float[8], order = C_order); Y := Matrix(8, 4, {(1, 1) = .0, (1, 2) = .0, (1, 3) = .0, (1, 4) = .0, (2, 1) = .0, (2, 2) = .0, (2, 3) = .0, (2, 4) = .0, (3, 1) = .0, (3, 2) = .0, (3, 3) = .0, (3, 4) = .0, (4, 1) = .0, (4, 2) = .0, (4, 3) = .0, (4, 4) = .0, (5, 1) = .0, (5, 2) = .0, (5, 3) = .0, (5, 4) = .0, (6, 1) = .0, (6, 2) = .0, (6, 3) = .0, (6, 4) = .0, (7, 1) = .0, (7, 2) = .0, (7, 3) = .0, (7, 4) = .0, (8, 1) = .0, (8, 2) = .0, (8, 3) = .0, (8, 4) = .0}, datatype = float[8], order = C_order); if not type(outpoint, 'numeric') then if outpoint = "start" or outpoint = "left" then return X[1] elif outpoint = "right" then return X[8] elif outpoint = "order" then return 2 elif outpoint = "error" then return 0. elif outpoint = "errorproc" then error "this is already the error procedure" elif outpoint = "rawdata" then return [4, 8, [sigma(r), diff(sigma(r), r), theta(r), diff(theta(r), r)], X, Y] else return ('procname')(x_bvp) end if end if; if outpoint < X[1] or X[8] < outpoint then error "solution is only defined in the range %1..%2", X[1], X[8] end if; V := array([1 = 4, 2 = 0]); if Digits <= trunc(evalhf(Digits)) then L := Vector(4, 'datatype' = 'float'[8]); yout := Vector(4, 'datatype' = 'float'[8]); evalhf(`dsolve/numeric/lagrange`(8, 4, X, Y, outpoint, var(yout), var(L), var(V))) else L := Vector(4, 'datatype' = 'sfloat'); yout := Vector(4, 'datatype' = 'sfloat'); `dsolve/numeric/lagrange`(8, 4, X, Y, outpoint, yout, L, V) end if; [r = outpoint, seq('[sigma(r), diff(sigma(r), r), theta(r), diff(theta(r), r)]'[i] = yout[i], i = 1 .. 4)] end proc; if not type(outpoint, 'numeric') then if outpoint = "start" or outpoint = "left" then return X[1] elif outpoint = "method" then return "bvp" elif outpoint = "right" then return X[8] elif outpoint = "order" then return 2 elif outpoint = "error" then return 0. elif outpoint = "errorproc" then return eval(errproc) elif outpoint = "rawdata" then return [4, 8, "depnames", X, Y, YP] else error "non-numeric value" end if end if; if outpoint < X[1] or X[8] < outpoint then error "solution is only defined in the range %1..%2", X[1], X[8] end if; if Digits <= trunc(evalhf(Digits)) and (_EnvInFsolve <> true or _EnvDSNumericSaveDigits <= trunc(evalhf(Digits))) then V := array( 1 .. 6, [( 1 ) = (7), ( 2 ) = (0), ( 3 ) = (false), ( 4 ) = (false), ( 5 ) = (true), ( 6 ) = (false)  ] ); L := Matrix(7, 2, {(1, 1) = .0, (1, 2) = .0, (2, 1) = .0, (2, 2) = .0, (3, 1) = .0, (3, 2) = .0, (4, 1) = .0, (4, 2) = .0, (5, 1) = .0, (5, 2) = .0, (6, 1) = .0, (6, 2) = .0, (7, 1) = .0, (7, 2) = .0}, datatype = float[8], order = C_order); yout := Vector(4, {(1) = .0, (2) = .0, (3) = .0, (4) = .0}, datatype = float[8]); evalhf(`dsolve/numeric/hermite`(8, 4, X, Y, YP, outpoint, var(yout), var(L), var(V))) else if _EnvInFsolve = true then Digits := _EnvDSNumericSaveDigits end if; V := array( 1 .. 6, [( 1 ) = (7), ( 2 ) = (0), ( 3 ) = (false), ( 4 ) = (false), ( 5 ) = (true), ( 6 ) = (false)  ] ); L := Matrix(7, 2, {(1, 1) = 0., (1, 2) = 0., (2, 1) = 0., (2, 2) = 0., (3, 1) = 0., (3, 2) = 0., (4, 1) = 0., (4, 2) = 0., (5, 1) = 0., (5, 2) = 0., (6, 1) = 0., (6, 2) = 0., (7, 1) = 0., (7, 2) = 0.}, order = C_order); yout := Vector(4, {(1) = 0., (2) = 0., (3) = 0., (4) = 0.}); `dsolve/numeric/hermite`(8, 4, X, Y, YP, outpoint, yout, L, V) end if; [outpoint, seq(yout[i], i = 1 .. 4)] end proc, (2) = Array(0..0, {}), (3) = [r, sigma(r), diff(sigma(r), r), theta(r), diff(theta(r), r)], (4) = 0}); solnproc := data[1]; if not type(outpoint, 'numeric') then if outpoint = "solnprocedure" then return eval(solnproc) elif member(outpoint, ["start", "left", "right", "errorproc", "rawdata", "order", "error"]) then return solnproc(x_bvp) elif outpoint = "sysvars" then return data[3] elif procname <> unknown then return ('procname')(x_bvp) else _ndsol := pointto(data[2][0]); return ('_ndsol')(x_bvp) end if end if; try res := solnproc(outpoint); [r = res[1], seq('[sigma(r), diff(sigma(r), r), theta(r), diff(theta(r), r)]'[i] = res[i+1], i = 1 .. 4)] catch: error  end try end proc

(4)

plots:-odeplot(res2, [[r, sigma(r)], [r, theta(r)]], 0 .. R0, thickness = 3)

 

``


 

Download dsolve2.mw

 

@Rouben Rostamian  

Thanks..

 

may any one help me?

is there problen in equations?

thanks

@Kitonum 

A is between for example [0-20]

according this figure

@Kitonum 

No I want graph for y versus A..

You plot y_t for different A.

I want horizent axis be A not time

4 5 6 7 8 9 10 Page 6 of 13