vv

13065 Reputation

20 Badges

9 years, 19 days

MaplePrimes Activity


These are answers submitted by vv

For a surface with color=red, the color of the interior of the polygons is red and the color of their borders is black.

But in your case, the surface is actually a curve (it does not depend on c), so the area of each polygon is zero! Hence, the color reduces to black 

You are using interface(prettyprint=0). To get rid of those Typesetting:-mprintslash, use at the beginning:

interface(typesetting=standard);

Note first that the maxima/minima can be found directly using the command  extrema:

 

F:=x^2-2*x*y+2*y^2-12;

x^2-2*x*y+2*y^2-12

(1)

extrema(x, {F}, {x,y}, 'Sx');  # min x   and  max x

{-2*6^(1/2), 2*6^(1/2)}

(2)

Sx;

{{x = -2*6^(1/2), y = -6^(1/2)}, {x = 2*6^(1/2), y = 6^(1/2)}}

(3)

extrema(y, {F}, {x,y}, 'Sy');  # min y   and  max y

{-2*3^(1/2), 2*3^(1/2)}

(4)

Sy;

{{x = -2*3^(1/2), y = -2*3^(1/2)}, {x = 2*3^(1/2), y = 2*3^(1/2)}}

(5)

 

 

Now, if you want the math details and use the implicit function theory,

then dy/dx equals indeed   (x-y)/(x-2*y);  you can use

 

 

dydx:=implicitdiff(F,y,x)

(-x+y)/(-x+2*y)

(6)

Then you have to solve the system  {F=0,  dydx=0}.  

solve({F=0,  dydx=0}, explicit);

{x = 2*3^(1/2), y = 2*3^(1/2)}, {x = -2*3^(1/2), y = -2*3^(1/2)}

(7)

Similarly for y (i.e. dx/dy=0).

 

You may use (9)  in your worksheet only to check that the solutions correspond to min/max rather than inflexion points.

 

You may use:

Matrix(2,2, (i,j)-> undefined);

 

An irreducible polynomial f with integer coefficients cannot have both sqrt(2) and sqrt(3) as roots!
(Because f would be divisible by the minimal poynomials).

restart;

X:=cos(3*t); Y:=sin(t);

cos(3*t)

 

sin(t)

(1)

plot([X,Y, t=-0..2*Pi]);

 

 

ARG_RADIUS:=proc(X,Y,t)
  local a,r,sol;
  sol := dsolve([
    diff(r(t)*cos(a(t)),t)=diff(X,t),  diff(r(t)*sin(a(t)),t)=diff(Y,t),
    r(0)=eval(sqrt(X^2+Y^2),t=0), a(0)=arctan(eval(Y,t=0),eval(X,t=0))
    ],  numeric, output=operator);
  eval((a,r)[],sol)
end:

A,R := ARG_RADIUS(X,Y,t):

plot(arctan(Y,X), t=0..2*Pi, discont);

 

plot(A, 0..2*Pi);  # continuous arctan

 

plot([R(t)*cos(A(t)), R(t)*sin(A(t)), t=0..2*Pi]); # Lissajous (check)

 

 

Download ARG-cont.mw

It seems you want to solve the PDE  u=0. Then:

pdsolve(u);

            f = _F1(x)*_F2(y)*_F3(z)*_F4(t), [_F1(x), _F2(y), _F3(z), _F4(t), ` are arbitrary functions.`]

Unfortunately this is not the general solution. For example   f = _F1(x) + _F4(t)   is a solution too.

Cannot be verified by Maple!

 

We must first define correctly the problem.

The equation contains two antiderivatives, so both contain an additive constant.

The only possibility is to consider that we accept some pair of constants
(for arbitrary constants, the equation cannot have solutions).
But in this case, Maple cannot verify a solution because it would imply to choose a convenient pair of constants.


Let's take a simple example (which actually dsolve refuses to solve because it does not contain a derivative).

 

int(y(x), x) + int(y(x)^2, x) - 1 = 0.

 

