MaplePrimes Questions

Hi there

I am trying to solve the ODE below

schechter_guo_v2.mw
 

odeSG := {diff(z(t), t) = (-phi*z(t)*sqrt(F*phi*z(t)/(5*t))/(3*t)+1-H/(1-z(t)))/(phi*(S_oi-S_or-sqrt(F*phi*z(t)/(5*t)))), z(t0) = z0}

{diff(z(t), t) = (-(1/15)*phi*z(t)*5^(1/2)*(F*phi*z(t)/t)^(1/2)/t+1-H/(1-z(t)))/(phi*(S_oi-S_or-(1/5)*5^(1/2)*(F*phi*z(t)/t)^(1/2))), z(t0) = z0}

(1)

solSG := dsolve(odeSG, numeric, method = lsode, parameters = [phi, F, H, S_oi, S_or, t0, z0])

proc (x_lsode) local _res, _dat, _vars, _solnproc, _xout, _ndsol, _pars, _n, _i; option `Copyright (c) 2000 by Waterloo Maple Inc. All rights reserved.`; if 1 < nargs then error "invalid input: too many arguments" end if; _EnvDSNumericSaveDigits := Digits; Digits := 15; if _EnvInFsolve = true then _xout := evalf[_EnvDSNumericSaveDigits](x_lsode) else _xout := evalf(x_lsode) end if; _dat := Array(1..4, {(1) = proc (_xin) local _xout, _n, _y0, _ctl, _octl, _reinit, _errcd, _fcn, _i, _yini, _pars, _ini, _par; option `Copyright (c) 2002 by the University of Waterloo. All rights reserved.`; table( [( "complex" ) = false ] ) _xout := _xin; _ctl := array( 1 .. 39, [( 1 ) = (1), ( 2 ) = (t0), ( 3 ) = (t0), ( 4 ) = (1), ( 5 ) = (1), ( 6 ) = (10), ( 7 ) = (0), ( 9 ) = (0.1e-6), ( 8 ) = (z0), ( 11 ) = (0), ( 10 ) = (0.1e-6), ( 13 ) = (0), ( 12 ) = (0), ( 15 ) = (0), ( 14 ) = (0), ( 18 ) = (0), ( 19 ) = (0), ( 16 ) = (0), ( 17 ) = (0), ( 22 ) = (0), ( 23 ) = (0), ( 20 ) = (0), ( 21 ) = (0), ( 27 ) = (0), ( 26 ) = (0), ( 25 ) = (0), ( 24 ) = (0), ( 31 ) = (-1), ( 30 ) = (0), ( 29 ) = (0), ( 28 ) = (0), ( 36 ) = (0), ( 37 ) = (0), ( 38 ) = (0), ( 39 ) = (0), ( 32 ) = (7), ( 33 ) = (0), ( 34 ) = (0), ( 35 ) = (0)  ] ); _octl := array( 1 .. 39, [( 1 ) = (1), ( 2 ) = (t0), ( 3 ) = (t0), ( 4 ) = (1), ( 5 ) = (1), ( 6 ) = (10), ( 7 ) = (0), ( 9 ) = (0.1e-6), ( 8 ) = (z0), ( 11 ) = (0), ( 10 ) = (0.1e-6), ( 13 ) = (0), ( 12 ) = (0), ( 15 ) = (0), ( 14 ) = (0), ( 18 ) = (0), ( 19 ) = (0), ( 16 ) = (0), ( 17 ) = (0), ( 22 ) = (0), ( 23 ) = (0), ( 20 ) = (0), ( 21 ) = (0), ( 27 ) = (0), ( 26 ) = (0), ( 25 ) = (0), ( 24 ) = (0), ( 31 ) = (-1), ( 30 ) = (0), ( 29 ) = (0), ( 28 ) = (0), ( 36 ) = (0), ( 37 ) = (0), ( 38 ) = (0), ( 39 ) = (0), ( 32 ) = (7), ( 33 ) = (0), ( 34 ) = (0), ( 35 ) = (0)  ] ); _n := trunc(_ctl[1]); _yini := Array(0..8, {(1) = t0, (2) = z0, (3) = undefined, (4) = undefined, (5) = undefined, (6) = undefined, (7) = undefined, (8) = undefined}); _y0 := Array(0..8, {(1) = t0, (2) = z0, (3) = undefined, (4) = undefined, (5) = undefined, (6) = undefined, (7) = undefined, (8) = undefined}); _fcn := proc (N, X, Y, YP) option `[Y[1] = z(t)]`; if Y[3]*Y[2]*Y[1]/X < 0 then YP[1] := undefined; return 0 end if; YP[1] := (-.149071198499986*Y[2]*Y[1]*evalf((Y[3]*Y[2]*Y[1]/X)^(1/2))/X+1-Y[4]/(1-Y[1]))/(Y[2]*(Y[5]-Y[6]-.447213595499958*evalf((Y[3]*Y[2]*Y[1]/X)^(1/2)))); 0 end proc; _pars := [phi = phi, F = F, H = H, S_oi = S_oi, S_or = S_or, t0 = t0, z0 = z0]; if not type(_xout, 'numeric') then if member(_xout, ["start", "left", "right"]) then return _y0[0] elif _xout = "method" then return "lsode" elif _xout = "numfun" then return trunc(_ctl[24+trunc(_ctl[1])]) elif _xout = "initial" then return [seq(_yini[_i], _i = 0 .. _n)] elif _xout = "parameters" then return [seq(_yini[_n+_i], _i = 1 .. nops(_pars))] elif _xout = "initial_and_parameters" then return [seq(_yini[_i], _i = 0 .. _n)], [seq(_yini[_n+_i], _i = 1 .. nops(_pars))] elif _xout = "last" then if _ctl[2]-_y0[0] = 0. then error "no information is available on last computed point" else _xout := _ctl[2] end if elif _xout = "enginedata" then return eval(_octl, 1) elif _xout = "function" then return eval(_fcn, 1) elif type(_xin, `=`) and type(rhs(_xin), 'list') and member(lhs(_xin), {"initial", "parameters", "initial_and_parameters"}) then _ini, _par := [], []; if lhs(_xin) = "initial" then _ini := rhs(_xin) elif lhs(_xin) = "parameters" then _par := rhs(_xin) elif select(type, rhs(_xin), `=`) <> [] then _par, _ini := selectremove(type, rhs(_xin), `=`) elif nops(rhs(_xin)) < nops(_pars)+1 then error "insufficient data for specification of initial and parameters" else _par := rhs(_xin)[-nops(_pars) .. -1]; _ini := rhs(_xin)[1 .. -nops(_pars)-1] end if; _xout := lhs(_xout); if _par <> [] then `dsolve/numeric/process_parameters`(_n, _pars, _par, _yini) end if; if _ini <> [] then `dsolve/numeric/process_initial`(_n, _ini, _yini, _pars) end if; if _pars <> [] then _par := {seq(rhs(_pars[_i]) = _yini[_n+_i], _i = 1 .. nops(_pars))}; for _i from 0 to _n do _y0[_i] := subs(_par, _yini[_i]) end do; for _i from _n+1 to _n+nops(_pars) do _y0[_i] := _yini[_i] end do else for _i from 0 to _n do _y0[_i] := _yini[_i] end do end if; _octl[2] := _y0[0]; _octl[3] := _y0[0]; for _i to _n do _octl[_i+7] := _y0[_i] end do; for _i to nops(_pars) do _octl[2*_n+30+_i] := _y0[_n+_i] end do; for _i to 39 do _ctl[_i] := _octl[_i] end do; if _Env_smart_dsolve_numeric = true and type(_y0[0], 'numeric') then procname("right") := _y0[0]; procname("left") := _y0[0] end if; if _xout = "initial" then return [seq(_yini[_i], _i = 0 .. _n)] elif _xout = "parameters" then return [seq(_yini[_n+_i], _i = 1 .. nops(_pars))] else return [seq(_yini[_i], _i = 0 .. _n)], [seq(_yini[_n+_i], _i = 1 .. nops(_pars))] end if else return "procname" end if end if; if _xout-_y0[0] = 0. then return [seq(_y0[_i], _i = 0 .. _n)] end if; _reinit := false; if _xin <> "last" then if 0 < 0 and `dsolve/numeric/checkglobals`(0, table( [ ] ), _pars, _n, _yini) then _reinit := true; if _pars <> [] then _par := {seq(rhs(_pars[_i]) = _yini[_n+_i], _i = 1 .. nops(_pars))}; for _i from 0 to _n do _y0[_i] := subs(_par, _yini[_i]) end do; for _i from _n+1 to _n+nops(_pars) do _y0[_i] := _yini[_i] end do else for _i from 0 to _n do _y0[_i] := _yini[_i] end do end if; for _i to _n do _octl[_i+7] := _y0[_i] end do; for _i to nops(_pars) do _octl[2*_n+30+_i] := _y0[_n+_i] end do end if; if _pars <> [] and select(type, {seq(_yini[_n+_i], _i = 1 .. nops(_pars))}, 'undefined') <> {} then error "parameters must be initialized before solution can be computed" end if end if; if not _reinit and _xout-_ctl[2] = 0 then [_ctl[2], seq(_ctl[_i], _i = 8 .. 7+_n)] else if sign(_xout-_ctl[2]) <> sign(_ctl[2]-_y0[0]) or abs(_xout-_y0[0]) < abs(_xout-_ctl[2]) or _reinit then for _i to 39 do _ctl[_i] := _octl[_i] end do end if; _ctl[3] := _xout; if Digits <= evalhf(Digits) then try _errcd := evalhf(`dsolve/numeric/lsode`(_fcn, var(_ctl))) catch: userinfo(2, `dsolve/debug`, print(`Exception in lsode:`, [lastexception])); if searchtext('evalhf', lastexception[2]) <> 0 or searchtext('real', lastexception[2]) <> 0 or searchtext('hardware', lastexception[2]) <> 0 then _errcd := `dsolve/numeric/lsode`(_fcn, _ctl) else error  end if end try else _errcd := `dsolve/numeric/lsode`(_fcn, _ctl) end if; if _errcd < 0 then userinfo(2, {dsolve, `dsolve/lsode`}, `Last values returned:`); userinfo(2, {dsolve, `dsolve/lsode`}, ` t =`, _ctl[2]); _i := 8; userinfo(2, {dsolve, `dsolve/lsode`}, ` y =`, _ctl[_i]); for _i from _i+1 to 7+_n do userinfo(2, {dsolve, `dsolve/lsode`}, `	 `, _ctl[_i]) end do; if _errcd+1. = 0. then if _ctl[14+trunc(_ctl[1])] <> 0 then error "an excessive amount of work was done, maxstep may be too small" else error "an excessive amount of work (greater than mxstep) was done" end if elif _errcd+2. = 0. then error "too much accuracy was requested for the machine being used" elif _errcd+3. = 0. then error "illegal input was detected" elif _errcd+4. = 0. then error "repeated error test failures on the attempted step" elif _errcd+5. = 0. then error "repeated convergence test failures on the attempted step" elif _errcd+6. = 0. then error "pure relative error control requested for a variable that has vanished" elif _errcd+7. = 0. then error "cannot evaluate the solution past %1, maxfun limit exceeded (see <a href='http://www.maplesoft.com/support/help/search.aspx?term=dsolve,maxfun' target='_new'>?dsolve,maxfun</a> for details)", evalf[8](_ctl[2]) else error "unknown error code returned from lsode %1", trunc(_errcd) end if end if; if _Env_smart_dsolve_numeric = true then if _y0[0] < _xout and procname("right") < _xout then procname("right") := _xout elif _xout < _y0[0] and _xout < procname("left") then procname("left") := _xout end if end if; [_xout, seq(_ctl[_i], _i = 8 .. 7+_n)] end if end proc, (2) = Array(0..0, {}), (3) = [t, z(t)], (4) = [phi = phi, F = F, H = H, S_oi = S_oi, S_or = S_or, t0 = t0, z0 = z0]}); _vars := _dat[3]; _pars := map(rhs, _dat[4]); _n := nops(_vars)-1; _solnproc := _dat[1]; if not type(_xout, 'numeric') then if member(x_lsode, ["start", 'start', "method", 'method', "left", 'left', "right", 'right', "leftdata", "rightdata", "enginedata", "eventstop", 'eventstop', "eventclear", 'eventclear', "eventstatus", 'eventstatus', "eventcount", 'eventcount', "laxtol", 'laxtol', "numfun", 'numfun', NULL]) then _res := _solnproc(convert(x_lsode, 'string')); if 1 < nops([_res]) then return _res elif type(_res, 'array') then return eval(_res, 1) elif _res <> "procname" then return _res end if elif member(x_lsode, ["last", 'last', "initial", 'initial', "parameters", 'parameters', "initial_and_parameters", 'initial_and_parameters', NULL]) then _xout := convert(x_lsode, 'string'); _res := _solnproc(_xout); if _xout = "parameters" then return [seq(_pars[_i] = _res[_i], _i = 1 .. nops(_pars))] elif _xout = "initial_and_parameters" then return [seq(_vars[_i+1] = [_res][1][_i+1], _i = 0 .. _n), seq(_pars[_i] = [_res][2][_i], _i = 1 .. nops(_pars))] else return [seq(_vars[_i+1] = _res[_i+1], _i = 0 .. _n)] end if elif type(_xout, `=`) and member(lhs(_xout), ["initial", 'initial', "parameters", 'parameters', "initial_and_parameters", 'initial_and_parameters', NULL]) then _xout := convert(lhs(x_lsode), 'string') = rhs(x_lsode); if type(rhs(_xout), 'list') then _res := _solnproc(_xout) else error "initial and/or parameter values must be specified in a list" end if; if lhs(_xout) = "initial" then return [seq(_vars[_i+1] = _res[_i+1], _i = 0 .. _n)] elif lhs(_xout) = "parameters" then return [seq(_pars[_i] = _res[_i], _i = 1 .. nops(_pars))] else return [seq(_vars[_i+1] = [_res][1][_i+1], _i = 0 .. _n), seq(_pars[_i] = [_res][2][_i], _i = 1 .. nops(_pars))] end if elif type(_xout, `=`) and member(lhs(_xout), ["eventdisable", 'eventdisable', "eventenable", 'eventenable', "eventfired", 'eventfired', "direction", 'direction', NULL]) then return _solnproc(convert(lhs(x_lsode), 'string') = rhs(x_lsode)) elif _xout = "solnprocedure" then return eval(_solnproc) elif _xout = "sysvars" then return _vars end if; if procname <> unknown then return ('procname')(x_lsode) else _ndsol; _ndsol := pointto(_dat[2][0]); return ('_ndsol')(x_lsode) end if end if; try _res := _solnproc(_xout); [seq(_vars[_i+1] = _res[_i+1], _i = 0 .. _n)] catch: error  end try end proc

