Kitonum

21550 Reputation

26 Badges

17 years, 125 days

MaplePrimes Activity


These are answers submitted by Kitonum

plots[polarplot](1/(theta-(1/3)*Pi), theta = 1.5 .. 8);

 

 

 

Edited: this is a spiral. The range for the theta should be taken such that  theta-alpha<>0

 

The simplest way to make the bolding (input or output, or all together) is to select the desired thing by the mouse and press  .

Addition: if you want to make the bolding throughout the worksheet, then instead of a mouse,  first select all in edit menu.

collect(algsubs(1/(T[1]*V[2])=U, B), U);

 

 

 

Only in standard interface:

 

plots[polarplot]((1/6)*Pi, r = 0 .. 3, ordering = [angular, radial]);

 

 

More short code:

L:=select(t->`*`(op(t))<>0 and nops(convert(t, set))=9, [seq(seq(seq([x, y, z, 1+x, 2+y, -3+z,-2+x, 3+y, -1+z ], z=1..9), y=1..9), x=1..9)]);

nops(L);

map(t->{a=t[1..3], b=t[4..6], c=t[7..9]}, L);

 

 

 

1) In Maple  e^x  should be coded as  exp(x)

2) I think that in the general case, your problem can be solved only numerically.

 

Example:

G1 := (lambda, k, t) -> Int(exp((lambda - k)*s - exp(- k*s)), s = -infinity .. t);

evalf(G1(4, -3, 10));

 

 

eqs:=diff(Th(z, t), t) = 7.1428*(diff(Th(z, t), z))-1397941.885*(279-Tw(z, t))-0.2160487e-1*(diff(Th(z, t), z, z)),

diff(Tc(z, t), t) = -7.1428*(diff(Tc(z, t), z))+1298990.852*(Tw(z, t)-291)+0.189366e-1*(diff(Tc(z, t), z, z)), 

diff(Tw(z, t), t) = 3.3024901*(Th(z, t)-2*Tw(z, t)+Tc(z, t))+8.0029*10^(-4)*(diff(Tw(z, t), z, z)): 

bc:=Th(z, 0) = 296, (D[1](Th))(0, t) = 0, Th(1, t) = 296, 

Tc(z, 0) = 275, (D[1](Tc))(1, t) = 0, Tc(0, t) = 275,

Tw(z, 0) = 0, (D[1](Tw))(1, t) = 0,Tw(0, t) = 0: 

sol:=pdsolve({eqs},{bc}, numeric):

 

Using the resulting  module  sol , you can plot functions one or two variables.

Examples:

p1:=sol:-plot(Th(z,t), t=0..1, z=0.1, numpoints=1000):

p2:=sol:-plot(Th(z,t), z=0..1, t=0.3, numpoints=1000):

p3:=sol:-plot3d(Th(z,t), z=0..1, t=0..1, numpoints=5000):

plots[display](p1, axes=normal);

plots[display](p2, axes=normal);

plots[display](p3, axes=normal);

 

Rit, replace the last two lines of your code by the lines

f := subs([seq(originvarslist[i] = varslistm[i], i = 1 .. nops(originvarslist))], f);

f := subs([seq(varslistm[i] = varslist[i], i = 1 .. nops(originvarslist))], f);

 

Certainly Acer's ways are much shorter.

``(16)/``(4);

expand(%);

 

or

 

`16`/`4`;

parse(numer(%))/parse(denom(%));

Your equation with initial conditions has no solution, because at  x = 0  the left side of the equation is non-negative, and the right side is negative.

shift:=proc(n, L)

if n=1 then return [L[2],L[3],L[1]] elif

n=2 then return [L[3],L[1],L[2]] elif

n=3 then L fi;

end proc:

 

Examples of use:

shift(1, [a,b,c]),  shift(2, [a,b,c]),  shift(3, [a,b,c]);

                     [b, c, a], [c, a, b], [a, b, c]

 

I reduced the range of integration over the variable  y , otherwise under the sign of the square root  a negative number is.

evalf(Int((1-exp(-5.5/cos(x)))*sin(x), [x = 0 .. arctan(300*cos(y)+sqrt(12.25-90000*sin(y)^2)), y = 0 .. arcsin(7/600)], method = _Gquad));

                                                             0.01162184070

 

See help on  evalf/Int  

Example:

plots[display](plot(x^2, x = -1 .. 2, color = red, thickness = 2), plots[textplot]([1, 2, y = x^2], font = [TIMES, ROMAN, 18]));

 

 

I think that your system with the boundary conditions can be solved only numerically:

Digits:=20:

P:=phi(x):

Q:=psi(x):

 

eq1:=a11*diff(P,x,x,x,x)+a22*diff(P,x,x)+a33*P+a44*diff(Q,x,x)+a55*Q:

eq2:=a44*diff(P,x,x)+a55*P+a66*diff(Q,x,x)+a77*Q:

 

BV:={phi(a)=sigma1, phi(-a)=sigma1, D(phi)(a)=0, D(phi)(-a)=0, psi(a)=sigma2, psi(-a)=sigma2}:

 

a11:=6.36463*10^(-10):

a22:=-1.22734*10^(-9):

a33:=3.48604*10^(-10):

a44:=2.94881*10^(-11):

a55:=-5.24135*10^(-11):

a66:=-1.03829*10^(-9):

a77:=4.86344*10^(-10):

a:=1.62338:

sigma1:=1.93251*10^7:

sigma2:=9.99998*10^7:

 

sol:=dsolve({eq1, eq2, op(BV)}, numeric);

plots[odeplot](sol, [[x,phi(x)], [x,psi(x)]], x=-a..a, color=[red,blue], thickness=2);

 

 

Brian,  here is a  more programmatic solution that is written on the basis of your solution. This solution can easily be rewritten as a procedure that is suitable for the solution of any problem of this type.

restart:

 

with(combinat):

T:=[0.8, 0.7, 0.4]:

L:= [T[1]$3, T[2]$12,T[3]$15]:

P:=[seq(op(choose(L,m)), m=1..3)]: k:=0:

 

for i in P do

if `+`(op(i)) < 1.44

then k:=k+1; S[k]:=i; fi;

od:

S:=convert(S, list);

 

dcs:=add(x[i], i=1..nops(S));

 

for i to 3 do

eq[i]:=0:

for j to nops(S) do

for k in S[j] do

eq[i]:=eq[i]+`if`(k=T[i], x[j], 0);

od: od: od:

 

for i to 3 do

eq||i=eq[i];

od;

 

Optimization[LPSolve](dcs, [eq[1]=3, eq[2]=12, eq[3]=15], assume=[integer, nonnegative]);

 

 

First 224 225 226 227 228 229 230 Last Page 226 of 290