Kitonum

21530 Reputation

26 Badges

17 years, 86 days

MaplePrimes Activity


These are answers submitted by Kitonum

1) isolve  command just fails with your example.

2) It is easy to check that  your examples of solutions really are not solutions.

3) The plotting shows that the set of solutions of the system is located between two parallel lines

plots[inequal]({-13/74 < 7/37*f-2/37*g, -1/2 < 2/37*f+7/37*g, 2/37*f+7/37*g < -33/74, 7/37*f-2> 7*g, 7*g < 1/2}, f=-3..6, g=-5..1, scaling=constrained);

                          

 

4) We can find many integer solutions if we use the  IntegerPoint1  procedure from here 

Because this procedure works only for bounded regions, I added the extra inequality  f<100  to your system:

IntegerPoints1({(7/37)*f-2 > 7*g, -13/74 < (7/37)*f-(2/37)*g, -1/2 < (2/37)*f+(7/37)*g, f < 100, 7*g < 1/2, (2/37)*f+(7/37)*g < -33/74}, [f, g]);

 

Addition. If we analyze the results obtained, it is easy to obtain (and to prove) the general formulas for solutions.

 

 

restart;

A:=Matrix(100, 1, 1):

for k from 1 to 100 do

B[k]:=Matrix(subsop(k=[1.1], convert(A, listlist)));

od:

 

Matrix  B[k]  is different from the matrix   only  k-th column element.

Here is the procedure which solves the problem for addition. For subtraction,multiplication and division everything is similar.

Plus:=proc(a,b)

local P;

uses ListTools;

P:=proc(a)

local s, n;

s:=convert(a, string);

n:=length(s);

add(parse(s[n-i+1])*2^(i-1), i=1..n);

end proc:

parse(cat(op(Reverse(convert(P(a)+P(b), base,2)))));

end proc:

 

Example of use:

Plus(1101, 111);

                                     10100

 

Edit. For multiplication:

Multiplication:=proc(a,b)

local P;

uses ListTools;

P:=proc(a)

local s, n;

s:=convert(a,string);

n:=length(s);

add(parse(s[n-i+1])*2^(i-1),i=1..n);

end proc:

parse(cat(op(Reverse(convert(P(a)*P(b),base,2)))));

end proc:

 

Example:

Multiplication(1101,1011);

                                                       10001111

Try  algsubs  command.

Example:

algsubs(y^4 = f(y),  x*y+x^3+y^5+y^6);

expand(%);

                           

 

 

Pink umbrella with its projection on xy-plane. Here is my attempt:

 

P := piecewise(x > -2 and x < -sqrt(2), sqrt(2)*(x+2)/(2-sqrt(2)), x > -sqrt(2) and x < 0, (2-sqrt(2))*x/sqrt(2)+2, x > 0 and x < sqrt(2), (sqrt(2)-2)*x/sqrt(2)+2, x > sqrt(2) and x < 2, sqrt(2)*(x-2)/(sqrt(2)-2)):

F := plots[spacecurve]([3*sin(theta), 0, 3*cos(theta)], theta = 0 .. arcsin(2/3), color = "DeepPink", thickness = 3, linestyle = solid):

Tr := p->plottools[rotate](p, (1/4)*Pi, [[0, 0, 0], [0, 0, 1]]):

Pr := plottools[polygon]([seq([2*cos((1/4)*Pi*k), 2*sin((1/4)*Pi*k), 0], k = 0 .. 8)], color = grey, style = surface):

A := plot3d(sqrt(-x^2-y^2+9), x = -2 .. 2, y = -P .. P, color = "HotPink", style = surface, scaling = constrained, axes = normal, numpoints = 5000, view = [-2.45 .. 2.45, -2.45 .. 2.45, 0 .. 3.45]):

C := plottools[cylinder]([0, 0, 1], 0.02, 2, style = surface, color = yellow): T := plots[tubeplot]({[0, 0, t, t = 0.7 .. 1], [0.2+0.2*cos(t), 0, 0.7-0.2*sin(t), t = 0 .. Pi]}, radius = 0.04, style = surface, color = brown):

plots[display](A, Pr, seq((Tr@@k)(F), k = 0 .. 7), C, T, axes = none);

 

                            

 

 Umbrella.mw

 

I did not find any command in Maple, which is plotting a vector field on a surface. But this is easy to do by hand, if you use plots[arrow]  command.

An example:

restart;

V := seq(seq(plots[arrow]([cos(phi)*sin(theta), sin(phi)*sin(theta), cos(theta)], [(1/5)*cos(phi)*cos(theta), (1/5)*sin(phi)*cos(theta), -(1/5)*sin(theta)], color = red), phi = 0 .. evalf(2*Pi), evalf(Pi/12)), theta = 0 .. evalf(Pi), evalf(Pi/12)):