(2)

solSG(parameters = [.1, 1, .1, 1, .1, 0.1e-3, 0])

[phi = .1, F = 1., H = .1, S_oi = 1., S_or = .1, t0 = 0.1e-3, z0 = 0.]

(3)

``

Loading plots

odeplot(solSG, t = 0.1e-3 .. 10)

 

plots:-odeplot(solSG, t = 0.1e-3 .. 1)

 

plots:-odeplot(solSG, t = 0.1e-3 .. .1)

 

``


 

Download schechter_guo_v2.mw

My questions are:

1. Why does the solution for the longer time span (t<10) looks different from the shorter time span (t<0.1)? I have read about stiff ODEs and probably this has something to do with it. I am trying to figure out what is going on with the solutions.

2. I tried dsolve with stiff methods (lsode and rosenbrock) and both gave me the same solutions as above. I have not tried the advance options yet. How do I set dsolve so that the solution for the longer span (t>10) looks similar to shorter span?

Many thanks for your answers/suggestions.

 

I am trying to use standard notation for machine constants such as Xd' and Xd'', the d being a subscript. The prims are interperted as differential operators. How can I disable the d/dx.   

I've followed all the recommendations, but I can't see the mistake yet...:

z := proc(n::integer)

local A,E,S,k,s1,s2;

