15242 Reputation

24 Badges

12 years, 81 days

MaplePrimes Activity

These are answers submitted by Kitonum

Done in Maple 14 Classic Worksheet.

A:=plottools[curve]([[1,-1], [1,1], [-1,1], [-1,-1], [1,-1]], style=line, thickness=5):

B:=plottools[circle]([0,0], 1, thickness=5):

A1:=plottools[homothety](A, sqrt(2)/2):

A2:=plottools[homothety](A, 1/2):

A3:=plottools[homothety](A2, sqrt(2)/2):

B1:=plottools[homothety](B, sqrt(2)/2):

B2:=plottools[homothety](B1, sqrt(2)/2):

U:=plots[display](A, A1, A2, A3, B, B1, B2):

C:=plot([1,-1], x=-1..1, filled=true, color=yellow, numpoints=10000):

C1:=plot([cos(t), sin(t), t=0..2*Pi], filled=true, color=white):

E:=plot([1/sqrt(2),-1/sqrt(2)], x=-1/sqrt(2)..1/sqrt(2), filled=true, color="DarkOrange", numpoints=10000):

E1:=plot([cos(t)/sqrt(2), sin(t)/sqrt(2), t=0..2*Pi], filled=true, color=white):

F:=plot([1/2,-1/2], x=-1/2..1/2, filled=true, color="HotPink", numpoints=10000):

F1:=plot([cos(t)/2, sin(t)/2, t=0..2*Pi], filled=true, color=white):

X:=plots[display](F1, F, E1, E, C1, C):

G:=plot([cos(t), sin(t), t=-Pi/4..Pi/4], filled=true, color=gold):

G1:=plottools[rotate](G, Pi/2):

G2:=plottools[rotate](G, Pi):

G3:=plottools[rotate](G, 3*Pi/2):

H:=plot([cos(t)/sqrt(2), sin(t)/sqrt(2), t=-Pi/4..Pi/4], filled=true, color="IndianRed"):

H1:=plottools[rotate](H, Pi/2):

H2:=plottools[rotate](H, Pi):

H3:=plottools[rotate](H, 3*Pi/2):

K:=plot([cos(t)/2, sin(t)/2, t=-Pi/4..Pi/4], filled=true, color="Crimson"):

K1:=plottools[rotate](K, Pi/2):

K2:=plottools[rotate](K, Pi):

K3:=plottools[rotate](K, 3*Pi/2):

Y:=plots[display](G, G1, G2, G3, H, H1, H2, H3, K, K1, K2, K3):

V:=plottools[polygon]([[sqrt(2)/4,sqrt(2)/4], [-sqrt(2)/4,sqrt(2)/4], [-sqrt(2)/4,-sqrt(2)/4], [sqrt(2)/4,-sqrt(2)/4]], color="DarkMagenta"):

plots[display](V, Y, X, U, axes=none);

The answer to the question b) is quite simple (the area of the yellow square is 8 ), as each next smaller square has an area of ​​two times less than the previous one.

To answer to the question a) it takes a bit of work.

S:= A*cos(m*x)*sin(n*z) + B*cos(k*z)*sin(q*x) + sin(s*z) + C*cos(p*z)+E*sin(t*z)^2: 


for i in [op(S)] do

if (nops(i)=1 and (is(op(0,i)=sin) or is(op(0,i)=cos))) or

(nops(i)=2 and (is(op([-1,0],i)=sin) or is(op([-1,0],i)=cos)) and

(type(op(1,i),constant) or type(op(1,i),symbol))) then

if nops(i)=1 then L:=[op(L), [1,i]] else L:=[op(L), [op(1, i),i]]: fi:




                                          [[1, sin(s*z)], [C, C*cos(p*z)]]

mean:=add(A[i], i=1..n)/n;
variance:=add((A[i]-mean)^2, i=1..n)/n;
                     mean := 3/2
variance := 7/4

Good question!

We will consider the integers from 0 to 10^23 -1. We assume that each of them is written by 23 digits (from 0 to 9). If the integer is less than 10 ^ 22, then write forward the required number of zeros.
Procedure   Total(N)  finds the total number of numbers in the specified range  0 .. 10^23 -1 , whose sum of the digits is equal to .


local L, i, j, k, l, m, n, a, b, M, s, S, T;

if N>207 then return 0 else


L:=[seq([i,0], i=0..54)]:

for i from 0 to 9 do

for j from 0 to 9 do

for k from 0 to 9 do

for l from 0 to 9 do

