acer

26372 Reputation

29 Badges

16 years, 322 days

Social Networks and Content at Maplesoft.com

MaplePrimes Activity


These are answers submitted by acer

You could do it like this:

cond1 := 2<phi^2:
expr1 := 1.4<phi:

is(expr1) assuming cond1;

          false

`assuming`([is(expr1)], [cond1]);

          false

is(expr1) assuming cond1, phi>0;

           true

`assuming`([is(expr1)], [cond1, phi>0]);

           true

Above I show two calls to assuming with its infix syntax, as well as their alternate prefix (operator) forms which is sometimes more programmatically useful.

The comma-separated sequence of conditions is treated like a logical conjunction (ie. like a call to And). You may also be able to utilize And(...) , Or(...), etc.

You appear to be using Maple 2016.

You might try using the following syntax for the nested symbolic integration. This allows it to utilize the bounds on both eta__2 and zeta__2 while computing the inner intergation, and perform the full computation much more quickly.

You might need to experiment, to trying and check the accuracy.

NULL

restart

kernelopts(version);

`Maple 2016.2, X86 64 LINUX, Jan 13 2017, Build ID 1194701`

A := -Heaviside(zeta__2+1.000000000000)*Heaviside(eta__2+.1619291800251-3.018371923484*10^11*sqrt(4.000000000000*10^24-zeta__2^2))+Heaviside(zeta__2+1.000000000000)*Heaviside(eta__2+.7243706106403+1.382194833711*10^11*sqrt(1.562500000000*10^24-zeta__2^2))-Heaviside(zeta__2+1.000000000000)*Heaviside(eta__2-.4637698986762-2.327456686822*10^11*sqrt(2.777777777778*10^24-zeta__2^2))+Heaviside(zeta__2+1.000000000000)*Heaviside(eta__2+.1619291800251+3.018371923484*10^11*sqrt(4.000000000000*10^24-zeta__2^2))+Heaviside(zeta__2+1.000000000000)*Heaviside(eta__2-.4637698986762+2.327456686822*10^11*sqrt(2.777777777778*10^24-zeta__2^2))-Heaviside(zeta__2+1.000000000000)*Heaviside(eta__2-.9031048925918-8.123652892875*10^10*sqrt(1.562500000000*10^24-zeta__2^2))+Heaviside(zeta__2+1.000000000000)*Heaviside(eta__2-.9031048925918+8.123652892875*10^10*sqrt(1.562500000000*10^24-zeta__2^2))+Heaviside(zeta__2-.6429162216568)*Heaviside(eta__2+.5050000000000-10.98537767108*sqrt(492.5151416233-zeta__2^2))-Heaviside(zeta__2-.6429162216568)*Heaviside(eta__2+.5050000000000+10.98537767108*sqrt(492.5151416233-zeta__2^2))+Heaviside(zeta__2-1.000000000000)*Heaviside(eta__2+.9875792458758-3.881485663812*10^9*sqrt(9.765625000000*10^22-zeta__2^2))+Heaviside(zeta__2-.9999999999936)*Heaviside(eta__2+.9875792458758+3.881485663812*10^9*sqrt(9.765625000000*10^22-zeta__2^2))-Heaviside(zeta__2-.9999999999936)*Heaviside(eta__2+.9875792458758-3.881485663812*10^9*sqrt(9.765625000000*10^22-zeta__2^2))+Heaviside(zeta__2-.6466146460206)*Heaviside(eta__2-.5050000000000+8.127372424924*sqrt(269.5813999936-zeta__2^2))-Heaviside(zeta__2-.7684252323012)*Heaviside(eta__2-.5050000000000+8.127372424924*sqrt(269.5813999936-zeta__2^2))-Heaviside(zeta__2-.6466146460206)*Heaviside(eta__2-.5050000000000-8.127372424924*sqrt(269.5813999936-zeta__2^2))+Heaviside(zeta__2-.7684252323012)*Heaviside(eta__2-.5050000000000-8.127372424924*sqrt(269.5813999936-zeta__2^2))+Heaviside(zeta__2-.5527964251744)*Heaviside(eta__2+.5050000000000+10.98537767108*sqrt(492.5151416233-zeta__2^2))-Heaviside(zeta__2-.5527964251744)*Heaviside(eta__2+.5050000000000-10.98537767108*sqrt(492.5151416233-zeta__2^2))-Heaviside(zeta__2+1.000000000000)*Heaviside(eta__2+.7243706106403-1.382194833711*10^11*sqrt(1.562500000000*10^24-zeta__2^2))+Heaviside(zeta__2+1.000000000000)*Heaviside(eta__2+.9842650870048+1.085166413462*10^10*sqrt(4.756242568371*10^23-zeta__2^2))-Heaviside(zeta__2+1.000000000000)*Heaviside(eta__2+.9842650870048-1.085166413462*10^10*sqrt(4.756242568371*10^23-zeta__2^2))-Heaviside(zeta__2+.9999999999984)*Heaviside(eta__2-.9031048925918+8.123652892875*10^10*sqrt(1.562500000000*10^24-zeta__2^2))+Heaviside(zeta__2+.9999999999984)*Heaviside(eta__2-.9031048925918-8.123652892875*10^10*sqrt(1.562500000000*10^24-zeta__2^2))-Heaviside(zeta__2+.9999999999984)*Heaviside(eta__2+.7243706106403+1.382194833711*10^11*sqrt(1.562500000000*10^24-zeta__2^2))+Heaviside(zeta__2+.9999999999984)*Heaviside(eta__2+.7243706106403-1.382194833711*10^11*sqrt(1.562500000000*10^24-zeta__2^2))-Heaviside(zeta__2+.9999999999988)*Heaviside(eta__2-.4637698986762+2.327456686822*10^11*sqrt(2.777777777778*10^24-zeta__2^2))+Heaviside(zeta__2+.9999999999988)*Heaviside(eta__2-.4637698986762-2.327456686822*10^11*sqrt(2.777777777778*10^24-zeta__2^2))-Heaviside(zeta__2+.9999999999990)*Heaviside(eta__2+.1619291800251+3.018371923484*10^11*sqrt(4.000000000000*10^24-zeta__2^2))+Heaviside(zeta__2+.9999999999990)*Heaviside(eta__2+.1619291800251-3.018371923484*10^11*sqrt(4.000000000000*10^24-zeta__2^2))-Heaviside(zeta__2+.9999999999972)*Heaviside(eta__2+.9842650870048+1.085166413462*10^10*sqrt(4.756242568371*10^23-zeta__2^2))+Heaviside(zeta__2+.9999999999972)*Heaviside(eta__2+.9842650870048-1.085166413462*10^10*sqrt(4.756242568371*10^23-zeta__2^2))+Heaviside(zeta__2-.9999999999796)*Heaviside(eta__2-.8341191288491+1.298592148442*10^10*sqrt(9.706617486471*10^21-zeta__2^2))-Heaviside(zeta__2-.9999999999796)*Heaviside(eta__2-.8341191288491-1.298592148442*10^10*sqrt(9.706617486471*10^21-zeta__2^2))-Heaviside(zeta__2-1.000000000000)*Heaviside(eta__2-.8341191288491+1.298592148442*10^10*sqrt(9.706617486471*10^21-zeta__2^2))+Heaviside(zeta__2-1.000000000000)*Heaviside(eta__2-.8341191288491-1.298592148442*10^10*sqrt(9.706617486471*10^21-zeta__2^2))-Heaviside(zeta__2-1.000000000000)*Heaviside(eta__2+.9875792458758+3.881485663812*10^9*sqrt(9.765625000000*10^22-zeta__2^2)):

