Maple 2017 Questions and Posts

These are Posts and Questions associated with the product, Maple 2017

Is there a way in Maple to evaluate the following integral - where the "w" are set to go to zero to avoid singularities? B.t.w. Maple just returns the integral unevaluated with or without the "w" with the simple "int" command. 

int(ln(((p1-p3)^2+w^2)/(p1+p3)^(w^2+2))*ln(((p1-p4)^2+w^2)/((p1+p4)^2+w^2))*sin(p1)/(p1*p3*p4), p1 = 0 .. infinity);

or even

int(ln(((p1-p3)^2+w^2)/(p1+p3)^(w^2+2))*ln(((p1-p4)^2+w^2)/((p1+p4)^2+w^2))*sin(p1)/(p1*p3*p4), p1 = 0 .. 100, numeric);

 

How I can plot function y versus A?

In attached code amount A is selected one (A=1)

How I can plot (y-A)?

thanks

shiv.mw
 

NULL

restart; omega := -2.667; mu := 10; B := 1; A := 1

eq1 := diff(x(t), t) = omega*x(t)-y(t)^2

diff(x(t), t) = -2.667*x(t)-y(t)^2

(1)

eq2 := diff(y(t), t) = mu*(z(t)-y(t))

diff(y(t), t) = 10*z(t)-10*y(t)

(2)

eq3 := diff(z(t), t) = A*y(t)-B*z(t)+x(t)*y(t)

diff(z(t), t) = y(t)-z(t)+x(t)*y(t)

(3)

``

dsys3 := { eq1, eq2, eq3,
           x(0) = 10,
           y(0) = 10,
           z(0) = 10
                      }:
dsol5 := dsolve(dsys3, numeric, stiff = true, maxfun = 10^7); plots:-odeplot(dsol5, [t, y(t)], 0 .. 1)