if n = 0 then

matrix(2,1,[0,0]);

else if n = 1 then

matrix(2,1,[-2,epsilon^()+sqrt(epsilon^(2)+4)]);

else

A(n) := matrix([[1+epsilon^(2)-lambda^(n),epsilon^()],[epsilon^(), 1-lambda^(n)]]);

E := matrix(2,1,[epsilon^(2),epsilon^()]);

S := 0;

for k  from 1 by 1 to n-1 do

s1 := thisproc(n-k);

s1 := s1[1];

s2 := thisproc(k);

s2 := s2[1];

S := S+s1*s2;

end do;

A(n)^(-1)*E*S ;

end if;

end proc

 

I need this to do a Dynamical systems problem called Hénon map, which has by function formula:

f(x,y) = (x+epsilon*(y+epsilon*x*(1-x)), y+epsilon*x*(1-x))

so the problem consists in finding the expression of function P such that f(P(t)) = P(lambda*t), where lambda = 1+(epsilon/2)*(epsilon-sqrt(epsilon^2+4)) is one of the eigenvalues of the differential matrix of f valued on (0,0). In Maple, I've put z = (x,y) to let the problem be a vector problem. And as I made the calculations with the help of a LaTex-presentation PDF, I took the formula A(n)*z(n) = (epsilon^2;epsilon)*S, where s is the following recursive sum in the code. If I don't get the result, I won't be able to explain why Matlab plotting goes too far, even when n = 2!!! Bref, trying to put things much easier in a difficult problem, but Maple returns me the error like I did some mistake, and I tried to debug these code lines!!! Along the code, please note that lambda and epsilon are mere parametres, not local variables. If the error comes from there, please put epsilon = 0.2 and lambda as the formula just below the code.