Digits := 22:

forget(`evalf/int`);

memory used=75.03MiB, alloc change=36.05MiB, cpu time=662.00ms, real time=662.00ms, gc time=45.53ms

.4238607655960000000000

forget(`evalf/int`);

memory used=7.27MiB, alloc change=0 bytes, cpu time=4.41s, real time=4.41s, gc time=0ns

.4238

 

NULL

Download romberg_ac.mw

The file you posted became corrupt in a plot substructure, located within several nested Sections.

I tried to make the maximal recovery, by closing off all XML elements (and removing some errant duplication of preamble...). This recovered much more than did the Maple 2021.2 GUI itself.

EchoModel_V3_ac.zip

You may want to consider manually backing up copies of snapshots of your work on a regular basis, so as to reduce the amount that could be lost.

note. Btw, that routine DeleteBadCharacters isn't going solve this corruption example. The outstanding problem here is the poor job of recovery that the GUI does in salvaging the XML.

T := [[1, 2], [3, 4]]:

subsindets(T,list,convert,set);

        {{1, 2}, {3, 4}}

That single command should also work for deeper nesting.

The Help page for Topic convert,set explains that option nested=true/false is, "...only relevant if the input expr is an rtable (Matrix, Array, or Vector) or array, matrix, or vector." That's not your situation.