S := plot3d(1, phi = 0 .. 2*Pi, theta = 0 .. Pi, style=surface, color = "LightBlue", coords = spherical):

plots[display](V, S, axes = normal, view = [-1.4 .. 1.4, -1.4 .. 1.4, -1.4 .. 1.4]);

 

                         

 

 

 We see that this vector field has singularities  at the poles.

 

You can just copy from Maple to Word. I think that this will be the easiest way.

Example:

plot3d(x^3-3*x*y^2, x = -1 .. 1, y = -1 .. 1, linestyle = solid);   # "Monkey" saddle

 

This is a screenshot of Word:

                 

a:=6*s*sqrt(9*s^2+32)+18*s^2+32:

S:=sqrt(9*s^2+32)=t:

a1:=simplify(algsubs(S^2, a)) assuming t>0;

subs(rhs(S)=lhs(S), factor(subs(-32=9*s^2-t^2, a1)));

                                        

 

 

 

If I understand the question, the slidable constants are some numerical parameters? If so, I have designated these parameters, as a, b, c. In the following examples spherical coordinates r, phi, theta were specified as some function of these parameters. 

This procedure plots down the appropriate space curve and AnimationOfCurve procedure animates this curve.

Curve := proc(Range, a, b, c)  # Range is the range for t

local R, Phi, Theta;

R:=r(t,a,b,c); Phi:=phi(t,a,b,c); Theta := theta(t,a,b,c); plots:-spacecurve([R*cos(Phi)*sin(Theta), R*sin(Phi)*sin(Theta), R*cos(Theta)], t = Range, color = red, thickness = 2, linestyle = solid, axes = normal, orientation = [10, 50]);

end proc:

 

AnimationOfCurve := proc(Range, a, b, c)

local R, Phi, Theta;

R := r(t, a, b, c); Phi := phi(t, a, b, c); Theta := theta(t, a, b, c); plots:-animate(plots:-spacecurve, [[R*cos(Phi)*sin(Theta), R*sin(Phi)*sin(Theta), R*cos(Theta)], t = lhs(Range) .. lhs(Range)+s, color = red, thickness = 2, linestyle = solid, axes = normal], s = 0 .. rhs(Range)-lhs(Range), frames = 90, orientation = [10, 50]);

end proc:

 

 

Examples of use:

r := (t, a, b, c)->a*cos(t)+b*sin(t)+c:

phi := (t, a, b, c)->a^2*cos(t)+(b-1)*sin(t)+c+1:

theta := (t, a, b, c)->a^3*cos(t)+(b^2-1)*sin(t)+c^2+1:

Curve(0..2*Pi,1,2,3);

                                      

 

AnimationOfCurve(0..2*Pi,1,2,3);

                                      

 

 

 

nombor1:=[4,6,2];

n:=nops(nombor1);

add(nombor1[i]*10^(n-i), i=1..n);

                                            

 

Addition:  The method is general in nature and can easily be written in the form of a procedure.

 

 

Use  plot3d  command instead of  plot  and unassigned variables  r  and  n :

plot3d(exp(-0.5*(r/sqrt((-r^2+1)/(n-2)))^2)/(sqrt((-r^2+1)/(n-2))*sqrt(2*Pi)), 'r' = 0.9 .. .1, 'n' = 4 .. 30, linestyle = solid, axes = normal, orientation = [-30, 70]);

                               

 

 

 

In Maple 2015 and 2016  linestyle=solid  option is required:

plot3d(x^2+y^2, x = -1 .. 1, y = -1 .. 1, linestyle=solid);

                           

 

 

 

 

 

Another way - not rewrite the system, but simply add extra equation in the original system:

eq1:=J*diff(theta(t),t,t)+b*diff(theta(t),t)=K*i(t):

eq2:=L*diff(i(t),t)+R*i(t)=V(t)-K*diff(theta(t),t):

eq3:=v(t)=diff(theta(t),t):

DCMotor:=[eq1,eq2,eq3];

plot([(x-1)/(x-2), [2, t, t = -5 .. 7], 1], x = -3 .. 7, -4 .. 6, color = [red, blue, blue], thickness = [2, 1, 1], linestyle = [1, 2, 2], discont, labels = [x, y]);

                             

 

 

The same plotting for the second plot. Here the horizontal asymptote is  y=2  not y=1

compoly  is an alternative command for these simplifications:

compoly(numer(f), {x,y});

                                                 x^3-36*z^2, x = 5*x+7*y

That is, we have the identity

numer(f)=subs(%[2], %[1]);

                125*x^3+525*x^2*y+735*x*y^2+343*y^3-36*z^2 = (5*x+7*y)^3 - 36*z^2

 

The same for the denominator.

First 191 192 193 194 195 196 197 Last Page 193 of 290