Kitonum

21308 Reputation

26 Badges

16 years, 257 days

MaplePrimes Activity


These are answers submitted by Kitonum

Ronan, your result  23  is correct, but I do not understand the logic of your solution. What similar triangles are you writing about? The triangles in the figure with areas of 2 and 9 are not similar.

Below is the solution in Maple. We specify the coordinates of all the points in the figure above. E and F denote the intersection points of the line  QP  with the lines  BD  and  AC, and  G  denotes the intersection point of the diagonals of the parallelogram.

restart;
with(LinearAlgebra):
local D:
B, A, D, C, Q, P := [0,0], [a,b], [a+c,b], [c,0], [d,0], [a+d,b]:
S:=(X,Y,Z)->1/2*(Determinant(<<X[]>|<Y[]>>)+Determinant(<<Y[]>|<Z[]>>)+Determinant(<<Z[]>|<X[]>>)):
Line:=(X,Y)->(y-X[2])*(Y[1]-X[1])-(x-X[1])*(Y[2]-X[2]):
BD:=Line(B,D): AC:=Line(A,C): PQ:=Line(P,Q):
E:=eval([x,y], solve({PQ,BD},{x,y})):
F:=eval([x,y], solve({PQ,AC},{x,y})):
G:=eval([x,y], solve({AC,BD},{x,y})):
sol:=solve({S(A,F,P)=2,S(E,G,F)=9});
eval(simplify(S(Q,C,F)-9, {S(A,F,P)=2,S(E,G,F)=9}), sol[2]);

                 

PS.  From  sol[2]  we see that any parallelogram can be taken as such, in which the product of the base and the height is equal to 100. The simplest example of such a parallelogram would be a square with a side of 10 (in the figure below  AB=BC=10, AP=2):

 

The number of tickmarks on the coordinate axes is controlled by the spacing option. The number of animation frames is controlled by the  frames  option. The number of frames is always 1 more than the number of intervals. To make the animation parameter value rational, for example 0.1 , I replaced 6.28 with 6.3, which gives 63 intervals, and the number of frames should then be taken equal to 64 (see your examples below):

 

NULL

restart;

G := plot(sin(x), x = -2*Pi .. 2*Pi, view = [0 .. 2*Pi, -3 .. 3], color = blue, tickmarks = [spacing(Pi/6), default], labels = ["", ""], gridlines, thickness = 2, scaling=constrained, size=[800,500]);

 

plots[animate](plot, [sin(x+C), x = 0 .. 2*Pi, thickness = 3], C = 0 .. 6.3, frames=64, background = G, labels = ["", ""]);

 

NULL

 

 

PS.  nm  has already answered you how to make the parameters corresponding to individual frames multiples of fractions of Pi .

Download Q_Pi_scaling_new.mw

An easy way to color the area between the graph and the horizontal axis is to use the  filled  option (it works in the oldest versions of Maple). I also added plus and minus signs for the definite integral signs and chose a warmer color for the positive area.
Plotted in Maple 2018.2:

restart;
with(plots):
P:=plot(x^3, x=-1..1, color=black, thickness=3):
P1:=plot(x^3, x=-1..0, color=cyan, filled):
P2:=plot(x^3, x=0..1, color=gold, filled):
T:=textplot([[-0.8,-0.2,"_"],[0.8,0.2,"+"], [0.7,0.6,y=x^3,rotation=Pi/3,font=[times,20]]], font=[times,bold,22]):
plots:-display(P1,P2,P,T, size=[500,500]);

                  

Edit.

Use the AllSolutions  option to get the general solution  Sol  of this equation. We see that the general solution contains 2 variables. _L1  is any integer, and _B1  takes 2 values  0  or  1 . Therefore, the general solution  Sol  can be divided into 2 families of solutions  Sol1  and  Sol2 :

restart;
Sol:=solve(sqrt(2)*sin(2*x-(1/6)*Pi)=1, AllSolutions);
about(_B1);
Sol1:=eval(Sol,[_B1=0,_Z1=k]);
Sol2:=eval(Sol,[_B1=1,_Z1=k]);

                        

PS.  This solution in Maple 2018.2

It's not hard to do, but then you'll have to use different names. One name for calculations and plottings and another name for displaying:

restart;
f:=x->log[2](x);  # f is the name of a procedure for calculations
f(8);
ff:=InertForm:-Display(%log[2](x), inert=false):  # ff is the name for images
plot(f, 0..8, labels=[x,ff], title=typeset("A plot of the function  ", y=ff, "."), titlefont=[times,18], size=[1000,500], scaling=constrained );

                 

 

I think the shortest way is to define these expressions (theta[1], theta[2], eta[3], B as a matrix) first, and then f[3] :

restart;
theta[1]:=x+l[1]*y-(alpha+beta/l[1])*t;
theta[2]:=x+l[2]*y-(alpha+beta/l[2])*t;
eta[3]:=k[3]*(x+l[3]*y-(k[3]^2+alpha+beta/l[3])*t)+eta0[3];
B:=Matrix(3, (i,j)->`if`(i<>j,6*l[i]*l[j]*(l[i]+l[j])/beta/(l[i]-l[j])^2,1));

f[3]:=simplify(theta[1]*theta[2]+B[1,2]+(B[1,3]*B[2,3]+B[1,3]*theta[2]+B[2,3]*theta[1]+B[1,2]+theta[1]*theta[2])*exp(eta[3]));

 

Explanation for Q3:  To find the kernel of a linear mapping, we must find the preimage of zero (i.e. the vector  <0, 0, 0>) under this mapping. To do this, we first solve the corresponding system. The number of independent parameters in the solution gives the dimension of the kernel. By assigning independent values ​​to these parameters, we obtain the basis of the kernal. We immediately find the dimension and basis of the image using the  LinearAlgebra:-Basis  command for the columns of mapping matrix  A .
 

restart;
# Q1:
T:=(x,y)->[x+3,2*y,x+y]:
is(T(x1+x2,y1+y2)=T(x1,y1)+~T(x2,y2) and T(t*x,t*y)=expand(t*~T(x,y)));
 # Check of linearity

    #  false
 

# Q2:
F:=(x,y)->[x-y,x-2*y]:
solve({x-y=x1,x-2*y=y1}, {x,y});
G:=unapply(eval([x,y],%),(x1,y1)); # G is the inverse of F

                       
 

# Q3:
L:=[x+2*y+3*z+2*t,2*x+4*y+7*z+5*t,x+2*y+6*z+5*t]:
Sys:={L[1]=0,L[2]=0,L[3]=0}:
Sol:=solve(Sys);
eval(eval(<x,y,z,t>,Sol),[y=1,z=0]), eval(eval(<x,y,z,t>,Sol),[y=0,z=1]); # Basis of the kernal;
A:=Matrix([seq([seq(coeff(L[i],s),s=[x,y,z,t])],i=1..3)]);
LinearAlgebra:-Basis([A[..,1],A[..,2],A[..,3],A[..,4]])[]; # Basis of the image

                           

         

Download Questions.mw

Edit.

We can use the  plots:-textplot  command for this:

restart

with(PDEtools)

undeclare(prime, quiet); declare(u(x, y, t), quiet); declare(f(x, y, t), quiet)

NULL

(1)

with(plots); a := -1; b := -2; alpha := 1; beta := 1; eq := y = -beta*(x-sqrt(3)*sqrt(-a*beta*(a^2+b^2)^3)/(beta*(a^2+b^2)*b))/((a^2+b^2)*alpha+2*a*beta); U := proc (x, y, a, b, alpha, beta) options operator, arrow; 4*b^2*beta*((y*a-2*alpha*t+x)*b^2+a*(-2*beta*t+a*(y*a-2*alpha*t+x)))/(-b^6*beta*y^2+(-4*t*y*beta^2+(-2*a^2*y^2+(4*alpha*t-2*x)*y*a-4*(alpha*t-(1/2)*x)^2)*beta+3*a)*b^4+(-4*t^2*beta^3+4*a*t*(y*a-2*alpha*t+x)*beta^2-a^2*(y*a-2*alpha*t+x)^2*beta+6*a^3)*b^2+3*a^5) end proc; contour1 := contourplot(eval(U(x, y, a, b, alpha, beta), t = -50), x = -200 .. 200, y = -100 .. 100, contours = 30, color = red, grid = [100, 100], transparency = .1); contour2 := contourplot(eval(U(x, y, a, b, alpha, beta), t = 0), x = -200 .. 200, y = -100 .. 100, contours = 30, color = blue, grid = [100, 100], transparency = .1); contour3 := contourplot(eval(U(x, y, a, b, alpha, beta), t = 50), x = -200 .. 200, y = -100 .. 100, contours = 30, color = green, grid = [100, 100], transparency = .1); trajectory_plot := implicitplot(eq, x = -200 .. 200, y = -200 .. 200, color = black, thickness = 2); T := textplot([[-115, 20, "t=-50", color = red], [45, 10, "t=0", color = blue], [120, -10, "t=50", color = green]], font = [Times, Roman, 16]); display(contour1, contour2, contour3, trajectory_plot, T, title = "3-Lump Soliton met Bewegings Trajectorie", labels = ["x", "y"], scaling = constrained, size = [1200, 800])

