vv

13977 Reputation

20 Badges

10 years, 36 days

MaplePrimes Activity


These are answers submitted by vv

P:=proc(p,x,y)
  local pp:=expand(p), ld:=ldegree(pp,{x,y}), a:=floor(ld/2), b:=ld-a;
  coeff(coeff(pp,x,a),y,b)*x^a*y^b
end proc;

P(13*x^2*y^2 + x*y^2 + 2*y*x^2,x,y) # x*y^2
P(100*x^2*y^2 + 35*y*x + 45*x,x,y)   # 0

The double integral diverges.
I have supposed that Dgamma = D(gamma), Dphi = D(phi).
(Use gamma1 instead of gamma = used by Maple.) 
 

g(a) = piecewise(a < 0, 1/4*2^(1/2)*(a^2)^(1/4)*exp(-1/2*a^2)*BesselK(1/4,1/2*a^2),
-1/2*Pi^(1/2)*2^(1/4)*exp(-1/2*a^2)*(2^(1/2)*CylinderD(3/2,-2^(1/2)*a)+
2*a*CylinderD(1/2,-2^(1/2)*a)));

 

Note that actually the second branch is valid for a<0 too!

with(LinearAlgebra):

A:=RandomMatrix(4, generator=(()->randpoly(x, degree=1)));

Matrix(4, 4, {(1, 1) = -27*x+65, (1, 2) = 88*x+10, (1, 3) = -6*x+80, (1, 4) = -84*x+57, (2, 1) = -49*x+31, (2, 2) = 73*x+95, (2, 3) = 68*x-29, (2, 4) = 5*x-26, (3, 1) = -51*x+88, (3, 2) = 97*x-67, (3, 3) = 58*x+29, (3, 4) = 37*x+5, (4, 1) = -36*x-57, (4, 2) = 85*x+80, (4, 3) = 90*x+74, (4, 4) = 27*x+9})

(1)

f:=unapply('Determinant'(A), x):

fsolve(f, -5..5);

-.8230972093

(2)

fsolve(f(x), x, complex)

HFloat(-0.8230972092886379), HFloat(0.47998410600004493), HFloat(3.0828436546763673)-HFloat(2.183514741277015)*I, HFloat(3.0828436546763673)+HFloat(2.183514741277015)*I

(3)

#solve(f(x), x, explicit)

 

 

Windows:

src:=cat(kernelopts(mapledir), "\\samples"):
dest:="D:\\tmp\\samples\\":
system( cat("xcopy \"", src, "\" ", dest, " /E") );

 

No, if   f := y z x + exp(x) cos(y) + g(y, z)
your ff is not correct.

IntWithConst:=proc(f::algebraic, x::name, C::name:=_F)
  local u:=indets(f, And(name, Not(constant))) minus {x};
  int(f, x) + C(u[])
end:

A := exp(x)*cos(y) + y*z:

f:=IntWithConst(A, x);
       
f := y*z*x + exp(x)*cos(y) + _F(y, z)

diff(f,y);
      
z*x - exp(x)*sin(y) + diff(_F(y, z), y)

 

The principle is simple: if diff(f(x,y), x) = 0 then f(x,y) is constant with respect to x, which means that f(x,y) depends only on y, i.e. f(x,y) = g(y).

If you want to see this in Maple:

pdsolve( diff(f(x,y), x) = 0, f(x,y) );

         f(x, y) = _F1(y)

Actually, the fact is true only locally: in a non-convex domain, f(x,y) could depend on x (!). Maths is difficult...

So, you want a partial fraction form. Unfortunately Maple does it only for rational expressions and a substitution is needed.

S:=sqrt(N__s):
subs(x=S, convert(subs(S=x,S^2=x^2, ex1), parfrac));

 

 

 

 

The standard plot is over a rectangle (i.e. the xy projection is a rectangle).

plot3d(4*x^2+9*y^2, x=-5..5, y=-4..4);

 

You probably want an ellipse, obtained by cutting the paraboloid by an horizontal plane.

solve(4*x^2+9*y^2<=100,[x,y])

[[x <= 5, -5 <= x, y <= (2/3)*(-x^2+25)^(1/2), -(2/3)*(-x^2+25)^(1/2) <= y]]

(1)

plot3d(4*x^2+9*y^2, x=-5..5, y=-(2*sqrt(-x^2 + 25))/3..(2*sqrt(-x^2 + 25))/3)

 

 

A simpler method is to use the view option

plot3d(4*x^2+9*y^2, x=-5..5, y=-5..5, view=0..100);

 

The loci are two circles centered at B and C.

(The geometry package cannot be used generally for such problems; they must be solved directly.)


 

restart;

A triangle ABC with fixed B and C vertices is considered in the plane, A being variable so that AB+AC remains constant and equal to a given length L.
We call P, T, T1  the points of contact of the excircle in the angle B with the sides BC, AB and AC respectively.
Show that P is fixed and is a vertex of the ellipse described by point A.

What are the locus of T and T1? How to animate the drawing when A move ? Thank you.

 

The equation of the ellipse is x^2/p^2 + y^2/q&2 = 1 (0<q<p);   f is the focal length
a,b,c are the sides of the triangle ABC.

 

c:=p+u*f/p:
b:=p-u*f/p:
a:=2*f:

A:=[u,v]:
B:=[-f,0]:
C:=[f,0]:

PC:=(a+b+c)/2-a:

PO=f+PC;

PO = p

(1)

# ==> P is a vertex

P:=[p,0]:

PB:=p+f:

T:=B+(A-B) *~ (PB/c):

[x,y]-simplify(T):

elim:=eliminate([%[], u^2/p^2+v^2/q^2-1, f^2=p^2-q^2], [u,v]);

[{u = p*(f^2-p*x)/(f^2-f*p+f*x-p^2), v = y*(f^2-p^2)/(f^2-f*p+f*x-p^2)}, {f^2-p^2+q^2, f^2*y^2+2*f*p*q^2-2*f*q^2*x+p^2*q^2-p^2*y^2-q^2*x^2}]

(2)

eqT:=simplify(elim[2][2], [f^2=p^2-q^2]);

q^2*(2*f*p-2*f*x+p^2-x^2-y^2)

(3)

Student:-Precalculus:-CompleteSquare(eqT,{x,y});

-q^2*y^2-q^2*(x+f)^2+q^2*(2*f*p+p^2)+f^2*q^2

(4)

 ==>  The locus of T is a circle having the center at B.

 

T1:=C+(A-C) *~ (PC/b):

[x,y]-simplify(T1):

elim1:=eliminate([%[], u^2/p^2+v^2/q^2-1, f^2=p^2-q^2], [u,v]);

[{u = p*(f^2-p*x)/(f^2+f*p-f*x-p^2), v = y*(f^2-p^2)/(f^2+f*p-f*x-p^2)}, {f^2-p^2+q^2, f^2*y^2-2*f*p*q^2+2*f*q^2*x+p^2*q^2-p^2*y^2-q^2*x^2}]

(5)

eqT1:=simplify(elim1[2][2], [f^2=p^2-q^2]);

-q^2*(2*f*p-2*f*x-p^2+x^2+y^2)

(6)

Student:-Precalculus:-CompleteSquare(eqT1,{x,y});

-q^2*y^2-q^2*(x-f)^2-q^2*(2*f*p-p^2)+f^2*q^2

(7)

==> The locus of T1 is a circle having the center at C.

##### Plot ####

p:=5;q:=3;f:=4;
v:=solve(u^2/p^2+vv^2/q^2-1,vv)[1]:

5

 

3

 

4

(8)

pp:=proc(u_)
global u; uses plots;
u:=u_;
display(
  plot([A,B,C,A]),
  plot([T,T1,P], style=point, color=blue, symbolsize=20),
  implicitplot(x^2/p^2+y^2/q^2-1, x=-10..10, y=-10..10, color=pink),
  implicitplot(eqT,  x=-20..10, y=-1..10, color=green),
  implicitplot(eqT1, x=-20..10, y=-1..10, color=blue),
  scaling=constrained, view=[-15..6, 0..10]
) end proc:

Explore(pp(u_), u_=-p*1.0 .. p)

 

 


 

 

 

Download geom-loci-ellipse-circles.mw

You have some inaccurate formulations, starting with the definition of a defective eigenvalue (see the cited wiki article).
Anyway, the defective eigenvectors can be obtained directly from the Jordan form of the matrix (they are the columns of Q):

A :=Matrix([[1,-2],[2,5]]):
J,Q:=LinearAlgebra:-JordanForm(A, output=['J','Q']);

         

v1:=Q[..,1];
v2:=Q[..,2];


(A-3).v1,  (A-3).v2,  (A-3)^2 . v2;

restart;
HB1 := HeunB(5/2, -5^(1/4)*(2*M - R)/sqrt((2*M - R)*(4*M - R)), (17*sqrt(5))/10, (3*5^(3/4)*(2*M - R))/(2*sqrt((2*M - R)*(4*M - R))), 5^(1/4)*sqrt((2*M - R)*(4*M - R))*r^2/(2*(2*M - R)*R^2)):
A:=op(5, HB1):
answer := series(eval(series(eval(HB1, A=z), z), z=A), r);

Your difficulties are related to maths rather than Maple.

C is a curve represented geometrically as a segment with endpoints (1,0), (2,2).
So, you have to find a parametric representation for C [for a computation by hand].

You are asked for the path integral (not line integral -- Maple terminology).  The computation is straightforward using VectorCalculus.

VectorCalculus:-PathInt( 2*x + y^2, [x,y] = Line(<1,0>, <2,2>) );

        (13*sqrt(5))/3

You do not need Maple for this. Denote by {0, 1, a} the set, where 0 and 1 are the min and max elements.
Then there is a unique lattice (0 < a < 1), whose graph is

    0
    |
    a
    |
    1

Of course, if the max and min elements are not distinguished, there are 3! = 6 (isomorphic) lattices. 

radsimp does a symbolic simplification, which means (among other things) that Maple is allowed to choose for sqrt(x^2) any of the values x or -x. Actually this command is deprecated, see the help page.

radsimp( b-a - sqrt((b-a)^2) ); 
    2 b - 2 a

Note that it is not correct to speak about a right or wrong result here beacuse the sign of b-a is not known.
Thr preferred approach is to use assuming:

simplify( b-a - sqrt((b-a)^2) ) assuming b>a;
                               0
simplify( b-a - sqrt((b-a)^2) ) assuming b<a;
                           2 b - 2 a
 

 

 

First 36 37 38 39 40 41 42 Last Page 38 of 120