19954 Reputation

26 Badges

15 years, 233 days

MaplePrimes Activity

These are answers submitted by Kitonum

p:=2345: q:=1536:
dp1:=remove(`in`, dp, S);
dq1:=remove(`in`, dq, S);
p1:=add(dp1[i]*10^(i-1), i=1..nops(dp1));
q1:=add(dq1[i]*10^(i-1), i=1..nops(dq1));


We can easily do without loops when making animation. I also multiplied each frame 10 times so that the frames did not flash too often. Now each frame lasts approximately 1 second. In addition, the scales along the axes have been adjusted to make the plot look more realistic:

display(seq(plot(sin(j*x)^j, x=0..2*Pi, color=red, scaling=constrained) $ 10,j=1..10), insequence);

You should use the assignment operator, not the equality one:

plot([f(x), g(x)], x=-3..5, y=-10..10, color=[red,blue]);


To solve we must first introduce a coordinate system. The vertex with an angle of 52 degrees will be denoted by  A(0,0,0) , the second vertex by  B(12,0,0) . To find the coordinates of the third vertex  C  of this tetrahedron opposite side  AB , we use the law of sines. The vertex of this tetrahedron is designated by  S .

point(A,0,0,0): point(B,12,0,0): point(C,AC*cos(52*Pi/180),AC*sin(52*Pi/180),0):
geom3d:-gtetrahedron(T, [A,B,C,S]):
draw(T, color="LightBlue", scaling=constrained, transparency=0.8, labels=[x,y,z], orientation=[-65,60]);


I think you can easily do the rest yourself.


Maple does not solve this system analytically, but can solve it numerically:

sys_ode := diff(x(t), t) = -x(t)^2/(4*Pi*y(t)*(x(t)^2 + y(t)^2)), diff(y(t), t) = y(t)^2/(4*Pi*x(t)*(x(t)^2 + y(t)^2));
ics := x(0) = 1, y(0) = 1:

Sol := dsolve({sys_ode, ics}, {x(t),y(t)}, numeric);
plots:-odeplot(Sol,[[t,x(t)],[t,y(t)]], t=0..10, view=[0..10,0..2], color=[red,blue]);


I suggest another way to solve the problem. We define the equation of the first curve explicitly, and the equation of the circle – parametrically. When curves are specified explicitly or parametrically (as opposed to specified by implicit equations), the quality of plotting is usually better. In addition, it is easier to solve various problems related to  curves, for example, finding the length of the curve or making animation, etc. In this example, we first find the values of the parameters corresponding to the ends of the circular arc. We also animated this curve using the technique from my post

x0:=1.588125352: y0:=0:
A:=plot((-1)*0.39*x^2 + 1.459*x ,x=0..1.588125352, color=red):
B:=plot([1.81+0.94*cos(t),0.42+0.94*sin(t), t=t1..t2], color=red):
plots:-display(A, B, scaling=constrained, size=[800,400]);
A1:=animate(plot,[(-1)*0.39*x^2 + 1.459*x ,x=0..a, color=red], a=0..1.588125352):
B1:=animate(plot,[[1.81+0.94*cos(t),0.42+0.94*sin(t), t=t1..s], color=red], s=t1..t2):
display([A1, display(op([1,-1,1],A1),B1)], insequence, scaling=constrained, size=[800,400]);



eq:=-2.*10^(-12)*p[1](t)*q[1](t) + 7.133360604*10^(-8)*p[1](t)*q[0](t) + 2.839877758*10^(-7)*q[0](t)*p[2](t) + p[0](t)*q[0](t) + p[0](t)^2 + q[0](t)^3 + p[1](t) + 8*q[4](t):
selectremove(s->degree(s)<=1, eq);  # Or
selectremove(s->degree(s)<=1, [op(eq)]);


To draw circular arcs in 3D you can use the  plots:-spacecurve  command. I also made your code more compact by using the  map  command and multiple assignments. This allowed us to remove a lot of repetitions.