for m from 0 to 9 do

for n from 0 to 9 do


L:=subsop(a+1=[a,L[a+1,2]+1], L):

od: od: od: od: od: od:


M:=[seq([i,0], i=0..45)]:

for i from 0 to 9 do

for j from 0 to 9 do

for k from 0 to 9 do

for l from 0 to 9 do

for m from 0 to 9 do


M:=subsop(b+1=[b,M[b+1,2]+1], M):

od: od: od: od: od:



for i from 0 to 54 do

for j from 0 to 54 do

for k from 0 to 54 do

for m from 0 to 45 do

if i+j+k+m=N then s:=s+1; S[s]:=[i, j, k, m]; fi;

od: od: od: od:

S:=[seq(S[t], t=1..s)]:



for i in S do






end proc:

Solution of the initial problem:

add(Total(N), N=10..99);

add(Total(N), N=100..207);


I guess you consider the function of two variables as a scalar field in the plane and the stream lines - the curves in the plane, which at each point has a tangent vector, which coincides with the gradient. If so, then your problem can be solved as follows (psi=3):


C:=3: X:=[seq(i, i=0..1, 0.1)]:

Y:=[seq(solve(psi(X[i], y)=C), i=1..11)]:

V:=[seq(dsolve({diff(x(t), t)=subs(x=x(t), y=y(t), diff(psi(x,y), x)), diff(y(t), t)=subs(x=x(t), y=y(t), diff(psi(x,y), y)), x(0)=X[i], y(0)=Y[i]}), i=1..11)]:

Sol:=evalf(subs(_Z1=0, V));

plot([seq([rhs(Sol[i,1]), rhs(Sol[i,2]), t=0..3], i=1..11)], color=red, thickness=2, labels=[x, y], title="Stream lines for psi =3,  x = 0 .. 1", titlefont=[TIMES, ROMAN, 18], view=[0..2, 0..5+C] ); 


Maple does this automatically by  combine  command. But the inverse convertation of the sum to the product - it is a problem:

combine(cos(3*x)*cos(x) + sin(3*x)*sin(x));

L:=[f(-6)=2400, f(-4)=432, f(-3)=120, f(-2)=16, f(-1)=0, f(0)=0, f(1)=-8, f(2)=0]:
M:=[seq([op(lhs(L[i])), rhs(L[i])], i=1..nops(L))];
CurveFitting[PolynomialInterpolation](M, x);
           M := [[-6,2400], [-4,432], [-3,120], [-2,16], [-1,0], [0,0], [1,-8],[2,0]] 

I noted  the entries in lowercase instead of uppercase. Due to the associative law it can be counted easily:

A:=Matrix([[a, b], [c, d]]):
B:=Matrix([[0], [1]]):


To solve these problems, use Mathematica rather than Maple:

Reduce[{0 < 2*f[1], 5 < f[1] + f[2], 8 < f[1] + f[3], 
f[1] + f[4] == 7, 0 < 2*f[2], f[2] + f[3] == 6, 6 < f[2] + f[4],
0 < 2*f[3], 11/2 < f[3] + f[4], 0 < 2*f[4]}, {f[1], f[2], f[3],


The solution will be correct, if we write

solve({ a + b = 1, a > 0, b > 1/2}, {a,b,c})  assuming  c>0;

               {a = -b+1, c = c, 1/2 < b, b < 1}

Numbers  (-1) ^ (1/2 ) ,  (-1) ^ (3/2)  and so on - are some complex numbers. If you want them to have remained in that state, and not calculated to form  a+I*b (I - complex unit), you can write like this

sum(-y2*y3+8*(-1)^``((k-1)*(1/2))*sinh(y2*Pi*k)*sin(k*Pi*y3)/(Pi^3*k^3*cosh((1/2)*k*Pi)), k = 1 .. 10);


{p2=0.00251}, {p2=1.59454}: 




You can plot the indefinite integral:

plot(int(x^2*exp(Pi*x/10^12*M), x), x = 0 .. 1000);

To better compare the graphics,  scaling=constrained option is used and the range on vertical axis is limited.










A:=plot([a0,a1,a2], y = 0 .. 1, 0..5, linestyle = [dot, dash,dot], color = [red, blue,green]): 

B:=plot([b0,b1,b2], y = 0 .. 2, 0..5, linestyle = [dot, dash,dot], color = [red, blue,green]):


plots[display](< display(A) | display(B) >, scaling=constrained);

First 217 218 219 220 221 222 223 Last Page 219 of 238