Dear!

Hope everyone is fine. I want to write the values of "phi" with their line colors in legend or in title. I know how to make legends but the problem is here there are nine graphs and we need only three legends. Please fix my problem. I am waiting the positive response. Thanks in advance

Legend.mw

 

I want to solve this integer-linear programming problem. There are four variables (xp,xq,xifp,xifq)
Two variables are nonnegative and integer (xp,xq)

the other two variables are binary(xifp,xifq)
 

When executing this command, maple says that the problem appears to be unbounded

LPSolve(750*xp+250*xq-50000*xifq,maximize=true,
{20*xp+30*xq<=2600,
30*xp+20*xq<=1000,
20*xp+30*xq<=2000,
xq<=99999*xifq,
xq>=20*xifq,
xp<=99999*xifp,
xp>=30*xifp,
xp>=0,
xq>=0},
integervariables={xp,xq},
binaryvariables={xifp,xifq}
);

and gives this solution[0, [xifp = 0, xifq = 0, xp = 0, xq = 0]]

however if i set a range for the variables xp,xq from 0 to 99999 for example


LPSolve(750*xp+250*xq-50000*xifq,maximize=true,
{20*xp+30*xq<=2600,
30*xp+20*xq<=1000,
20*xp+30*xq<=2000,
xq<=99999*xifq,
xq>=20*xifq,
xp<=99999*xifp,
xp>=30*xifp,
xp>=0,
xq>=0},
integervariables={xp,xq},
binaryvariables={xifp,xifq},
xp=0..99999,
xq=0..99999
);
maple returns this solution 