The name D is already defined in Maple as a top-level command. It's also an export of the VectorCalculus package. So if you insist on using the name D as the name of a parameter then you could declare it local at the top-level, as well as not load the whole VectorCalculus package.

The following may provide some insight into your problem. I can't tell whether you want a formula in terms of D (for any given Sr,y values), or a maximum involving a best D in that range.

restart

_local(D)

with(Optimization); with(Student:-VectorCalculus, Hessian)

assume(-1 < Pr and Pr < 1); SU := (sum(D*Pr^n, n = 0 .. infinity))*t1

t1 := y/Pp; Def := simplify(-D*t1+SU)

MI := y*(1-D/Pp); UI := MI-Def

TI := Pr*UI+Def = y*Pr

N >= D*t1; C1 := -Pr*y+y >= D*t1; t2 := UI/x; T := y*(1-Pr)/D; t3 := T-t1

C2 := factor(t2 < t3)

EC := Ec*Ep*y*delta/Pp

PSC := Sc

PC := Cm*y

SCP := Cs*SU

SCAP := Csc*UI

HC := (Ch+Ces)*(y^2*(1-D/Pp-Pr)^2/(2*D)+y^2*(1-D/Pp)/(2*Pp)+y*Pr*t2)

CE := Ce*y

GI := Ig*y

TC := proc (y, Sr) options operator, arrow; PSC+PC+SCP+SCAP+HC+CE+GI+EC end proc; TC(y, Sr)

TR := proc (y, Sr) options operator, arrow; Sr*y*(1-Pr)+v*y*Pr end proc

TP := proc (y, Sr) options operator, arrow; TR(y, Sr)-TC(y, Sr) end proc; TP(y, Sr)

ETP := proc (y, Sr) options operator, arrow; Sr*y*(1-E(Pr))+v*y*E(Pr)-(Cm+Ce)*y-Sc+E(1/(1-Pr))*Cs*D*y/Pp-Csc*(y*(1-D/Pp)+D*y*E(Pr/(1-Pr))/Pp)-(Ch+Ces)*((1/2)*y^2*(1-D/Pp-E(Pr))^2/D+(1/2)*y^2*(1-D/Pp)/Pp+y^2*E(Pr)*(1-D/Pp+D*E(Pr/(1-Pr))/Pp)/x)-Ig*y-Ec*Ep*y*delta/Pp end proc; ETP(Y, Sr)

Ex := proc (T) options operator, arrow; y*(1-E(Pr))/D end proc

ETPU := proc (y, Sr) options operator, arrow; ETP(y, Sr)/Ex(T) end proc

PP := ETPU(y, Sr)

diff(ETPU(y, Sr), y) = 0

isolate(%, y)

simplify(diff(ETPU(y, Sr), y, y))

H := Hessian(ETPU(y, Sr), [y, Sr])