with(plots): with(plottools): with(geom3d):
Con := cone([0, 0, -2], 0.7, 2, transparency = 0.8, color = "SpringGreen"):
map(point@op, [[A, 0, 0, 0], [B, 0, 0, -2], [C, 0.7, 0, 0]]):
S1, S2, S3 := map(segment@op, [[AB, [A, B]],[AC, [A, C]],[BC, [B, C]]])[]:
G := draw([S1, S2, S3], linestyle = [dash,dash,solid], color = red, thickness = 2):
l := textplot3d([[0, 0, 0, "A", align=right],[0, 0, -2, "B",align=right],[.8, 0, 0, "C",align=left]], font=[times, bold, 20]):
P := plottools:-point(coordinates~([A,B,C]), color=blue, symbol=solidsphere, symbolsize = 14):
Arc1:=spacecurve([0.7+0.35*cos(t),0,0.35*sin(t)], t=-Pi..-Pi/2-arctan(0.7/2), color=red, thickness=2):
Arc2:=spacecurve([0.4*cos(t),0,-2+0.4*sin(t)], t=arctan(2/0.7)..Pi/2, color=red, thickness=2): 
G0:=textplot3d([[0.06, 0, -1.65, alpha, font=[times, bold, 16], color = red], [0.5, 0, -0.1, typeset(`#msup(mn("67"),mo("&deg;"))`), font=[times, bold, 15], color = red]]):
display(Con, G, l, P, G0, Arc1, Arc2, scaling = constrained, orientation = [45, 70], view=[-0.8..0.8,-0.8..0.8,-2.1..0.1], axes=none);




Should be assign instead of assigne.

x := rand(0. .. 1.)();                        
y := x+f(x):
subsindets(y, numeric, evalf[4]);
evalindets(y, numeric, evalf[4]);

Use  add  instead of sum:

B := (n, i, p) -> binomial(n, i)*(p^i)*(1-p)^(n-i)/i;

I understood this as multiplying the inverse of a matrix by a vector, since in a cross  product both factors must be vectors. To multiply a matrix by a vector, an ordinary point is used:

xA := 4;
yA := 10;
xB := 0;
yB := 0;
xC := 13;
yC := 0;
Mat := Matrix(3, 3, [xA, xB, xC, yA, yB, yC, 1, 1, 1]);
phi := (x, y) -> Mat^(-1).<x, y, z>;
phi(4, 18/2);
phi(4, 10);
phi(13, 0);


You forgot the multiplication signs:

sqrt(a^2+2*a*b+b^2) assuming a+b>=0;
sqrt(a^2+2*a*b+b^2) assuming a+b<0;


In the solution below, Pascal's triangle has a more traditional form:

for n from 0 to 7 do
print(cat(seq(cat(`   `,binomial(n,k),`   `), k=0..n)));



Example a) 
Let  the points E(1,0), F(0,1), G(0,3), H(3,0). The Green's Theorem 
{\displaystyle \oint \limits _{C}(P\,dx+Q\,dy)=\iint \limits _{D}\left({\frac {\partial Q}{\partial x}}-{\frac {\partial P}{\partial y}}\right)\,dx\,dy}

SetCoordinates(cartesian[x, y]):
P:=x^2*y: Q:=x*y^2:
I1:=LineInt(VectorField(<P, Q>), Path(<cos(t), sin(t)>, t=0..Pi/2)): # Integration along the EF curve
I2:=LineInt(VectorField(<P, Q>), Path(<0,t>, t=1..3)): # Integration along the FG curve
I3:=LineInt(VectorField(<P, Q>), Path(<3*cos(t),3*sin(t)>, t=Pi/2..0)): # Integration along the GH curve
I4:=LineInt(VectorField(<P, Q>), Path(<t,0>, t=3..1)): # Integration along the HE curve
A:=I1+I2+I3+I4; # Left side of Green's formula
B:=int(eval((diff(P,y)-diff(Q,x))*r, [x=r*cos(t),y=r*sin(t)]), [r=1..3, t=0..Pi/2]); # Right side of Green's formula

Example b) can be solved similarly.

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