Applying diff ==>  y(x) + y(x)^2 = 0 ==>  y(x)=0  and  y(x)=-1.

y(x) = -1  ==>  -x + C1  +  x + C2 - 1 = 0, so we must have  C1+C2=1.

The same for y(x)=0. So, there are two solutions, but the integration constants have to be chosen carefully.

 

 

Other examples.

 

restart;

eq1:=int(diff(y(x),x)*x,x)+int(y(x),x) = 0;

int((diff(y(x), x))*x, x)+int(y(x), x) = 0

(1)

sol1:=dsolve(eq1);

y(x) = _C1/x

(2)

eq2:=int(diff(y(x),x)*x,x)+int(y(x),x) +1 = 0;

int((diff(y(x), x))*x, x)+int(y(x), x)+1 = 0

(3)

dsolve(eq2);

odetest(sol1, eq1)

0

(4)

So, no solution for eq2, but y(x) = _C1/x  is a solution  if we choose the constants of integration satisfying C1+C2 = -1.

eq1 works just because the int computed by Maple have (by chance) convenient constants.

 

 

 

 

convert(s, list)  simply returns [op(s)]  i.e. the list of the operands, see ?type,series.
It seems that you are mainly interested in Taylor series. In this case, you may use

s:=series(10/(1-x^2)^2, x, 10);
             s := 10+20*x^2+30*x^4+40*x^6+50*x^8+O(x^10)
PolynomialTools:-CoefficientList(convert(s,polynom),x);
            [10, 0, 20, 0, 30, 0, 40, 0, 50]


 

Definitely, simplify & co must be revised, as pointed out in this forum several times.
Even very simple 0 expressions are not recognized!

f:= (exp(2*x)-1)/(exp(2*x)+1);

(exp(2*x)-1)/(exp(2*x)+1)

(1)

simplify(f - tanh(x));  # ?

((-tanh(x)+1)*exp(2*x)-tanh(x)-1)/(exp(2*x)+1)

(2)

is(f - tanh(x) = 0);

true

(3)

 

You probably want:

L[1, 0] := t + Pi*t/2 + (4*t^(3/2))/3:
L[2, 0] := t^(1/2) + Pi*t/4:
ans := int((L[1, 0] + L[2, 0])/(x - t)^(1/2), t = 0 .. x) assuming x>0;

                            

solve([f, diff(f,x)], explicit); # x1=x2;  (f is the polynomial);
evalf(%);

The result contains the answers for all your questions.

Remove or comment the first line    afa := 0.277 

J := Int(T2, [y=-Pi/6+afa..Pi/6, x=0..Pi/2], method = _CubaCuhre, epsilon = 1e-2):
afa:=0.277:
'afa'=afa, 'T2'=evalf( eval(T2, [y=afa, x=Pi/4]) );
#               afa = 0.277, T2 = 2.35384223415597*10^9

evalf(J);
#               1.83729944313523*10^9 + 0.*I

forget(evalf);
afa := 0.13;
evalf(J);
#                   afa := 0.13
#                   2.69229399550637*10^9 + 0.*I

forget(evalf);
afa := 0.33;
evalf(J);
#                          afa := 0.33
#                         1.54057599303060*10^9 + 0.*I

Just add global main_module;   (e.g. after local ... ;).

restart;

 

It seems to be a bug.
If we alter a bit the bindings, the result is as expected
For x=0, y=0  the results should be the same, but they are not!

 

use a=a+b in
  use b=a-b in
    a*b
  end use             #   ==>   a*(a-b)  
end use;              #   ==>   (a+b)*a              ##??
   

(a+b)^2

(1)

use a=a+b+x in
  use b=a-b+y in
    a*b                     
  end use             # ==>    a*(a-b+y)
end use;              # ==>  (a+b+x)*(a+b+x -b +y)   ##OK                

(a+b+x)*(a+x+y)

(2)

eval(%,[x=0,y=0]);

(a+b)*a

(3)

 

First 8 9 10 11 12 13 14 Last Page 10 of 115