TOTP := proc (Sr, y) options operator, arrow; subs([Pp = 1600, delta = 8760, Cm = 104, x = 175200, Ep = 1.5, Rc = 8, v = 80, Ec = .5, Cs = .5, Csc = .6, Sc = 1500, Ch = 20, Er = 2, Rp = 100, Ec = .5, a = 100, b = 2.5, Ig = 80, Ch1 = 22, Ce = 6, Ces = 4, E(Pr) = 0.5e-1, E(1/(1-Pr)) = 1.0536, E(Pr/(1-Pr)) = 0.536e-1], ETPU(y, Sr)) end proc

TOTP := unapply(collect(subs(convert([Pp = 1600, delta = 8760, Cm = 104, x = 175200, Ep = 1.5, Rc = 8, v = 80, Ec = 0.5, Cs = 0.5, Csc = 0.6, Sc = 1500, Ch = 20, Er = 2, Rp = 100, Ec = 0.5, a = 100, b = 2.5, Ig = 80, Ch1 = 22, Ce = 6, Ces = 4, E(Pr) = 0.05, E(1/(1 - Pr)) = 1.0536, E(Pr/(1 - Pr)) = 0.0536],rational,exact), ETPU(y, Sr)),D,simplify), [Sr,y]);

proc (Sr, y) options operator, arrow; (13683/19000000+(1183/277400000000)*y)*D^2+(1/277400)*(-438000000+1969*y^2+(277400*Sr-55686225)*y)*D/y-(57/5)*y end proc

TOTP(Sr, y)

(13683/19000000+(1183/277400000000)*y)*D^2+(1/277400)*(-438000000+1969*y^2+(277400*Sr-55686225)*y)*D/y-(57/5)*y

 

maximize(TOTP(Sr, y), y = 200 .. 400, Sr = 200 .. 400, D = 300 .. 2000, location);
evalf[15](%);

547343930/1387, {[{D = 2000, Sr = 400, y = 400}, 547343930/1387]}

394624.318673396, {[{D = 2000., Sr = 400., y = 400.}, 394624.318673396]}

Maximize(TOTP(Sr, y), y = 200 .. 400, Sr = 200 .. 400, D = 300 .. 2000)

[394624.318673395843, [D = HFloat(2000.0), Sr = HFloat(400.0), y = HFloat(400.0)]]

temp1 := maximize(TOTP(Sr, y), y = 200 .. 400, Sr = 200 .. 400, location):
temp2 := simplify(temp1[1]) assuming D>=300, D<=2000;
maximize(temp2, D = 300 .. 2000, location);
evalf[15](%[2]);

 

max((40049/55480000)*D^2+(2198655/11096)*D-4560, (500021/693500000)*D^2+(2139103/11096)*D-2280)

547343930/1387, {[{D = 2000}, 547343930/1387]}

{[{D = 2000.}, 394624.318673396]}

simplify(VectorCalculus:-Hessian(ETPU(y, Sr), [y, Sr]));

Matrix(2, 2, {(1, 1) = 2*D*Sc/(y^3*(-1+E(Pr))), (1, 2) = 0, (2, 1) = 0, (2, 2) = 0})

 

Download model_1_ac.mw

It works (for me) if re-executed, presumably because of some fortuitous memoization.

It also works (for me) if all methods are tried. That can then be sieved for successful results.

It also works in my Maple 2022.1 if only method=risch is forced. Naturally that approach may not be as generally useful for you.

The error seems to go back to Maple 2019, before which the integral may have returned unevaluated.

(I have submitted a bug report.)

restart;
int(x^5*(a+b*arctan(c*x^2))^2,x);
int(x^5*(a+b*arctan(c*x^2))^2,x);
 

Error, (in gcdex) invalid arguments