[49950000, [xifp = 1, xifq = 1, xp = 50000, xq = 50000]]

but if xp=50000 and xq=50000 this doesnt satisfy the first constrain
because 20*xp+30*xq</=2600
why does maple gives this mistaken solution, how can i solve it ?
please help,thanks for reading

 

hi every body: 

i want to solve the below ODE with boundry conditions ics, can anybody help me?

The ODE:

ode := x^3*(diff(f(x), x, x, x, x))+alpha*(x^4*(diff(f(x), x, x))+x^3*(diff(f(x), x, x))-x^2*(diff(f(x), x)))-2*x^2*(diff(f(x), x, x, x))+3*x*(diff(f(x), x, x))-3*(diff(f(x), x))+R*x*f(x)^2-R*x^2*(diff(f(x), x, x))*(diff(f(x), x))-3*R*x*f(x)*(diff(f(x), x, x))+3*R*f(x)*(diff(f(x), x))+x^2*R*f(x)*(diff(f(x), x, x, x))-M^2*(x^3*(diff(f(x), x, x, x))-x^2*(diff(f(x), x))) = 0

The boundry conditions:
ics := f(0) = 0, f(1) = 1, (D(f))(1) = 0, limit(diff((diff(f(x), x))/x, x), x = 0) = 0

M,R,alpha are constants.

with regards... 

I would like procedure P to perform inside the map statement exactly as it does outside the map statement. Can this be done?

Map_Procedure.mw

 

Hi,