-1

 

-2

 

1

 

1

 

y = -(1/3)*x-(1/6)*3^(1/2)*5^(1/2)

 

proc (x, y, a, b, alpha, beta) options operator, arrow; 4*b^2*beta*((y*a-2*alpha*t+x)*b^2+a*(-2*beta*t+a*(y*a-2*alpha*t+x)))/(-b^6*beta*y^2+(-4*t*y*beta^2+(-2*a^2*y^2+(4*alpha*t-2*x)*y*a-4*(alpha*t-(1/2)*x)^2)*beta+3*a)*b^4+(-4*t^2*beta^3+4*a*t*(y*a-2*alpha*t+x)*beta^2-a^2*(y*a-2*alpha*t+x)^2*beta+6*a^3)*b^2+3*a^5) end proc

 

 

Download label_new.mw

Maple doesn't understand what  dx  and  dy  are. The equation should have a derivative, not differentials. Replace  dy  with  diff(y(x),x)*dx  and continue as in the first case:

ode2 := (sin(x)*tan(x)+1)*dx-cos(x)*sec(y(x))^2*diff(y(x),x)*dx = 0:
ode2:=factor(ode2/dx);

Two options:

A:=n->Matrix(n,(i,j)->a[i,j]):
# or
B:=n->Matrix(n,(i,j)->a[parse(cat(i,j))]):

Examples:

A(5);
B(5);

                                      

I think you will have more opportunities if you do not use the tools of the  Calculus1  package, but make animation directly:

restart;
F:=proc(t)
local P1, P2;
uses plots;
P1:=plot3d([y^2*cos(alpha),y,y^2*sin(alpha)],y=1..2,alpha=Pi/2..t, color="LightGreen");
P2:=spacecurve([y^2*cos(t),y,y^2*sin(t)],y=1..2, color=red, thickness=3);
display(P1,P2);
end proc: 
P:=plots:-spacecurve([0,t,t^2], t=-3..3, color=red, thickness=3):

plots:-animate(F,[t], t=Pi/2..2*Pi+Pi/2, frames=90, labels=[x,y,z], background=P, paraminfo=false, axes=normal, view=[-4..4,-3..3,-4..9]);

        

Edit.

Let's consider 2 cases (in Maple 2018.2) :
 

restart;
# p=1-eps
limit(x^p*int(sin(t^2), t=x..x+1), x=infinity) assuming p<=0;
limit(x^p*int(sin(t^2), t=x..x+1), x=infinity) assuming p>0, p<1;

                                                     0
                                                     0

restart;
f := x->(x-abs(x))/(2*x);
plot(f(x), x=-5..5, color=red, thickness=3, size=[1000,200], scaling=constrained, discont);

                

 

It is well known that there is no equilateral triangle with integer coordinates of its vertices. This follows immediately from the formula for its area  S= a^2*sqrt(3)/4 , where  a  is the length of its side (and   is always an integer or the square root of an integer by the Pythagorean theorem). 
We see that its area is an irrational number if its vertices are at the nodes of an integer grid. But under this condition, it is obvious that its area is a rational number. This contradiction proves the non-existence of such a triangle.

PS. That the area of ​​a triangle with integer coordinates is an integer or fractional number with a denominator of 2 also follows from the shoelace formula for a triangle

               

Here (x1,y1), (x2,y2), (x3,y3)  are the vertices of the triangle.


In Maple, square brackets are used only to form lists.

restart;
y := eval((1 + M*cos(2*Pi*f__m*t))*A*sin(2*Pi*f__c*t), [M = 0.5, A = 1, f__m = 2, f__c = 10]);
plot(y, t = 0 .. 1.5, title = "Graph of Carrier", labels = ["time (seconds)", "Amplitude (Volts)"], color = red, size=[900,400]);

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