(1/6)*b*a*ln(c^2*x^4+1)/c^3-((1/6)*I)*b^2*dilog(1/2-((1/2)*I)*c*x^2)/c^3-((1/12)*I)*b^2*ln(1+I*c*x^2)*ln(1-I*c*x^2)/c^3-((1/24)*I)*b^2*ln(1+I*c*x^2)^2/c^3-((1/12)*I)*b^2*x^4*ln(1-I*c*x^2)/c+(1/12)*b^2*ln(1+I*c*x^2)*ln(1-I*c*x^2)*x^6-(1/6)*b*a*x^4/c-((17/108)*I)*b^2/c^3+((1/6)*I)*b*a*x^6*ln(1-I*c*x^2)-((1/6)*I)*b^2*ln(1/2+((1/2)*I)*c*x^2)*ln(1/2-((1/2)*I)*c*x^2)/c^3+((1/6)*I)*b^2*ln(1/2+((1/2)*I)*c*x^2)*ln(1-I*c*x^2)/c^3-((1/6)*I)*b*a*x^6*ln(1+I*c*x^2)+(1/6)*x^6*a^2-(1/24)*b^2*x^6*ln(1+I*c*x^2)^2+((1/24)*I)*b^2*ln(1-I*c*x^2)^2/c^3+((1/12)*I)*b^2*x^4*ln(1+I*c*x^2)/c-(1/24)*b^2*x^6*ln(1-I*c*x^2)^2+(1/6)*b^2*x^2/c^2-(1/6)*b^2*arctan(c*x^2)/c^3

restart;
rhs~(select(type,int(x^5*(a+b*arctan(c*x^2))^2,x,
                     'method'=':-_RETURNVERBOSE'),
            string=algebraic));

[(1/6)*b*a*ln(c^2*x^4+1)/c^3+(1/12)*b^2*ln(1+I*c*x^2)*ln(1-I*c*x^2)*x^6-(1/6)*b*a*x^4/c+((1/24)*I)*b^2*ln(1-I*c*x^2)^2/c^3-((17/108)*I)*b^2/c^3-((1/6)*I)*b^2*dilog(1/2-((1/2)*I)*c*x^2)/c^3-((1/12)*I)*b^2*x^4*ln(1-I*c*x^2)/c+((1/6)*I)*b*a*x^6*ln(1-I*c*x^2)-((1/6)*I)*b^2*ln(1/2+((1/2)*I)*c*x^2)*ln(1/2-((1/2)*I)*c*x^2)/c^3+((1/6)*I)*b^2*ln(1/2+((1/2)*I)*c*x^2)*ln(1-I*c*x^2)/c^3-((1/12)*I)*b^2*ln(1+I*c*x^2)*ln(1-I*c*x^2)/c^3+((1/12)*I)*b^2*x^4*ln(1+I*c*x^2)/c-(1/24)*b^2*x^6*ln(1+I*c*x^2)^2-((1/6)*I)*b*a*x^6*ln(1+I*c*x^2)-(1/24)*b^2*x^6*ln(1-I*c*x^2)^2+(1/6)*b^2*x^2/c^2-(1/6)*b^2*arctan(c*x^2)/c^3-((1/24)*I)*b^2*ln(1+I*c*x^2)^2/c^3+(1/6)*x^6*a^2]

Download int_gcdex_wk.mw

This is not suggested as better than vv's approach.

But you may be interested in a couple of nudges that can help fix up your result (using some missing bits and pieces...).

restart;

RaiseIndex := proc(S::specfunc({sum,Sum}),k::integer)
  local svar:=lhs(op(2,S));
  op(0,S)(eval(op(1,S),svar=svar-k),
          svar=map(`+`,rhs(op(2,S)),k));
end proc:

 

U := rsolve({u(1) = x[1], u(n + 1) = u(n) + (x[n + 1] - u(n))/(n + 1)}, u(n));

(Sum(x[n1+1], n1 = 1 .. n-1)+x[1])/n

U2 := subsindets(U, specfunc(Sum), S->RaiseIndex(S,1));

(Sum(x[n1], n1 = 2 .. n)+x[1])/n

extra := x[1] = Sum(x[n1], n1=1..1);

x[1] = Sum(x[n1], n1 = 1 .. 1)

simplify(simplify(U2, {extra}));

(Sum(x[n1], n1 = 1 .. n))/n

Download sumbitsandpieces.mw