I have problem with my first DataTable component ( no interaction with my slider) . ( See attachement)
 

Tableau de valeurs (1)

Tableau de valeurs : Contrôle sur la hauteur

 

NULL

 

Animation dynamique

Tableau de valeurs

NULL

NULL

Hauteur du cylindre inscrit : 

Volume correspondant : NULL

 

 

NULLNULL

``Choisissez la ligne pour supprimer la valeur :   

NULL

NULL

NULL

NULL

Tableau de valeurs (2)

 

Contôle sur le rayon

 

``

 

Animation dynamique

Tableau de valeurs

``

``

Rayon du cylindre inscrit : 

Volume correspondant : ``

 

 

````

NULLChoisissez la ligne pour supprimer la valeur :   

``

``

NULL

``

``

``

``

NULL

NULL

NULL


 

Download TabValeursCombin.mw
 

Tableau de valeurs (1)

Tableau de valeurs : Contrôle sur la hauteur

 

NULL

 

Animation dynamique

Tableau de valeurs

NULL

NULL

Hauteur du cylindre inscrit : 

Volume correspondant : NULL

 

 

NULLNULL

``Choisissez la ligne pour supprimer la valeur :   

NULL

NULL

NULL

NULL

Tableau de valeurs (2)

 

Contôle sur le rayon

 

``

 

Animation dynamique

Tableau de valeurs

``

``

Rayon du cylindre inscrit : 

Volume correspondant : ``

 

 

````

NULLChoisissez la ligne pour supprimer la valeur :   

``

``

NULL

``

``

``

``

NULL

NULL

NULL


 

Download TabValeursCombin.mw
 

Tableau de valeurs (1)

Tableau de valeurs : Contrôle sur la hauteur

 

NULL

 

Animation dynamique

Tableau de valeurs

NULL

NULL

Hauteur du cylindre inscrit : 

Volume correspondant : NULL

 

 

NULLNULL

``Choisissez la ligne pour supprimer la valeur :   

NULL

NULL

NULL

NULL

Tableau de valeurs (2)

 

Contôle sur le rayon

 

``

 

Animation dynamique

Tableau de valeurs

``

``

Rayon du cylindre inscrit : 

Volume correspondant : ``

 

 

````

NULLChoisissez la ligne pour supprimer la valeur :   

``

``

NULL

``

``

``

``

NULL

NULL

NULL


 

Download TabValeursCombin.mw

 

 

Some ideas ? 

Thanks

Say I want to use multiples commands on an expression

simplify(expand(eval(expr,x=y+1)))

 

Now similar I could use

(simplify@expand)(expr)

but how do I do it with sth like eval which needs extra arguments

(simplify@expand@eval(x->y, x=y+1))(f)

??

Hello everybody . I have a problem with plotting a trig function : arctan(x)

I would live to plot 

In the plot ,the angle jump from -pi/2(-1,57) to pi/2 (1,57)and for u-> there is an asymptot in delta=0

But instead this the asymptote that I would like to see is in delta= -3pi.

How can I remove the discontinuity of the arctan function and plot continuos negative angle?

Thank's and best regards

t := 5;
                               5
u := exp((1/2)*x-2*t*(1/3));
                            /1     10\
                         exp|- x - --|
                            \2     3 /
plot(u(x), x = -4 .. 4);


this is the exact solution graph

while below is the approximate solution graph

h := -1;
                               -1
t := 5;
                               5
u := exp((1/2)*x)*(1+t*(27*h^4+108*h^3+240*h^2+256*h)/2^7+t^2*(27*h^4+24*h^3+168*h^2)/2^7+(1/3)*t^3*(9*h^4+16*h^3)/2^6+(1/4)*t^4*h^4/2^4);
                         6877    /1  \
                         ---- exp|- x|
                         192     \2  /
plot(u(x), x = -4 .. 4);

 

with(Statistics):

Variance(Distribution(ProbabilityFunction = (k -> piecewise(k > 0, 2^(-k)))));
Error, invalid input: Statistics:-Variance expects its 1st argument, X, to be of type
{algebraic, {array, list, rtable, DataFrame, DataSeries}}, but received _m1085629680096

dd := Distribution(ProbabilityFunction = (k -> piecewise(k > 0, 2^(-k))));

Variance(dd);
                               6