proc (x_rosenbrock) 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_rosenbrock) else _xout := evalf(x_rosenbrock) end if; _dat := Array(1..4, {(1) = proc (_xin) local _xout, _dtbl, _dat, _vmap, _x0, _y0, _val, _dig, _n, _ne, _nd, _nv, _pars, _ini, _par, _i, _j, _k, _src; option `Copyright (c) 2002 by Waterloo Maple Inc. All rights reserved.`; table( [( "complex" ) = false ] ) _xout := _xin; _pars := []; _dtbl := array( 1 .. 4, [( 1 ) = (array( 1 .. 24, [( 1 ) = (datatype = float[8], order = C_order, storage = rectangular), ( 2 ) = (datatype = float[8], order = C_order, storage = rectangular), ( 3 ) = ([0, 0, 0, Array(1..0, 1..2, {}, datatype = float[8], order = C_order)]), ( 4 ) = (Array(1..54, {(1) = 3, (2) = 3, (3) = 0, (4) = 0, (5) = 0, (6) = 0, (7) = 1, (8) = 0, (9) = 0, (10) = 0, (11) = 0, (12) = 0, (13) = 0, (14) = 0, (15) = 0, (16) = 0, (17) = 0, (18) = 1, (19) = 10000000, (20) = 0, (21) = 0, (22) = 2, (23) = 3, (24) = 0, (25) = 1, (26) = 15, (27) = 1, (28) = 0, (29) = 1, (30) = 3, (31) = 3, (32) = 0, (33) = 2, (34) = 0, (35) = 0, (36) = 0, (37) = 0, (38) = 0, (39) = 0, (40) = 0, (41) = 0, (42) = 0, (43) = 1, (44) = 0, (45) = 0, (46) = 0, (47) = 0, (48) = 0, (49) = 0, (50) = 50, (51) = 1, (52) = 0, (53) = 0, (54) = 0}, datatype = integer[8])), ( 5 ) = (Array(1..28, {(1) = .0, (2) = 0.10e-5, (3) = .0, (4) = 0.500001e-14, (5) = .0, (6) = 0.993032002821352e-3, (7) = .0, (8) = 0.10e-5, (9) = .0, (10) = .0, (11) = .0, (12) = .0, (13) = 1.0, (14) = .0, (15) = .49999999999999, (16) = .0, (17) = 1.0, (18) = 1.0, (19) = .0, (20) = .0, (21) = 1.0, (22) = 1.0, (23) = .0, (24) = .0, (25) = 0.10e-14, (26) = .0, (27) = .0, (28) = .0}, datatype = float[8], order = C_order)), ( 6 ) = (Array(1..3, {(1) = 10.0, (2) = 10.0, (3) = 10.0}, datatype = float[8], order = C_order)), ( 7 ) = ([Array(1..4, 1..7, {(1, 1) = .0, (1, 2) = .203125, (1, 3) = .3046875, (1, 4) = .75, (1, 5) = .8125, (1, 6) = .40625, (1, 7) = .8125, (2, 1) = 0.6378173828125e-1, (2, 2) = .0, (2, 3) = .279296875, (2, 4) = .27237892150878906, (2, 5) = -0.9686851501464844e-1, (2, 6) = 0.1956939697265625e-1, (2, 7) = .5381584167480469, (3, 1) = 0.31890869140625e-1, (3, 2) = .0, (3, 3) = -.34375, (3, 4) = -.335235595703125, (3, 5) = .2296142578125, (3, 6) = .41748046875, (3, 7) = 11.480712890625, (4, 1) = 0.9710520505905151e-1, (4, 2) = .0, (4, 3) = .40350341796875, (4, 4) = 0.20297467708587646e-1, (4, 5) = -0.6054282188415527e-2, (4, 6) = -0.4770040512084961e-1, (4, 7) = .77858567237854}, datatype = float[8], order = C_order), Array(1..6, 1..6, {(1, 1) = .0, (1, 2) = .0, (1, 3) = .0, (1, 4) = .0, (1, 5) = .0, (1, 6) = 1.0, (2, 1) = .25, (2, 2) = .0, (2, 3) = .0, (2, 4) = .0, (2, 5) = .0, (2, 6) = 1.0, (3, 1) = .1875, (3, 2) = .5625, (3, 3) = .0, (3, 4) = .0, (3, 5) = .0, (3, 6) = 2.0, (4, 1) = .23583984375, (4, 2) = -.87890625, (4, 3) = .890625, (4, 4) = .0, (4, 5) = .0, (4, 6) = .2681884765625, (5, 1) = .1272735595703125, (5, 2) = -.5009765625, (5, 3) = .44921875, (5, 4) = -0.128936767578125e-1, (5, 5) = .0, (5, 6) = 0.626220703125e-1, (6, 1) = -0.927734375e-1, (6, 2) = .626220703125, (6, 3) = -.4326171875, (6, 4) = .1418304443359375, (6, 5) = -0.861053466796875e-1, (6, 6) = .3131103515625}, datatype = float[8], order = C_order), Array(1..6, {(1) = .0, (2) = .386, (3) = .21, (4) = .63, (5) = 1.0, (6) = 1.0}, datatype = float[8], order = C_order), Array(1..6, {(1) = .25, (2) = -.1043, (3) = .1035, (4) = -0.362e-1, (5) = .0, (6) = .0}, datatype = float[8], order = C_order), Array(1..6, 1..5, {(1, 1) = .0, (1, 2) = .0, (1, 3) = .0, (1, 4) = .0, (1, 5) = .0, (2, 1) = 1.544, (2, 2) = .0, (2, 3) = .0, (2, 4) = .0, (2, 5) = .0, (3, 1) = .9466785280815533, (3, 2) = .25570116989825814, (3, 3) = .0, (3, 4) = .0, (3, 5) = .0, (4, 1) = 3.3148251870684886, (4, 2) = 2.896124015972123, (4, 3) = .9986419139977808, (4, 4) = .0, (4, 5) = .0, (5, 1) = 1.2212245092262748, (5, 2) = 6.019134481287752, (5, 3) = 12.537083329320874, (5, 4) = -.687886036105895, (5, 5) = .0, (6, 1) = 1.2212245092262748, (6, 2) = 6.019134481287752, (6, 3) = 12.537083329320874, (6, 4) = -.687886036105895, (6, 5) = 1.0}, datatype = float[8], order = C_order), Array(1..6, 1..5, {(1, 1) = .0, (1, 2) = .0, (1, 3) = .0, (1, 4) = .0, (1, 5) = .0, (2, 1) = -5.6688, (2, 2) = .0, (2, 3) = .0, (2, 4) = .0, (2, 5) = .0, (3, 1) = -2.4300933568337584, (3, 2) = -.20635991570891224, (3, 3) = .0, (3, 4) = .0, (3, 5) = .0, (4, 1) = -.10735290581452621, (4, 2) = -9.594562251021896, (4, 3) = -20.470286148096154, (4, 4) = .0, (4, 5) = .0, (5, 1) = 7.496443313968615, (5, 2) = -10.246804314641219, (5, 3) = -33.99990352819906, (5, 4) = 11.708908932061595, (5, 5) = .0, (6, 1) = 8.083246795922411, (6, 2) = -7.981132988062785, (6, 3) = -31.52159432874373, (6, 4) = 16.319305431231363, (6, 5) = -6.0588182388340535}, datatype = float[8], order = C_order), Array(1..3, 1..5, {(1, 1) = .0, (1, 2) = .0, (1, 3) = .0, (1, 4) = .0, (1, 5) = .0, (2, 1) = 10.126235083446911, (2, 2) = -7.487995877607633, (2, 3) = -34.800918615557414, (2, 4) = -7.9927717075687275, (2, 5) = 1.0251377232956207, (3, 1) = -.6762803392806898, (3, 2) = 6.087714651678606, (3, 3) = 16.43084320892463, (3, 4) = 24.767225114183653, (3, 5) = -6.5943891257167815}, datatype = float[8], order = C_order)]), ( 9 ) = ([Array(1..3, {(1) = 1.0, (2) = 1.0, (3) = 1.0}, datatype = float[8], order = C_order), Array(1..3, {(1) = .0, (2) = .0, (3) = .0}, datatype = float[8], order = C_order), Array(1..3, {(1) = .0, (2) = .0, (3) = .0}, datatype = float[8], order = C_order), Array(1..3, {(1) = .0, (2) = .0, (3) = .0}, datatype = float[8], order = C_order), Array(1..3, {(1) = .0, (2) = .0, (3) = .0}, datatype = float[8], order = C_order), Array(1..3, 1..3, {(1, 1) = -2.667, (1, 2) = -20.0, (1, 3) = .0, (2, 1) = .0, (2, 2) = -10.0, (2, 3) = 10.0, (3, 1) = 10.0, (3, 2) = 11.0, (3, 3) = -1.0}, datatype = float[8], order = C_order), Array(1..3, 1..3, {(1, 1) = .0, (1, 2) = .0, (1, 3) = .0, (2, 1) = .0, (2, 2) = .0, (2, 3) = .0, (3, 1) = .0, (3, 2) = .0, (3, 3) = .0}, datatype = float[8], order = C_order), Array(1..3, 1..6, {(1, 1) = .0, (1, 2) = .0, (1, 3) = .0, (1, 4) = .0, (1, 5) = .0, (1, 6) = .0, (2, 1) = .0, (2, 2) = .0, (2, 3) = .0, (2, 4) = .0, (2, 5) = .0, (2, 6) = .0, (3, 1) = .0, (3, 2) = .0, (3, 3) = .0, (3, 4) = .0, (3, 5) = .0, (3, 6) = .0}, datatype = float[8], order = C_order), Array(1..3, {(1) = 0, (2) = 0, (3) = 0}, datatype = integer[8]), Array(1..3, {(1) = .0, (2) = .0, (3) = .0}, datatype = float[8], order = C_order), Array(1..3, {(1) = .0, (2) = .0, (3) = .0}, datatype = float[8], order = C_order), Array(1..3, {(1) = .0, (2) = .0, (3) = .0}, datatype = float[8], order = C_order), Array(1..3, {(1) = .0, (2) = .0, (3) = .0}, datatype = float[8], order = C_order), Array(1..3, {(1) = .0, (2) = .0, (3) = .0}, datatype = float[8], order = C_order)]), ( 8 ) = ([Array(1..3, {(1) = 10.0, (2) = 10.0, (3) = 10.0}, datatype = float[8], order = C_order), Array(1..3, {(1) = .0, (2) = .0, (3) = .0}, datatype = float[8], order = C_order), Array(1..3, {(1) = 337.82889, (2) = 1000.0, (3) = 14278.2889}, datatype = float[8], order = C_order), 0, 0]), ( 11 ) = (Array(1..6, 0..3, {(1, 1) = .0, (1, 2) = .0, (1, 3) = .0, (2, 0) = .0, (2, 1) = .0, (2, 2) = .0, (2, 3) = .0, (3, 0) = .0, (3, 1) = .0, (3, 2) = .0, (3, 3) = .0, (4, 0) = .0, (4, 1) = .0, (4, 2) = .0, (4, 3) = .0, (5, 0) = .0, (5, 1) = .0, (5, 2) = .0, (5, 3) = .0, (6, 0) = .0, (6, 1) = .0, (6, 2) = .0, (6, 3) = .0}, datatype = float[8], order = C_order)), ( 10 ) = ([proc (N, X, Y, YP) option `[Y[1] = x(t), Y[2] = y(t), Y[3] = z(t)]`; YP[1] := -2.667*Y[1]-Y[2]^2; YP[2] := 10*Y[3]-10*Y[2]; YP[3] := Y[1]*Y[2]+Y[2]-Y[3]; 0 end proc, proc (X, Y, FX, FY) FX[1 .. 3] := 0; FY[1 .. 3, 1 .. 3] := 0; FY[1, 1] := -2.667; FY[3, 1] := Y[2]; FY[1, 2] := -2*Y[2]; FY[2, 2] := -10; FY[3, 2] := Y[1]+1; FY[2, 3] := 10; FY[3, 3] := -1; 0 end proc, 0, 0, 0, 0, 0, 0]), ( 13 ) = (), ( 12 ) = (), ( 15 ) = ("rosenbrock"), ( 14 ) = ([0, 0]), ( 18 ) = ([]), ( 19 ) = (0), ( 16 ) = ([0, 0, 0, []]), ( 17 ) = ([proc (N, X, Y, YP) option `[Y[1] = x(t), Y[2] = y(t), Y[3] = z(t)]`; YP[1] := -2.667*Y[1]-Y[2]^2; YP[2] := 10*Y[3]-10*Y[2]; YP[3] := Y[1]*Y[2]+Y[2]-Y[3]; 0 end proc, proc (X, Y, FX, FY) FX[1 .. 3] := 0; FY[1 .. 3, 1 .. 3] := 0; FY[1, 1] := -2.667; FY[3, 1] := Y[2]; FY[1, 2] := -2*Y[2]; FY[2, 2] := -10; FY[3, 2] := Y[1]+1; FY[2, 3] := 10; FY[3, 3] := -1; 0 end proc, 0, 0, 0, 0, 0, 0]), ( 22 ) = (0), ( 23 ) = (0), ( 20 ) = ([]), ( 21 ) = (0), ( 24 ) = (0)  ] ))  ] ); _y0 := Array(0..3, {(1) = 0., (2) = 10., (3) = 10.}); _vmap := array( 1 .. 3, [( 1 ) = (1), ( 2 ) = (2), ( 3 ) = (3)  ] ); _x0 := _dtbl[1][5][5]; _n := _dtbl[1][4][1]; _ne := _dtbl[1][4][3]; _nd := _dtbl[1][4][4]; _nv := _dtbl[1][4][16]; if not type(_xout, 'numeric') then if member(_xout, ["start", "left", "right"]) then if _Env_smart_dsolve_numeric = true or _dtbl[1][4][10] = 1 then if _xout = "left" then if type(_dtbl[2], 'table') then return _dtbl[2][5][1] end if elif _xout = "right" then if type(_dtbl[3], 'table') then return _dtbl[3][5][1] end if end if end if; return _dtbl[1][5][5] elif _xout = "method" then return _dtbl[1][15] elif _xout = "storage" then return evalb(_dtbl[1][4][10] = 1) elif _xout = "leftdata" then if not type(_dtbl[2], 'array') then return NULL else return eval(_dtbl[2]) end if elif _xout = "rightdata" then if not type(_dtbl[3], 'array') then return NULL else return eval(_dtbl[3]) end if elif _xout = "enginedata" then return eval(_dtbl[1]) elif _xout = "enginereset" then _dtbl[2] := evaln(_dtbl[2]); _dtbl[3] := evaln(_dtbl[3]); return NULL elif _xout = "initial" then return procname(_y0[0]) elif _xout = "laxtol" then return _dtbl[`if`(member(_dtbl[4], {2, 3}), _dtbl[4], 1)][5][18] elif _xout = "numfun" then return `if`(member(_dtbl[4], {2, 3}), _dtbl[_dtbl[4]][4][18], 0) elif _xout = "parameters" then return [seq(_y0[_n+_i], _i = 1 .. nops(_pars))] elif _xout = "initial_and_parameters" then return procname(_y0[0]), [seq(_y0[_n+_i], _i = 1 .. nops(_pars))] elif _xout = "last" then if _dtbl[4] <> 2 and _dtbl[4] <> 3 or _x0-_dtbl[_dtbl[4]][5][1] = 0. then error "no information is available on last computed point" else _xout := _dtbl[_dtbl[4]][5][1] end if elif _xout = "function" then if _dtbl[1][4][33]-2. = 0 then return eval(_dtbl[1][10], 1) else return eval(_dtbl[1][10][1], 1) end if elif _xout = "map" then return copy(_vmap) 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, _y0) end if; if _ini <> [] then `dsolve/numeric/process_initial`(_n-_ne, _ini, _y0, _pars, _vmap) end if; `dsolve/numeric/SC/reinitialize`(_dtbl, _y0, _n, procname, _pars); if _Env_smart_dsolve_numeric = true and type(_y0[0], 'numeric') and _dtbl[1][4][10] <> 1 then procname("right") := _y0[0]; procname("left") := _y0[0] end if; if _xout = "initial" then return [_y0[0], seq(_y0[_vmap[_i]], _i = 1 .. _n-_ne)] elif _xout = "parameters" then return [seq(_y0[_n+_i], _i = 1 .. nops(_pars))] else return [_y0[0], seq(_y0[_vmap[_i]], _i = 1 .. _n-_ne)], [seq(_y0[_n+_i], _i = 1 .. nops(_pars))] end if elif _xin = "eventstop" then if _nv = 0 then error "this solution has no events" end if; _i := _dtbl[4]; if _i <> 2 and _i <> 3 then return 0 end if; if _dtbl[_i][4][10] = 1 and assigned(_dtbl[5-_i]) and _dtbl[_i][4][9] < 100 and 100 <= _dtbl[5-_i][4][9] then _i := 5-_i; _dtbl[4] := _i; _j := round(_dtbl[_i][4][17]); return round(_dtbl[_i][3][1][_j, 1]) elif 100 <= _dtbl[_i][4][9] then _j := round(_dtbl[_i][4][17]); return round(_dtbl[_i][3][1][_j, 1]) else return 0 end if elif _xin = "eventstatus" then if _nv = 0 then error "this solution has no events" end if; _i := [selectremove(proc (a) options operator, arrow; _dtbl[1][3][1][a, 7] = 1 end proc, {seq(_j, _j = 1 .. round(_dtbl[1][3][1][_nv+1, 1]))})]; return ':-enabled' = _i[1], ':-disabled' = _i[2] elif _xin = "eventclear" then if _nv = 0 then error "this solution has no events" end if; _i := _dtbl[4]; if _i <> 2 and _i <> 3 then error "no events to clear" end if; if _dtbl[_i][4][10] = 1 and assigned(_dtbl[5-_i]) and _dtbl[_i][4][9] < 100 and 100 < _dtbl[5-_i][4][9] then _dtbl[4] := 5-_i; _i := 5-_i end if; if _dtbl[_i][4][9] < 100 then error "no events to clear" elif _nv < _dtbl[_i][4][9]-100 then error "event error condition cannot be cleared" else _j := _dtbl[_i][4][9]-100; if irem(round(_dtbl[_i][3][1][_j, 4]), 2) = 1 then error "retriggerable events cannot be cleared" end if; _j := round(_dtbl[_i][3][1][_j, 1]); for _k to _nv do if _dtbl[_i][3][1][_k, 1] = _j then if _dtbl[_i][3][1][_k, 2] = 3 then error "range events cannot be cleared" end if; _dtbl[_i][3][1][_k, 8] := _dtbl[_i][3][1][_nv+1, 8] end if end do; _dtbl[_i][4][17] := 0; _dtbl[_i][4][9] := 0; if _dtbl[1][4][10] = 1 then if _i = 2 then try procname(procname("left")) catch:  end try else try procname(procname("right")) catch:  end try end if end if end if; return  elif type(_xin, `=`) and member(lhs(_xin), {"eventdisable", "eventenable"}) then if _nv = 0 then error "this solution has no events" end if; if type(rhs(_xin), {('list')('posint'), ('set')('posint')}) then _i := {op(rhs(_xin))} elif type(rhs(_xin), 'posint') then _i := {rhs(_xin)} else error "event identifiers must be integers in the range 1..%1", round(_dtbl[1][3][1][_nv+1, 1]) end if; if select(proc (a) options operator, arrow; _nv < a end proc, _i) <> {} then error "event identifiers must be integers in the range 1..%1", round(_dtbl[1][3][1][_nv+1, 1]) end if; _k := {}; for _j to _nv do if member(round(_dtbl[1][3][1][_j, 1]), _i) then _k := `union`(_k, {_j}) end if end do; _i := _k; if lhs(_xin) = "eventdisable" then _dtbl[4] := 0; _j := [evalb(assigned(_dtbl[2]) and member(_dtbl[2][4][17], _i)), evalb(assigned(_dtbl[3]) and member(_dtbl[3][4][17], _i))]; for _k in _i do _dtbl[1][3][1][_k, 7] := 0; if assigned(_dtbl[2]) then _dtbl[2][3][1][_k, 7] := 0 end if; if assigned(_dtbl[3]) then _dtbl[3][3][1][_k, 7] := 0 end if end do; if _j[1] then for _k to _nv+1 do if _k <= _nv and not type(_dtbl[2][3][4][_k, 1], 'undefined') then userinfo(3, {'events', 'eventreset'}, `reinit #2, event code `, _k, ` to defined init `, _dtbl[2][3][4][_k, 1]); _dtbl[2][3][1][_k, 8] := _dtbl[2][3][4][_k, 1] elif _dtbl[2][3][1][_k, 2] = 0 and irem(iquo(round(_dtbl[2][3][1][_k, 4]), 32), 2) = 1 then userinfo(3, {'events', 'eventreset'}, `reinit #2, event code `, _k, ` to rate hysteresis init `, _dtbl[2][5][24]); _dtbl[2][3][1][_k, 8] := _dtbl[2][5][24] elif _dtbl[2][3][1][_k, 2] = 0 and irem(iquo(round(_dtbl[2][3][1][_k, 4]), 2), 2) = 0 then userinfo(3, {'events', 'eventreset'}, `reinit #2, event code `, _k, ` to initial init `, _x0); _dtbl[2][3][1][_k, 8] := _x0 else userinfo(3, {'events', 'eventreset'}, `reinit #2, event code `, _k, ` to fireinitial init `, _x0-1); _dtbl[2][3][1][_k, 8] := _x0-1 end if end do; _dtbl[2][4][17] := 0; _dtbl[2][4][9] := 0; if _dtbl[1][4][10] = 1 then procname(procname("left")) end if end if; if _j[2] then for _k to _nv+1 do if _k <= _nv and not type(_dtbl[3][3][4][_k, 2], 'undefined') then userinfo(3, {'events', 'eventreset'}, `reinit #3, event code `, _k, ` to defined init `, _dtbl[3][3][4][_k, 2]); _dtbl[3][3][1][_k, 8] := _dtbl[3][3][4][_k, 2] elif _dtbl[3][3][1][_k, 2] = 0 and irem(iquo(round(_dtbl[3][3][1][_k, 4]), 32), 2) = 1 then userinfo(3, {'events', 'eventreset'}, `reinit #3, event code `, _k, ` to rate hysteresis init `, _dtbl[3][5][24]); _dtbl[3][3][1][_k, 8] := _dtbl[3][5][24] elif _dtbl[3][3][1][_k, 2] = 0 and irem(iquo(round(_dtbl[3][3][1][_k, 4]), 2), 2) = 0 then userinfo(3, {'events', 'eventreset'}, `reinit #3, event code `, _k, ` to initial init `, _x0); _dtbl[3][3][1][_k, 8] := _x0 else userinfo(3, {'events', 'eventreset'}, `reinit #3, event code `, _k, ` to fireinitial init `, _x0+1); _dtbl[3][3][1][_k, 8] := _x0+1 end if end do; _dtbl[3][4][17] := 0; _dtbl[3][4][9] := 0; if _dtbl[1][4][10] = 1 then procname(procname("right")) end if end if else for _k in _i do _dtbl[1][3][1][_k, 7] := 1 end do; _dtbl[2] := evaln(_dtbl[2]); _dtbl[3] := evaln(_dtbl[3]); _dtbl[4] := 0; if _dtbl[1][4][10] = 1 then if _x0 <= procname("right") then try procname(procname("right")) catch:  end try end if; if procname("left") <= _x0 then try procname(procname("left")) catch:  end try end if end if end if; return  elif type(_xin, `=`) and lhs(_xin) = "eventfired" then if not type(rhs(_xin), 'list') then error "'eventfired' must be specified as a list" end if; if _nv = 0 then error "this solution has no events" end if; if _dtbl[4] <> 2 and _dtbl[4] <> 3 then error "'direction' must be set prior to calling/setting 'eventfired'" end if; _i := _dtbl[4]; _val := NULL; if not assigned(_EnvEventRetriggerWarned) then _EnvEventRetriggerWarned := false end if; for _k in rhs(_xin) do if type(_k, 'integer') then _src := _k elif type(_k, 'integer' = 'anything') and type(evalf(rhs(_k)), 'numeric') then _k := lhs(_k) = evalf[max(Digits, 18)](rhs(_k)); _src := lhs(_k) else error "'eventfired' entry is not valid: %1", _k end if; if _src < 1 or round(_dtbl[1][3][1][_nv+1, 1]) < _src then error "event identifiers must be integers in the range 1..%1", round(_dtbl[1][3][1][_nv+1, 1]) end if; _src := {seq(`if`(_dtbl[1][3][1][_j, 1]-_src = 0., _j, NULL), _j = 1 .. _nv)}; if nops(_src) <> 1 then error "'eventfired' can only be set/queried for root-finding events and time/interval events" end if; _src := _src[1]; if _dtbl[1][3][1][_src, 2] <> 0. and _dtbl[1][3][1][_src, 2]-2. <> 0. then error "'eventfired' can only be set/queried for root-finding events and time/interval events" elif irem(round(_dtbl[1][3][1][_src, 4]), 2) = 1 then if _EnvEventRetriggerWarned = false then WARNING(`'eventfired' has no effect on events that retrigger`) end if; _EnvEventRetriggerWarned := true end if; if _dtbl[_i][3][1][_src, 2] = 0 and irem(iquo(round(_dtbl[_i][3][1][_src, 4]), 32), 2) = 1 then _val := _val, undefined elif type(_dtbl[_i][3][4][_src, _i-1], 'undefined') or _i = 2 and _dtbl[2][3][1][_src, 8] < _dtbl[2][3][4][_src, 1] or _i = 3 and _dtbl[3][3][4][_src, 2] < _dtbl[3][3][1][_src, 8] then _val := _val, _dtbl[_i][3][1][_src, 8] else _val := _val, _dtbl[_i][3][4][_src, _i-1] end if; if type(_k, `=`) then if _dtbl[_i][3][1][_src, 2] = 0 and irem(iquo(round(_dtbl[_i][3][1][_src, 4]), 32), 2) = 1 then error "cannot set event code for a rate hysteresis event" end if; userinfo(3, {'events', 'eventreset'}, `manual set event code `, _src, ` to value `, rhs(_k)); _dtbl[_i][3][1][_src, 8] := rhs(_k); _dtbl[_i][3][4][_src, _i-1] := rhs(_k) end if end do; return [_val] elif type(_xin, `=`) and lhs(_xin) = "direction" then if not member(rhs(_xin), {-1, 1, ':-left', ':-right'}) then error "'direction' must be specified as either '1' or 'right' (positive) or '-1' or 'left' (negative)" end if; _src := `if`(_dtbl[4] = 2, -1, `if`(_dtbl[4] = 3, 1, undefined)); _i := `if`(member(rhs(_xin), {1, ':-right'}), 3, 2); _dtbl[4] := _i; _dtbl[_i] := `dsolve/numeric/SC/IVPdcopy`(_dtbl[1], `if`(assigned(_dtbl[_i]), _dtbl[_i], NULL)); if 0 < _nv then for _j to _nv+1 do if _j <= _nv and not type(_dtbl[_i][3][4][_j, _i-1], 'undefined') then userinfo(3, {'events', 'eventreset'}, `reinit #4, event code `, _j, ` to defined init `, _dtbl[_i][3][4][_j, _i-1]); _dtbl[_i][3][1][_j, 8] := _dtbl[_i][3][4][_j, _i-1] elif _dtbl[_i][3][1][_j, 2] = 0 and irem(iquo(round(_dtbl[_i][3][1][_j, 4]), 32), 2) = 1 then userinfo(3, {'events', 'eventreset'}, `reinit #4, event code `, _j, ` to rate hysteresis init `, _dtbl[_i][5][24]); _dtbl[_i][3][1][_j, 8] := _dtbl[_i][5][24] elif _dtbl[_i][3][1][_j, 2] = 0 and irem(iquo(round(_dtbl[_i][3][1][_j, 4]), 2), 2) = 0 then userinfo(3, {'events', 'eventreset'}, `reinit #4, event code `, _j, ` to initial init `, _x0); _dtbl[_i][3][1][_j, 8] := _x0 else userinfo(3, {'events', 'eventreset'}, `reinit #4, event code `, _j, ` to fireinitial init `, _x0-2*_i+5.0); _dtbl[_i][3][1][_j, 8] := _x0-2*_i+5.0 end if end do end if; return _src elif _xin = "eventcount" then if _dtbl[1][3][1] = 0 or _dtbl[4] <> 2 and _dtbl[4] <> 3 then return 0 else return round(_dtbl[_dtbl[4]][3][1][_nv+1, 12]) end if else return "procname" end if end if; if _xout = _x0 then return [_x0, seq(evalf(_dtbl[1][6][_vmap[_i]]), _i = 1 .. _n-_ne)] end if; _i := `if`(_x0 <= _xout, 3, 2); if _xin = "last" and 0 < _dtbl[_i][4][9] and _dtbl[_i][4][9] < 100 then _dat := eval(_dtbl[_i], 2); _j := _dat[4][20]; return [_dat[11][_j, 0], seq(_dat[11][_j, _vmap[_i]], _i = 1 .. _n-_ne-_nd), seq(_dat[8][1][_vmap[_i]], _i = _n-_ne-_nd+1 .. _n-_ne)] end if; if not type(_dtbl[_i], 'array') then _dtbl[_i] := `dsolve/numeric/SC/IVPdcopy`(_dtbl[1], `if`(assigned(_dtbl[_i]), _dtbl[_i], NULL)); if 0 < _nv then for _j to _nv+1 do if _j <= _nv and not type(_dtbl[_i][3][4][_j, _i-1], 'undefined') then userinfo(3, {'events', 'eventreset'}, `reinit #5, event code `, _j, ` to defined init `, _dtbl[_i][3][4][_j, _i-1]); _dtbl[_i][3][1][_j, 8] := _dtbl[_i][3][4][_j, _i-1] elif _dtbl[_i][3][1][_j, 2] = 0 and irem(iquo(round(_dtbl[_i][3][1][_j, 4]), 32), 2) = 1 then userinfo(3, {'events', 'eventreset'}, `reinit #5, event code `, _j, ` to rate hysteresis init `, _dtbl[_i][5][24]); _dtbl[_i][3][1][_j, 8] := _dtbl[_i][5][24] elif _dtbl[_i][3][1][_j, 2] = 0 and irem(iquo(round(_dtbl[_i][3][1][_j, 4]), 2), 2) = 0 then userinfo(3, {'events', 'eventreset'}, `reinit #5, event code `, _j, ` to initial init `, _x0); _dtbl[_i][3][1][_j, 8] := _x0 else userinfo(3, {'events', 'eventreset'}, `reinit #5, event code `, _j, ` to fireinitial init `, _x0-2*_i+5.0); _dtbl[_i][3][1][_j, 8] := _x0-2*_i+5.0 end if end do end if end if; if _xin <> "last" then if 0 < 0 then if `dsolve/numeric/checkglobals`(op(_dtbl[1][14]), _pars, _n, _y0) then `dsolve/numeric/SC/reinitialize`(_dtbl, _y0, _n, procname, _pars, _i) end if end if; if _dtbl[1][4][7] = 0 then error "parameters must be initialized before solution can be computed" end if end if; _dat := eval(_dtbl[_i], 2); _dtbl[4] := _i; try _src := `dsolve/numeric/SC/IVPrun`(_dat, _xout) catch: userinfo(2, `dsolve/debug`, print(`Exception in solnproc:`, [lastexception][2 .. -1])); error  end try; if _src = 0 and 100 < _dat[4][9] then _val := _dat[3][1][_nv+1, 8] else _val := _dat[11][_dat[4][20], 0] end if; if _src <> 0 or _dat[4][9] <= 0 then _dtbl[1][5][1] := _xout else _dtbl[1][5][1] := _val end if; if _i = 3 and _val < _xout then Rounding := -infinity; if _dat[4][9] = 1 then error "cannot evaluate the solution further right of %1, probably a singularity", evalf[8](_val) elif _dat[4][9] = 2 then error "cannot evaluate the solution further right of %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](_val) elif _dat[4][9] = 3 then if _dat[4][25] = 3 then error "cannot evaluate the solution past the initial point, problem may be initially singular or improperly set up" else error "cannot evaluate the solution past the initial point, problem may be complex, initially singular or improperly set up" end if elif _dat[4][9] = 4 then error "cannot evaluate the solution further right of %1, accuracy goal cannot be achieved with specified 'minstep'", evalf[8](_val) elif _dat[4][9] = 5 then error "cannot evaluate the solution further right of %1, too many step failures, tolerances may be too loose for problem", evalf[8](_val) elif _dat[4][9] = 6 then error "cannot evaluate the solution further right of %1, cannot downgrade delay storage for problems with delay derivative order > 1, try increasing delaypts", evalf[8](_val) elif _dat[4][9] = 10 then error "cannot evaluate the solution further right of %1, interrupt requested", evalf[8](_val) elif 100 < _dat[4][9] then if _dat[4][9]-100 = _nv+1 then error "constraint projection failure on event at t=%1", evalf[8](_val) elif _dat[4][9]-100 = _nv+2 then error "index-1 and derivative evaluation failure on event at t=%1", evalf[8](_val) elif _dat[4][9]-100 = _nv+3 then error "maximum number of event iterations reached (%1) at t=%2", round(_dat[3][1][_nv+1, 3]), evalf[8](_val) else if _Env_dsolve_nowarnstop <> true then `dsolve/numeric/warning`(StringTools:-FormatMessage("cannot evaluate the solution further right of %1, event #%2 triggered a halt", evalf[8](_val), round(_dat[3][1][_dat[4][9]-100, 1]))) end if; Rounding := 'nearest'; _xout := _val end if else error "cannot evaluate the solution further right of %1", evalf[8](_val) end if elif _i = 2 and _xout < _val then Rounding := infinity; if _dat[4][9] = 1 then error "cannot evaluate the solution further left of %1, probably a singularity", evalf[8](_val) elif _dat[4][9] = 2 then error "cannot evaluate the solution further left of %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](_val) elif _dat[4][9] = 3 then if _dat[4][25] = 3 then error "cannot evaluate the solution past the initial point, problem may be initially singular or improperly set up" else error "cannot evaluate the solution past the initial point, problem may be complex, initially singular or improperly set up" end if elif _dat[4][9] = 4 then error "cannot evaluate the solution further left of %1, accuracy goal cannot be achieved with specified 'minstep'", evalf[8](_val) elif _dat[4][9] = 5 then error "cannot evaluate the solution further left of %1, too many step failures, tolerances may be too loose for problem", evalf[8](_val) elif _dat[4][9] = 6 then error "cannot evaluate the solution further left of %1, cannot downgrade delay storage for problems with delay derivative order > 1, try increasing delaypts", evalf[8](_val) elif _dat[4][9] = 10 then error "cannot evaluate the solution further right of %1, interrupt requested", evalf[8](_val) elif 100 < _dat[4][9] then if _dat[4][9]-100 = _nv+1 then error "constraint projection failure on event at t=%1", evalf[8](_val) elif _dat[4][9]-100 = _nv+2 then error "index-1 and derivative evaluation failure on event at t=%1", evalf[8](_val) elif _dat[4][9]-100 = _nv+3 then error "maximum number of event iterations reached (%1) at t=%2", round(_dat[3][1][_nv+1, 3]), evalf[8](_val) else if _Env_dsolve_nowarnstop <> true then `dsolve/numeric/warning`(StringTools:-FormatMessage("cannot evaluate the solution further left of %1, event #%2 triggered a halt", evalf[8](_val), round(_dat[3][1][_dat[4][9]-100, 1]))) end if; Rounding := 'nearest'; _xout := _val end if else error "cannot evaluate the solution further left of %1", evalf[8](_val) end if end if; if _EnvInFsolve = true then _dig := _dat[4][26]; _dat[4][26] := _EnvDSNumericSaveDigits; _Env_dsolve_SC_native := true; if _dat[4][25] = 1 then _i := 1; _dat[4][25] := 2 else _i := _dat[4][25] end if; _val := `dsolve/numeric/SC/IVPval`(_dat, _xout, _src); _dat[4][25] := _i; _dat[4][26] := _dig; [_xout, seq(_val[_vmap[_i]], _i = 1 .. _n-_ne)] else Digits := _dat[4][26]; _val := `dsolve/numeric/SC/IVPval`(eval(_dat, 2), _xout, _src); [_xout, seq(_val[_vmap[_i]], _i = 1 .. _n-_ne)] end if end proc, (2) = Array(0..0, {}), (3) = [t, x(t), y(t), z(t)], (4) = []}); _vars := _dat[3]; _pars := map(rhs, _dat[4]); _n := nops(_vars)-1; _solnproc := _dat[1]; if not type(_xout, 'numeric') then if member(x_rosenbrock, ["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_rosenbrock, '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_rosenbrock, ["last", 'last', "initial", 'initial', "parameters", 'parameters', "initial_and_parameters", 'initial_and_parameters', NULL]) then _xout := convert(x_rosenbrock, '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_rosenbrock), 'string') = rhs(x_rosenbrock); 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_rosenbrock), 'string') = rhs(x_rosenbrock)) elif _xout = "solnprocedure" then return eval(_solnproc) elif _xout = "sysvars" then return _vars end if; if procname <> unknown then return ('procname')(x_rosenbrock) else _ndsol; _ndsol := pointto(_dat[2][0]); return ('_ndsol')(x_rosenbrock) end if end if; try _res := _solnproc(_xout); [seq(_vars[_i+1] = _res[_i+1], _i = 0 .. _n)] catch: error  end try end proc

 

 

NULL

NULL

NULL

NULL

NULL

NULL

NULL

NULL

NULL

NULL

NULL

NULL

NULL

NULL

NULL

NULL


 

Download shiv.mw

 

 

Let's say you have a m times n matrix and you want to ask Maple to computes all of its p minors (p smaller than minimum of m and n). Is there any prepared command for it at Maple? I can write a procedure myself, I just want to know if there is a command in Maple or not. The minor command in LinearAlgebra package is just computing determinant of a square matrix after removing a given row and a given column which is not what I'm talking about.

hi

how i can pdsolve these partial differentialequations?

thanks

10.mw
 

restart; R := 1; UB := 1; lambda := 1; pe1 := 1; pe2 := 1; L := 1; Gr := 1; Br := 1; p := 1; LinearAlgebra:-HermitianTranspose(L) := 1; Nb := 1; Nt := 1; a := lambda*pe1*u(r, z)*(diff(sigma(r, z), z))-(diff(r*(diff(sigma(r, z), r)), r))/r-lambda^2*(diff(sigma(r, z), z, z))-Nt*((diff(r*(diff(theta(r, z), r)), r))/r+lambda^2*(diff(theta(r, z), z, z)))/Nb

u(r, z)*(diff(sigma(r, z), z))-(diff(sigma(r, z), r)+r*(diff(diff(sigma(r, z), r), r)))/r-(diff(diff(sigma(r, z), z), z))-(diff(theta(r, z), r)+r*(diff(diff(theta(r, z), r), r)))/r-(diff(diff(theta(r, z), z), z))

(1)

b := lambda*pe2*u(r, z)*(diff(theta(r, z), z))-(diff(r*(diff(theta(r, z), r)), r))/r-lambda^2*(diff(theta(r, z), z, z))-Nb*((diff(sigma(r, z), r))*(diff(theta(r, z), r))+(diff(sigma(r, z), z))*(diff(theta(r, z), z))*lambda^2)-Nt*((diff(theta(r, z), r))^2+lambda^2*(diff(theta(r, z), z))^2)

u(r, z)*(diff(theta(r, z), z))-(diff(theta(r, z), r)+r*(diff(diff(theta(r, z), r), r)))/r-(diff(diff(theta(r, z), z), z))-(diff(sigma(r, z), r))*(diff(theta(r, z), r))-(diff(sigma(r, z), z))*(diff(theta(r, z), z))-(diff(theta(r, z), r))^2-(diff(theta(r, z), z))^2

(2)

c := -p+(diff(r*(diff(u(r, z), r)), r))/r-L^2*(diff(r*(diff((diff(r*(diff(u(r, z), r)), r))/r, r)), r))/r+Gr*theta(r, z)+Br*sigma(r, z)

-1+(diff(u(r, z), r)+r*(diff(diff(u(r, z), r), r)))/r-(-(diff(u(r, z), r)+r*(diff(diff(u(r, z), r), r)))/r^2+(2*(diff(diff(u(r, z), r), r))+r*(diff(diff(diff(u(r, z), r), r), r)))/r+r*(2*(diff(u(r, z), r)+r*(diff(diff(u(r, z), r), r)))/r^3-2*(2*(diff(diff(u(r, z), r), r))+r*(diff(diff(diff(u(r, z), r), r), r)))/r^2+(3*(diff(diff(diff(u(r, z), r), r), r))+r*(diff(diff(diff(diff(u(r, z), r), r), r), r)))/r))/r+theta(r, z)+sigma(r, z)

(3)

bc := {sigma(R, z) = 0, sigma(r, 0) = 1, theta(R, z) = 0, theta(r, 0) = 1, u(R, z) = UB, (D[1](sigma))(0, z) = 0, (D[1](sigma))(r, LinearAlgebra:-HermitianTranspose(L)) = 0, (D[1](theta))(0, z) = 0, (D[1](theta))(r, LinearAlgebra:-HermitianTranspose(L)) = 0, (D[1](u))(0, z) = 0, (D[2](u))(R, z) = 0}

{sigma(1, z) = 0, sigma(r, 0) = 1, theta(1, z) = 0, theta(r, 0) = 1, u(1, z) = 1, (D[1](sigma))(0, z) = 0, (D[1](sigma))(r, 1) = 0, (D[1](theta))(0, z) = 0, (D[1](theta))(r, 1) = 0, (D[1](u))(0, z) = 0, (D[2](u))(1, z) = 0}

(4)

``


 

Download 10.mw

 

I'm producing multiple matrices via a for-loop (n = + 100) and I want to export each matrix into the same Excel-sheet, however I want to insert all matrices in cells beneath each other. I'm wondering if anyone knows how to do this? I've tried a loop variable but that doesn't work inside the "  " to specify the cells...

Note: Matrices are all 11x6. That means I want them inserted in the same sheet, in cells like this:
1st matrix: A1:F11
2nd matrix: A12:F23
3rd matrix: A24:F35
etc.

In other words: how to execute a loop-variable inside the " ", or to bypass it???
Please help! It's for my MSc Thesis:)

Why when I write (9b2 - r2 - a2 cos(theta)2)2 maple changes to (r2+ a2 cos(theta)2 - 9b2)2 ? Would anyone know how to block this change?

Thanks!

I submit a bug through MaplePrimes because I can't do it as usually (Hope some people understand me.). Let us consider

restart; pdsolve([diff(u(t, x), t, t) = diff(u(t, x), x, x), u(t, 0) = 0, u(t, Pi) = 0]);
pdsolve([diff(u(t, x), t, t) = diff(u(t, x), x, x), u(t, 0) = 0, u(t, Pi) = 0], generalsolution);
u(t, x) = Sum(sin(n*x)*(_C5(n)*cos(n*t)+_C1(n)*sin(n*t)), n = 1 .. infinity)
u(t, x) = Sum(sin(n*x)*(_C5(n)*cos(n*t)+_C1(n)*sin(n*t)), n = 1 .. infinity)

The question arises: what do these outputs mean? I don't see any explanation in ?pdsolve and ?examples,pdsolve_boundaryconditions. What are _C1(n) and _C5(n)? Under which conditions does the above series converge?

Moreover,

pdetest(%, [diff(u(t, x), t, t) = diff(u(t, x), x, x), u(t, 0) = 0, u(t, Pi) = 0]);
                           [0, 0, 0]

I think the above is simply a fake: it is possible to differentiate  a series only under certain conditions.

Bug_in_pdsolve.mw

Please, don't convert my post to a question. This is not correct and fair. Hope some people understand me.

how dsolve differential equations?

ta.mw

Hi all,

I have a system of 18 polynomial equations (and 18 variables).

The polynomials are of second degree (meaning, every polynomial has at most multiplications of two different variables or a single variable squared).

My goal is to be able to solve the polynomials by getting ALL the possible solutions.

For now, when I use the solve command, Maple is trying to solve and never returns the solutions to the equations (I stopped after 3 hours).

But when I use fsolve, Maple returns a single solution (immediately) which is sometimes the solution I expected to get but not always.

If I don't get the solution I expected to get, I call fsolve again but this time with the 'avoid' option in order not to get the same solution again. that way if I use 'fsolve' about 3 times I get the solution I expected to get in most cases. but still not always.

My question, since the equations are polynomials, is there a way to tell Maple to solve the equations in a more efficient way so that I will get ALL the possible solutions? (when I use the 'solve' command I don't tell Maple in any way that the equations are polynomials). or any other way to get all the solutions (I'm new with Maple so maybe there are other commands that I don't know about and can give me all the solutions).

btw, I need only the real solutions. I don't need the complex solutions if exist.

 

I wrote bellow an example of the code in Maple with the equations that I'm trying to solve (note that I use fsolve twice but only in the second time I get the solutions I expected to get).

The 'h' function in the code looks extermely long but I don't try to solve 'h' in the fsolve command. only the g1* and diff_r1* and diff_t1* functions (which are much shorter than 'h').

I will appreciate any help.

Thanks!

Here is the code:

restart;
g1_1_1:=r1__1_1^2+r1__1_2^2+r1__1_3^2-1;
g1_1_2:=r1__1_1*r1__2_1+r1__1_2*r1__2_2+r1__1_3*r1__2_3;
g1_1_3:=r1__1_1*r1__3_1+r1__1_2*r1__3_2+r1__1_3*r1__3_3;
g1_2_2:=r1__2_1^2+r1__2_2^2+r1__2_3^2-1;
g1_2_3:=r1__2_1*r1__3_1+r1__2_2*r1__3_2+r1__2_3*r1__3_3;
g1_3_3:=r1__3_1^2+r1__3_2^2+r1__3_3^2-1;
h:=(-.992492661403*r1__1_1+12.3284921161777*r1__1_2+7.57084655768457*r1__1_3+.324267866473309*t11+.0749281794197556+1.09088742857604*r1__2_1-13.5507269559957*r1__2_2-8.32141299937268*r1__2_3-.356415470609132*t12+.928796854654334*r1__3_1-11.5372789567796*r1__3_2-7.08496771958172*r1__3_3-.303457129743798*t13)^2+(-2.48532903781461*r1__2_1+30.87212696684*r1__2_2+18.958371709801*r1__2_3+.81200836636144*t12-.197547504455846+1.09088742838705*r1__1_1-13.550726959431*r1__1_2-8.32141299910563*r1__1_3-.356415470592923*t11+.48989466626242*r1__3_1-6.08534729180524*r1__3_2-3.73697206129778*r1__3_3-.160058713114523*t13)^2+(-2.6436153220831*r1__3_1+32.8383190443191*r1__3_2+20.1657974352703*r1__3_3+.863723767113888*t13+.0651743072009662+.928796854295815*r1__1_1-11.5372789582423*r1__1_2-7.08496772054044*r1__1_3-.303457129759512*t11+.48989466615819*r1__2_1-6.08534729103406*r1__2_2-3.73697206192339*r1__2_3-.160058713130091*t12)^2+(-3.0453012837136*r1__1_1+28.3453761824993*r1__1_2+20.6329645159026*r1__1_3+.803383631995274*t11+1.1433809887851+.588739190174359*r1__2_1-5.47992867285244*r1__2_2-3.98891068120136*r1__2_3-.15531580779083*t12+1.38673265028867*r1__3_1-12.9075762854695*r1__3_2-9.39559107531887*r1__3_3-.365835170130537*t13)^2+(-3.32552348095664*r1__2_1+30.9536578751004*r1__2_2+22.5315663656812*r1__2_3+.877309298336102*t12-1.987216561269+.588739190114314*r1__1_1-5.47992866961904*r1__1_2-3.98891068053918*r1__1_3-.155315807786897*t11+1.09544034380124*r1__3_1-10.1962550610257*r1__3_2-7.42198542424216*r1__3_3-.28898908845837*t13)^2+(-1.21036350562772*r1__3_1+11.2659489790199*r1__3_2+8.20062940888435*r1__3_3+.319307069650757*t13+.229170772052734+1.38673265024704*r1__1_1-12.9075762829888*r1__1_2-9.39559107412026*r1__1_3-.365835170095885*t11+1.09544034388008*r1__2_1-10.1962550650824*r1__2_2-7.4219854245274*r1__2_3-.288989088438315*t12)^2+(-5.95351974815554*r1__1_1+36.6994162407641*r1__1_2+25.4290813546269*r1__1_3+.974842575637377*t11-2.63695732507178+.0862138869060729*r1__2_1-.531450210031119*r1__2_2-.368242659171055*r1__2_3-.0141168537454004*t12+.952506399264142*r1__3_1-5.87155670816424*r1__3_2-4.06841057826005*r1__3_3-.155965518005519*t13)^2+(-6.05878205069695*r1__2_1+37.3482870296174*r1__2_2+25.8786849115508*r1__2_3+.992078459354551*t12-1.33152058265882+.0862138869007144*r1__1_1-.531450210081823*r1__1_2-.368242659219069*r1__1_3-.0141168537421636*t11+.534490070726969*r1__3_1-3.29476921378019*r1__3_2-2.28295060211721*r1__3_3-.087518593905657*t13)^2+(-.202018537282116*r1__3_1+1.24530743607334*r1__3_2+.862875410606218*r1__3_3+.0330789650607677*t13+.545863834860738+.952506399246256*r1__1_1-5.87155670833708*r1__1_2-4.06841057735347*r1__1_3-.155965517969505*t11+.534490070750153*r1__2_1-3.29476921356283*r1__2_2-2.28295060131082*r1__2_3-.0875185939055155*t12)^2+(-6.07959771459677*r1__1_1+30.9674242426801*r1__1_2+22.3705097998352*r1__1_3+.857873368534317*t11-1.76471733145788+1.65075563468967*r1__2_1-8.40839352379239*r1__2_2-6.07412642093546*r1__2_3-.232933059628316*t12+1.84351225448619*r1__3_1-9.39023086096381*r1__3_2-6.78339437706986*r1__3_3-.260132354459928*t13)^2+(-4.38138073503315*r1__2_1+22.3172786035824*r1__2_2+16.1217444412232*r1__2_3+.618243184218713*t12-.923385301124302+1.65075563490521*r1__1_1-8.40839352323243*r1__1_2-6.07412642020582*r1__1_3-.232933059620808*t11+3.02135458680454*r1__3_1-15.3897632163199*r1__3_2-11.1173872944915*r1__3_3-.426334069877298*t13)^2+(-3.71266987086301*r1__3_1+18.9110905602843*r1__3_2+13.6611535221535*r1__3_3+.523883447195053*t13+1.79101248019951+1.84351225469879*r1__1_1-9.39023085830571*r1__1_2-6.78339437737683*r1__1_3-.260132354453603*t11+3.02135458675847*r1__2_1-15.3897632129884*r1__2_2-11.1173872963301*r1__2_3-.426334069880672*t12)^2+(-3.90011435645636*r1__1_1+33.4181858543797*r1__1_2+19.9362529914774*r1__1_3+.790634768245585*t11-3.40601893140435+1.48764430833506*r1__2_1-12.7469016125627*r1__2_2-7.60440607186657*r1__2_3-.301576621987651*t12+1.34716650703029*r1__3_1-11.5432155550731*r1__3_2-6.88632430891628*r1__3_3-.273098832924476*t13)^2+(-2.79003782913976*r1__2_1+23.9064791937414*r1__2_2+14.261863864387*r1__2_3+.565599033947199*t12+2.94191879923881+1.48764430859128*r1__1_1-12.7469016146313*r1__1_2-7.6044060696602*r1__1_3-.301576621995954*t11+1.94050330636006*r1__3_1-16.6272304379243*r1__3_2-9.91928987276943*r1__3_3-.393380614413616*t13)^2+(-3.17562785143546*r1__3_1+27.2104128357136*r1__3_2+16.2328881834776*r1__3_3+.643766197822571*t13-.637542053291817+1.34716650724399*r1__1_1-11.5432155571023*r1__1_2-6.88632430841617*r1__1_3-.273098832949826*t11+1.94050330633365*r1__2_1-16.627230438149*r1__2_2-9.91928987492707*r1__2_3-.3933806144393*t12)^2+(-2.01324057094153*r1__1_1+40.4637240018238*r1__1_2+19.1624249532275*r1__1_3+.995107416713897*t11+1.84529512341763+.0539908034671229*r1__2_1-1.08515047907221*r1__2_2-.513895226737029*r1__2_3-.0266866512328603*t12+.130433143363034*r1__3_1-2.62154994723571*r1__3_2-1.24148865078056*r1__3_3-.0644706798567015*t13)^2+(-1.72864549456945*r1__2_1+34.7437038570169*r1__2_2+16.453592301917*r1__2_3+.854437357037078*t12+1.26622268071142+.0539908034660728*r1__1_1-1.08515047910239*r1__1_2-.513895226549678*r1__1_3-.026686651233501*t11+.711449065385413*r1__3_1-14.2992740321447*r1__3_2-6.77171397936849*r1__3_3-.351656057242671*t13)^2+(-.304391827618365*r1__3_1+6.11791114030412*r1__3_2+2.89726208101195*r1__3_3+.150455226223174*t13-.664170181540941+.130433143328345*r1__1_1-2.62154994715954*r1__1_2-1.24148865060744*r1__1_3-.0644706798534696*t11+.711449065210039*r1__2_1-14.2992740313315*r1__2_2-6.77171398089296*r1__2_3-.3516560572166*t12)^2+(-.554028798262323*r1__1_1+16.4352774899688*r1__1_2+12.212735424138*r1__1_3+.451248010725026*t11+1.80668680530669+.561213036138882*r1__2_1-16.6483980707805*r1__2_2-12.3711011963105*r1__2_3-.457099462951262*t12+.241478758779813*r1__3_1-7.16347312712678*r1__3_2-5.32303772144054*r1__3_3-.19668076798868*t13)^2+(-.760290795908938*r1__2_1+22.5540445569422*r1__2_2+16.7594723669968*r1__2_3+.619245263577858*t12-.547959274703874+.561213036185506*r1__1_1-16.6483980712546*r1__1_2-12.3711011949445*r1__1_3-.457099462966984*t11+.201146990103896*r1__3_1-5.96703024933782*r1__3_2-4.43398426133857*r1__3_3-.163831157208818*t13)^2+(-1.14122053061752*r1__3_1+33.854334200315*r1__3_2+25.1564980835807*r1__3_3+.929506725704928*t13-3.76727778582615+.241478758813686*r1__1_1-7.16347312565607*r1__1_2-5.32303772203581*r1__1_3-.196680768005511*t11+.201146990115401*r1__2_1-5.96703024794285*r1__2_2-4.43398426232404*r1__2_3-.163831157217202*t12)^2+(-4.02477735374144*r1__1_1+27.7950101802505*r1__1_2+21.425586834354*r1__1_3+.78027956702849*t11+.221994737480659+1.24285496385638*r1__2_1-8.5831248120031*r1__2_2-6.61624099843662*r1__2_3-.24095105086973*t12+1.73688577463857*r1__3_1-11.9948890468077*r1__3_2-9.24617530570086*r1__3_3-.336728310946364*t13)^2+(-3.7951756300308*r1__2_1+26.2093865067395*r1__2_2+20.2033200543809*r1__2_3+.735766910103154*t12-.764444377219279+1.2428549639263*r1__1_1-8.58312481092265*r1__1_2-6.61624100152625*r1__1_3-.240951050879308*t11+1.90471339873406*r1__3_1-13.1539023563811*r1__3_2-10.1395925103233*r1__3_3-.369264884863308*t13)^2+(-2.49629140831476*r1__3_1+17.2393250571566*r1__3_2+13.2888116882479*r1__3_3+.483953522844612*t13+.402154769245324+1.73688577506273*r1__1_1-11.9948890436773*r1__1_2-9.24617530885054*r1__1_3-.336728310949967*t11+1.90471339909204*r1__2_1-13.153902354604*r1__2_2-10.1395925090424*r1__2_3-.36926488485258*t12)^2+(r1__1_1^2+r1__1_2^2+r1__1_3^2-1)*b1__1_1+(r1__1_1*r1__2_1+r1__1_2*r1__2_2+r1__1_3*r1__2_3)*b1__1_2+(r1__2_1^2+r1__2_2^2+r1__2_3^2-1)*b1__2_2+(r1__1_1*r1__3_1+r1__1_2*r1__3_2+r1__1_3*r1__3_3)*b1__1_3+(r1__2_1*r1__3_1+r1__2_2*r1__3_2+r1__2_3*r1__3_3)*b1__2_3+(r1__3_1^2+r1__3_2^2+r1__3_3^2-1)*b1__3_3;
diff_t11:=diff(h,t11);
diff_t12:=diff(h,t12);
diff_t13:=diff(h,t13);
diff_r1__1_1:=diff(h,r1__1_1);
diff_r1__2_1:=diff(h,r1__2_1);
diff_r1__3_1:=diff(h,r1__3_1);
diff_r1__1_2:=diff(h,r1__1_2);
diff_r1__2_2:=diff(h,r1__2_2);
diff_r1__3_2:=diff(h,r1__3_2);
diff_r1__1_3:=diff(h,r1__1_3);
diff_r1__2_3:=diff(h,r1__2_3);
diff_r1__3_3:=diff(h,r1__3_3);
with(Groebner):
with(RealDomain):
sols:=fsolve({g1_1_1,g1_1_2,g1_1_3,g1_2_2,g1_2_3,g1_3_3,diff_t11,diff_t12,diff_t13,diff_r1__1_1,diff_r1__1_2,diff_r1__1_3,diff_r1__2_1,diff_r1__2_2,diff_r1__2_3,diff_r1__3_1,diff_r1__3_2,diff_r1__3_3},{ t11, t12, t13, r1__1_1, r1__1_2, r1__1_3, r1__2_1, r1__2_2, r1__2_3, r1__3_1, r1__3_2, r1__3_3, b1__1_1, b1__1_2, b1__1_3, b1__2_2, b1__2_3, b1__3_3} );
with(Groebner):
with(RealDomain):
sols:=fsolve({g1_1_1,g1_1_2,g1_1_3,g1_2_2,g1_2_3,g1_3_3,diff_t11,diff_t12,diff_t13,diff_r1__1_1,diff_r1__1_2,diff_r1__1_3,diff_r1__2_1,diff_r1__2_2,diff_r1__2_3,diff_r1__3_1,diff_r1__3_2,diff_r1__3_3},{ t11=0.184015, t12=0.087459, t13=0.308915, r1__1_1=0.230878, r1__1_2=0.909187, r1__1_3=0.936884, r1__2_1=0.031879, r1__2_2=0.593647, r1__2_3=0.043818, r1__3_1=0.424903, r1__3_2=0.521581, r1__3_3=0.840339, b1__1_1=0.625030, b1__1_2=0.255205, b1__1_3=0.904691, b1__2_2=0.767301, b1__2_3=0.562666, b1__3_3=0.897154}, avoid={{b1__1_1 = -32.51343311, b1__1_2 = 43.92451284, b1__1_3 = 22.91611840, b1__2_2 = -6.848329887, b1__2_3 = 16.30411571, b1__3_3 = -13.09739229, r1__1_1 = .5873876993, r1__1_2 = -.8092603402, r1__1_3 = -.8566942425e-2, r1__2_1 = .2869971672e-1, r1__2_2 = .1024997381e-1, r1__2_3 = .9995355243, r1__3_1 = -.8087966474, r1__3_2 = -.5873607408, r1__3_3 = .2924625105e-1, t11 = 36.59195193, t12 = -22.18329766, t13 = 22.31332161}} );

Consider the following anticommutators:

with(Physics):
Simplify(AntiCommutator(Dgamma[1],Dgamma[1])),
Simplify(AntiCommutator(Dgamma[1],Dgamma[2]));

Being basic Clifford algebra, I wonder why Physics does not know that the second one should simplify to zero.

PS: Just to be sure, I have updated to Maple 2017.3 today.

Hello, I am looking to understand in more depth how the function isprime(n) works. After reading Section 6.2.4 'Other Primality Tests' of Padro's Introduction to Cryptography with maple, I understand that it performs some prior trial divisions before a Miller-Rabin test (of which it calls GMP) and then a Lucas test.

 I have also seen the post on these forums:

 https://www.mapleprimes.com/questions/204087-Maple-Specialprimes 

to see the result of showstat(isprime), which verifies my summary as above. I am curious as to what exact function is being called upon from gmp by gmp_isprime(n). Since there is no obvious analog function found in GMP, and the popular mpz_probab_prime_p() takes a second argument, which is not given here. I found the documentation gives a download of the GMP code used here:

https://www.maplesoft.com/support/downloads/GMP.html

I pose two questions, the first:

  1. Since I do not own Maple 2017, is the result of showstat(isprime) the same as that given above in Maple18? COuld someone be so kind as to post a raw output of this below?
  2. What function for primality test is being called upon in GMP, I am very familiar with GMP and the only test that can be called without a value of 'reps' (or rounds of MR) is found in demos/isprime.c in the GMP download maple gives, which uses mpz_probab_prime_p(n,25), i.e 25 rounds of Miller Rabin, but seems unlikely to just be used, as it is a demo.

Thanks,

Jake

Dear All,

I'm stuck in a question, perhaps somebody can help. I have to solve the following equation: 

restart;
with(LinearAlgebra);
A := Matrix(3, 3, [[1, 3, 2], [4, 5, 1], [3, 7, 2]]);
      
M := IdentityMatrix(3);
   
eq := A^2*a+A*b+M*c;
K:= A^-2
Set := {seq(eq[i] = K[i], i = 1 .. nops(eq))};

 

But now I want to solve for a, b and c. I tried this with the solve function, but I gives an error. What do I have to do now?

Math


                            

 

Hello,

I'm trying to find the way to manipulate matrix equalities easily and isolate them as variables like if they were simple real variables but keeping the matrix properties.  However, I couldn't find the way to do it efficiently without describing all the parameters of the matrices.  I'd like to keep them as variables rather than perform matrix operations when defining the expressions. I've attached a snapshot which describes my problem much better:pdf_kmaple.pdf.

For instance, I'd like to be able to isolate the expression that defines the state-space when I change the discretization method.  

I'm wondering if there's a generic way I can use to isolate other matrix systems as well.

Thank you very much for your help!

JMarc

Hello,

I work in maple  2017,but the "interface "command seems doesn't work. But it works in the old version(maple 18). Does anyone know what problem with it?

First 24 25 26 27 28 29 30 Last Page 26 of 40