[note: I had this worksheet completed before I saw vv's Answer. I'm not really surprised how similar they are, taking natural approaches.]

The eq4 below (for c[2]) is not strictly necessary. It's just a rewriting of the eq1, by substituting the obtained solution for Z. I figured you might want two equations that did not have any c[2] or Z on their RHSs.

restart

kernelopts(version);

`Maple 17.02, X86 64 LINUX, Sep 5 2013, Build ID 872941`

(1)

eq1 := c[2] = Z^2/(2*(m+2));

c[2] = Z^2/(2*m+4)

(2)

eq2 := int((m*(c[2]-x^2/(2*(m+2))))^(1/m), x = 0 .. Z) = alpha

int((m*(c[2]-x^2/(2*m+4)))^(1/m), x = 0 .. Z) = alpha

(3)

assume(m >= 1);

temp := IntegrationTools:-Change(eval(eq2, eq1), s = x/Z, s);

(1/2)*m^(1/m)*(m+2)^(-1/m)*Z*((1/2)*Z^2)^(1/m)*GAMMA(1/m+1)*Pi^(1/2)/GAMMA(1/m+3/2) = alpha

(4)

eq3 := `assuming`([isolate(combine(temp), Z)], [Z > 0]);

Z = (alpha*GAMMA((1/2)*(2+3*m)/m)/(2^(-(1+m)/m)*m^(1/m)*(m+2)^(-1/m)*Pi^(1/2)*GAMMA((1+m)/m)))^(m/(m+2))

 

c[2] = ((alpha*GAMMA((1/2)*(2+3*m)/m)/(2^(-(1+m)/m)*m^(1/m)*(m+2)^(-1/m)*Pi^(1/2)*GAMMA((1+m)/m)))^(m/(m+2)))^2/(2*m+4)

(5)

 

 

Now a simple sanity check (numeric, and exact).

evalf(eval(eval(subs(int = Int, eq2), [eq3, eq4]), [m = 2, alpha = 6]));

6.000000000 = 6.

(6)

simplify(eval([eq3, eq4], [m = 2, alpha = 6]));

[Z = 4*3^(1/2)/Pi^(1/2), c[2] = 6/Pi]

 

true

(7)

eval(eval(eq2, [eq3, eq4]), [m = 2, alpha = 6]);

6 = 6

(8)

``

Download system_eqs_ac.mw

PDEtools:-Solve tries to simplify the RootOf that solve returns (when passed the numerator of the trig-expanded form of result), and generates RootOf(0).

Unfortunatelty,

result:=1/2*(Dirac(1,-t+4+k)+Dirac(1,t-4+k)-Dirac(1,-t+4+k)*cos(-t+4+k)
             +2*Dirac(-t+4+k)*sin(-t+4+k)+2*sin(t-4+k)*Dirac(t-4+k)
             -Dirac(1,t-4+k)*cos(t-4+k))/k:

result:=simplify(result):

denom(result);

             2 k

lprint(numer(result));
Dirac(1,-t+4+k)+Dirac(1,t-4+k)-Dirac(1,-t+4+k)*cos(-t+4+k)+2*Dirac(-t+4+k)*sin
(-t+4+k)+2*sin(t-4+k)*Dirac(t-4+k)-Dirac(1,t-4+k)*cos(t-4+k)

simplify(numer(result));

              0

Avoiding a clash with the default value of statevariable,

restart;

kernelopts(version);

`Maple 2022.1, X86 64 LINUX, May 26 2022, Build ID 1619613`

DynamicSystems:-SystemOptions('statevariable'=sv,
                              'continuoustimevar'=x):

ode:=diff(y(x),x$2)+y(x) = 0;

diff(diff(y(x), x), x)+y(x) = 0

DynamicSystems:-DiffEquation(ode,'outputvariable'=[y(x)]);

"module() ... end module"

Download DS_problem_ac.mw