The first input works in neither 2D nor 1D input mode.

Another issue is that the value of the variance is in fact wrong; Maple takes the probability function to have value 1 at zero.

I am trying to calculate the volume, lateral surface, ..., of a cone when we have two of three: radius of base, height, generator of cone.
My code only find with a element of list. How can I print all the results of the list? My code

                                                                    

restart;
 L := [[3, 4, 5], [5, 12, 13], [7, 24, 25], [8, 15, 17], [9, 40, 41], [11, 60, 61], [12, 35, 37], [13, 84, 85], [15, 112, 113], [16, 63, 65], [17, 144, 145], [19, 180, 181], [20, 21, 29], [20, 99, 101], [21, 220, 221], [23, 264, 265], [24, 143, 145], [28, 45, 53], [28, 195, 197], [32, 255, 257], [33, 56, 65], [36, 77, 85], [39, 80, 89], [44, 117, 125], [48, 55, 73], [51, 140, 149], [52, 165, 173], [57, 176, 185], [60, 91, 109], [60, 221, 229], [65, 72, 97], [68, 285, 293], [69, 260, 269], [84, 187, 205], [85, 132, 157], [88, 105, 137], [95, 168, 193], [96, 247, 265], [104, 153, 185], [105, 208, 233], [115, 252, 277], [119, 120, 169], [120, 209, 241], [133, 156, 205], [140, 171, 221], [160, 231, 281], [161, 240, 289]];
R := op(1, L[1]);
h := op(2, L[1]);
 l := op(3, L[1]);
peremeter_base := 2*Pi*R;
S_base := Pi*R^2;
V := (1/3)*Pi*R^2*h;
S_lateral := Pi*R*l;
S_total:= Pi*R*l + Pi*R^2;

 

I have spent much of my time earlier to make curve fitting possible. Somehow, because of my mistakes, the format for curve fitting changed. Can any one help me with getting my answer for curve fitting in the doc and from the excel data enclosed. Data imported, but donot know how to order the way it wants. I know the way,but do not iknow how to get it now.

Thanks

Ramakrishnan VExperimentalData.xlsxPleasePlot_Doubt.mw
 

restart; with(ExcelTools)

D6EFF := [20, 25, 23, 29]

[20, 25, 23, 29]

(1)

D6EFFP := evalf[3](CurveFitting:-LeastSquares(BP, D4EFF, v, curve = a*v^2+b*v+c))

58.8-19.8*v+2.75*v^2

(2)

 

M1 := Import("C:/Users/dell/Desktop/ExperimentalData.xlsx", 2)

Matrix(%id = 18446745680754394150)

(3)

M1[1, 11]

"D6P10U"

(4)

M1[1, 10]

"D6P5U"

(5)

M1[2, 15]

.267

(6)

NULL

for i to 21 do N[i] := NULL; for j to 7 do N[i] := N[i], M1[j, i] end do; d[i] := NULL; for j to 7 do d[i] := d[i], [N[1][j], N[i][j]] end do end do; y := a*x^2+b*x+c; for i from 2 to 21 do d[i] := [d[i]]; c[i] := CurveFitting[LeastSquares](d[i], x, curve = y) end do

Error, (in CurveFitting:-LeastSquares) data points not in recognizable format

 

d[1]

["BrakePower", "BrakePower"], [2.356, 2.356], [2.749, 2.749], [3.142, 3.142], [3.534, 3.534], [3.927, 3.927], [4.32, 4.32]

(7)

d[2]

[["BrakePower", "S2"], [2.356, .303], [2.749, .271], [3.142, .256], [3.534, .249], [3.927, .244], [4.32, .241]]

(8)

d[3]

["BrakePower", "S4"], [2.356, .256], [2.749, .225], [3.142, .211], [3.534, .205], [3.927, .2], [4.32, .197]

(9)

NULL

``


 

Download PleasePlot_Doubt.mw

 

Dearz!

Hope everyone is fine with everything. I am facing problem to solve the system of PDEs in the attached file. Is there any built-in command to the solve the attached system of PDEs via FEM, FDM, SIMPLER algorithm or some other efficient method? Please try to fix my problem. I am waiting your positive response. Thanks in advance.

PDEs_sol.mw

First 889 890 891 892 893 894 895 Last Page 891 of 2428