Oliveira

180 Reputation

3 Badges

9 years, 232 days

MaplePrimes Activity


These are replies submitted by Oliveira

It's what I was needing. I am very grateful for your attention mmcdara.

Regards,

Oliveira

Sorry to bother you again acer. I didn't get the same result with the example below:

with(plots):

s1 := x^2 + y^2 + z^2 = 1;
s2 := x^2 - y^2 = z*(z - 1);
pon1 := intersectplot(surface(s1, x = -1 .. 1, y = -1 .. 1, z = -1 .. 1), surface(s2, x = -1 .. 1, y = -1 .. 1, z = -1 .. 1), axes = box, thickness = 4, orientation = [70, 40]);

temp1:=plottools:-transform((x,y,z)->[x,y,z])(pon1):
convert(plottools:-getdata(temp1)[3],listlist);

This what I was needing. I appreciate your attention acer.

Regards

Oliveira

Applying the procedure provided by Kotonum 19009, the coordinates do not appear in the form [x,y,z]. I would like the points to appear in the form of vectors or lists.

@Axel Vogt 

An attached document follows.
 

with(VectorCalculus)

``

This problem I took from a book, which asks to determine the magnetic field H inside a solid spherical cone.

 

             

 

The author solved the question using Ampere's circuit law and found the following expression:

 

                    

 

         

 

 

I tried to solve the issue using integration through FF expression:

  

                   

 

NULL

 

NULL

The coordinates of the infinitesimal volume element dV is:

 

rv = {p*cos(alpha), p*sin(alpha)*cos(phi), p*sin(alpha)*sin(phi)}

 

The coordinates of point P on the cone are:

 

rp = {0, r*cos(theta), r*sin(theta)}

 

Integration will be performed for:

 

"     0<p<1      0<alpha<Pi/(4)      0<phi<2 Pi    d(H)=((J)/(4 Pi r^(2))*(r)[u])dv  H=(&int;)[0]^(2Pi)(&int;)[0]^(Pi/(4))(&int;)[0]^(1)((J)/(4 Pi r^(2))*(r)[u])p^(2)sin(alpha) &DifferentialD;p &DifferentialD;alpha &DifferentialD;phi"
NULL

NULL

rR := `<,>`(p*sin(alpha)*cos(phi), p*sin(alpha)*sin(phi), p*cos(alpha))

Vector(3, {(1) = p*sin(alpha)*cos(phi), (2) = p*sin(alpha)*sin(phi), (3) = p*cos(alpha)})``

(1)

dA := `assuming`([simplify(sqrt(`&x`(diff(rR, phi), diff(rR, alpha)).`&x`(diff(rR, phi), diff(rR, alpha))))], [p > 0, alpha > 0, alpha < (1/4)*Pi])
NULL

p^2*sin(alpha)

(2)

AA := int(int(dA, alpha = 0 .. (1/4)*Pi), phi = 0 .. 2*Pi)

2*p^2*(1-(1/2)*2^(1/2))*Pi

(3)

rv := `<,>`(p*sin(alpha)*cos(phi), p*sin(alpha)*sin(phi), p*cos(alpha))

Vector(3, {(1) = p*sin(alpha)*cos(phi), (2) = p*sin(alpha)*sin(phi), (3) = p*cos(alpha)})

(4)

rp := `<,>`(r*sin(theta), 0, r*cos(theta))

Vector(3, {(1) = r*sin(theta), (2) = 0, (3) = r*cos(theta)})

(5)

rr := rp-rv

Vector(3, {(1) = r*sin(theta)-p*sin(alpha)*cos(phi), (2) = -p*sin(alpha)*sin(phi), (3) = r*cos(theta)-p*cos(alpha)})

(6)

ru := `assuming`([simplify(rr/sqrt(rr.rr))], [p > 0, alpha > 0, alpha < (1/4)*Pi])

Vector(3, {(1) = (r*sin(theta)-p*sin(alpha)*cos(phi))/sqrt(-2*sin(theta)*sin(alpha)*cos(phi)*p*r-2*cos(alpha)*cos(theta)*p*r+p^2+r^2), (2) = -p*sin(alpha)*sin(phi)/sqrt(-2*sin(theta)*sin(alpha)*cos(phi)*p*r-2*cos(alpha)*cos(theta)*p*r+p^2+r^2), (3) = (r*cos(theta)-p*cos(alpha))/sqrt(-2*sin(theta)*sin(alpha)*cos(phi)*p*r-2*cos(alpha)*cos(theta)*p*r+p^2+r^2)})

(7)

rJ := subs(J = i/AA, Typesetting[delayDotProduct](J, `<,>`(sin(alpha)*cos(phi), sin(alpha)*sin(phi), cos(alpha)), true))