Otherwise, this error message attains,

  restart;
  DynamicSystems:-SystemOptions('continuoustimevar'=x):
  Error, (in DynamicSystems:-SystemOptions) cannot assign x to
  continuoustimevar, already assigned to statevariable

It's not difficult to make a prodecure that will color and join arbitrary v and k.

The results of printf are usually left-justified. Do you really need left-justified output? Left-justification is also possible. But I won't be around for the next 5 days.

restart;

F := proc(v,k,C) uses Typesetting;
      mrow(mn(sprintf("%s]",v),mathcolor=C),
           mn(sprintf(" is %g",k),mathcolor="Blue"));
end proc:

F("1:1", 4, "Green");

"1:1] is 4"

F("2:2", 1/3., "Red");

"2:2] is 0.333333"

Download color_string.mw

If you use the command plots:-surfdata then you can easily add other (usual) plotting options.

For example, adding an option for orientation so that the X and Y values appear at the forefront.

restart

with(plots):

X := `<,>`(1740, 2200, 2710, 3200, 3700, 4033):

Y := `<,>`(0, 5, 10, 15, 20, 25, 30, 35, 40):

F(X, 0), F(X, 5), F(X, 10), F(X, 15), F(X, 20), F(X, 25), F(X, 30), F(X, 35), F(X, 40) := Vector(6, {(1) = 1.342, (2) = 1.427, (3) = 1.397, (4) = 1.329, (5) = 1.329, (6) = 1.518}), Vector(6, {(1) = 1.449, (2) = 1.382, (3) = 1.303, (4) = 1.362, (5) = 1.379, (6) = 1.397}), Vector(6, {(1) = 1.341, (2) = 1.348, (3) = 1.339, (4) = 1.456, (5) = 1.388, (6) = 1.555}), Vector(6, {(1) = 1.419, (2) = 1.413, (3) = 1.325, (4) = 1.32, (5) = 1.362, (6) = 1.42}), Vector(6, {(1) = 1.486, (2) = 1.336, (3) = 1.449, (4) = 1.382, (5) = 1.534, (6) = 1.665}), Vector(6, {(1) = 1.395, (2) = 1.37, (3) = 1.38, (4) = 1.365, (5) = 1.345, (6) = 1.507}), Vector(6, {(1) = 1.399, (2) = 1.333, (3) = 1.365, (4) = 1.429, (5) = 1.418, (6) = 1.613}), Vector(6, {(1) = 1.343, (2) = 1.331, (3) = 1.306, (4) = 1.375, (5) = 1.63, (6) = 1.692}), Vector(6, {(1) = 1.422, (2) = 1.421, (3) = 1.323, (4) = 1.31, (5) = 1.508, (6) = 1.57})

A := Array(1 .. numelems(X), 1 .. numelems(Y), 1 .. 3, proc (i, j, k) options operator, arrow; `if`(k = 1, X[i], `if`(k = 2, Y[j], F(X, Y[j])[i])) end proc, datatype = hfloat):

surfdata(A, orientation = [-142, 72, 0]);

 

Download curve_three_d_ac.mw

If you use Carl's PLOT3D(MESH(...)) suggestion then you might wrap that result in a call to plots:-display, to add such other options. Eg,

    plot:-display(PLOT3D(MESH(A)), orientation = [-142, 72, 0])

You are not succeeding in constructing the two sets (of scalars or scalar equations) because your indexing into Matrices EQ and V is faulty.

You wrote, "I have a set of equations gathered in a vector." But that is not true. Your EQ is a 4x1 Matrix, and your V is a 1x4 Matrix.

restart

EQ := Matrix(4, 1, {(1, 1) = 32.1640740637930*Tau[1]-0.172224519601111e-4*Tau[2]-0.270626540730518e-3*Tau[3]+0.1570620334e-9*P[1]+0.3715450960e-14*sin(t), (2, 1) = -0.172224519601111e-4*Tau[1]+32.1667045885952*Tau[2]+0.587369829416537e-4*Tau[3]-0.1589565489e-8*P[1]+0.1004220091e-12*sin(t), (3, 1) = -0.270626540730518e-3*Tau[1]+0.587369829416537e-4*Tau[2]+32.1816411689934*Tau[3]-0.7419658527e-8*P[1]+0.5201228088e-12*sin(t), (4, 1) = 0.1570620334e-9*Tau[1]-0.1589565489e-8*Tau[2]-0.7419658527e-8*Tau[3]+601.876235436204*P[1]})

V := Matrix(1, 4, {(1, 1) = Tau[1], (1, 2) = Tau[2], (1, 3) = Tau[3], (1, 4) = P[1]})

q := 0:

X := Matrix(4, 1, {(1, 1) = -0.1156532164e-15*sin(t), (2, 1) = -0.3121894613e-14*sin(t), (3, 1) = -0.1616209235e-13*sin(t), (4, 1) = -0.2074537757e-24*sin(t)})

t := 1:

Xf := fsolve({seq(EQ[r, 1], r = 1 .. 4)}, {seq(V[1, r] = q, r = 1 .. 4)});

{P[1] = -0.1745663328e-24, Tau[1] = -0.9731882592e-16, Tau[2] = -0.2626983734e-14, Tau[3] = -0.1359993176e-13}

{seq(EQ[r, 1], r = 1 .. 4)}

{0.1570620334e-9*Tau[1]-0.1589565489e-8*Tau[2]-0.7419658527e-8*Tau[3]+601.876235436204*P[1], -0.270626540730518e-3*Tau[1]+0.587369829416537e-4*Tau[2]+32.1816411689934*Tau[3]-0.7419658527e-8*P[1]+0.5201228088e-12*sin(1), -0.172224519601111e-4*Tau[1]+32.1667045885952*Tau[2]+0.587369829416537e-4*Tau[3]-0.1589565489e-8*P[1]+0.1004220091e-12*sin(1), 32.1640740637930*Tau[1]-0.172224519601111e-4*Tau[2]-0.270626540730518e-3*Tau[3]+0.1570620334e-9*P[1]+0.3715450960e-14*sin(1)}

{seq(V[1, r] = q, r = 1 .. 4)}

{P[1] = 0, Tau[1] = 0, Tau[2] = 0, Tau[3] = 0}

NULL

Download SoalNewton_ac.mw

restart;

Frac_C:=proc(expr,a,x,alpha)
  local ig,m,tau;
  m:=ceil(alpha);
  ig := (x-tau)^(m-alpha-1)*diff(eval(expr,x=tau),tau$m);
  `assuming`([1/GAMMA(m-alpha)*int(ig,tau=a..x)],[x>a]);
end proc:

Frac_C(x^(3.4),0,x,3/4);
evalf(%);

1.486084413*2^(1/2)*GAMMA(3/4)*x^(53/20)

2.575385653*x^(53/20)

fracdiff((x)^(3.4),x,3/4);

2.575385654*x^(53/20)

Frac_C(cos(x),0,x,1/2);

(cos(x)*FresnelS(x^(1/2)*2^(1/2)/Pi^(1/2))-sin(x)*FresnelC(x^(1/2)*2^(1/2)/Pi^(1/2)))*2^(1/2)

fracdiff(cos(x),x,1/2);

(cos(x)*FresnelS(x^(1/2)*2^(1/2)/Pi^(1/2))-sin(x)*FresnelC(x^(1/2)*2^(1/2)/Pi^(1/2)))*2^(1/2)

Download Frac_C.mw

You could declare gamma as local at the top-level, to avoid conflict with the predefined constant.

You could issue this command at the top of the worksheet.

_local(gamma)

sqrt(1+(cos(alpha(t))^2-1)*cos(gamma(t))^2)

(1+(cos(alpha(t))^2-1)*cos(gamma(t))^2)^(1/2)

simplify((1+(cos(alpha(t))^2-1)*cos(gamma(t))^2)^(1/2))

(cos(alpha(t))^2*cos(gamma(t))^2-cos(gamma(t))^2+1)^(1/2)

NULL

Download arg_removed_ac.mw

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