Vector(3, {(1) = (1/2)*i*sin(alpha)*cos(phi)/(p^2*(1-(1/2)*sqrt(2))*Pi), (2) = (1/2)*i*sin(alpha)*sin(phi)/(p^2*(1-(1/2)*sqrt(2))*Pi), (3) = (1/2)*i*cos(alpha)/(p^2*(1-(1/2)*sqrt(2))*Pi)})

(8)

dH := `assuming`([simplify(subs(dv = p^2*sin(alpha), `&x`(rJ/(4*Pi(rr.rr)), ru)*dv))], [p > 0, alpha > 0, alpha < (1/4)*Pi])

Vector(3, {(1) = -(1/4)*sin(alpha)^2*i*sin(phi)*r*cos(theta)/(sqrt(-2*sin(theta)*sin(alpha)*cos(phi)*p*r-2*cos(alpha)*cos(theta)*p*r+p^2+r^2)*Pi(-2*sin(theta)*sin(alpha)*cos(phi)*p*r-2*cos(alpha)*cos(theta)*p*r+p^2+r^2)*(-2+sqrt(2))*Pi), (2) = -(1/4)*sin(alpha)*i*r*(-sin(alpha)*cos(phi)*cos(theta)+sin(theta)*cos(alpha))/(sqrt(-2*sin(theta)*sin(alpha)*cos(phi)*p*r-2*cos(alpha)*cos(theta)*p*r+p^2+r^2)*Pi(-2*sin(theta)*sin(alpha)*cos(phi)*p*r-2*cos(alpha)*cos(theta)*p*r+p^2+r^2)*(-2+sqrt(2))*Pi), (3) = (1/4)*sin(alpha)^2*i*sin(phi)*r*sin(theta)/(sqrt(-2*sin(theta)*sin(alpha)*cos(phi)*p*r-2*cos(alpha)*cos(theta)*p*r+p^2+r^2)*Pi(-2*sin(theta)*sin(alpha)*cos(phi)*p*r-2*cos(alpha)*cos(theta)*p*r+p^2+r^2)*(-2+sqrt(2))*Pi)})

(9)

dh1 := `assuming`([simplify(int(dH, p = 0 .. 1))], [alpha > 0, alpha < (1/4)*Pi, r > 0, r < 1, phi > 0, phi < 2*Pi, theta > 0, theta < (1/4)*Pi])

Vector(3, {(1) = -(1/4)*sin(alpha)^2*i*sin(phi)*r*cos(theta)*(int(1/(sqrt(-2*sin(theta)*sin(alpha)*cos(phi)*p*r-2*cos(alpha)*cos(theta)*p*r+p^2+r^2)*Pi(-2*sin(theta)*sin(alpha)*cos(phi)*p*r-2*cos(alpha)*cos(theta)*p*r+p^2+r^2)), p = 0 .. 1))/((-2+sqrt(2))*Pi), (2) = -(1/4)*sin(alpha)*i*r*(-sin(alpha)*cos(phi)*cos(theta)+sin(theta)*cos(alpha))*(int(1/(sqrt(-2*sin(theta)*sin(alpha)*cos(phi)*p*r-2*cos(alpha)*cos(theta)*p*r+p^2+r^2)*Pi(-2*sin(theta)*sin(alpha)*cos(phi)*p*r-2*cos(alpha)*cos(theta)*p*r+p^2+r^2)), p = 0 .. 1))/((-2+sqrt(2))*Pi), (3) = (1/4)*sin(alpha)^2*i*sin(phi)*r*sin(theta)*(int(1/(sqrt(-2*sin(theta)*sin(alpha)*cos(phi)*p*r-2*cos(alpha)*cos(theta)*p*r+p^2+r^2)*Pi(-2*sin(theta)*sin(alpha)*cos(phi)*p*r-2*cos(alpha)*cos(theta)*p*r+p^2+r^2)), p = 0 .. 1))/((-2+sqrt(2))*Pi)})

(10)

``

Note that the result of the first integration is already quite complicated and I couldn't go any further.

``


 

Download Example1.mw

@acer 

Thanks for the fix acer.

Thank you for your attention mmcdara. In fact formal integration is complicated, so I'm going to try numerical integration.
Regards,
Oliveira

Thanks again for the tip.

Olveira

Thank you for your attention Mariusz. I have difficulty calculating the gradient with this numerical procedure.

 

eval(-Gradient(uval(r, t), 'cylindrical'[r, theta, z]), [r = 2, t = 4])

Thanks for the reply and attention.

Oliveira 

Thanks for the tips, because I'm not familiar with some Maple functions yet.

Thanks for the tips, because I'm not familiar with some Maple functions yet.

I am grateful for the information.

Thanks for the tip.

I installed the new version of the Physics package and problem was solved.
Thanks again for your attention.
Oliveira
1 2 3 4 Page 3 of 4