Divergence of a vector field in a spherical polar coordinate system

In summary: I still think you should post the entire problem. Nobody here will solve it for you, only give you hints and guidance where you need it. The reason I am telling you this is that your expression looks strange. I would expect such an expression if you had gone wrong at an earlier stage, but you are giving me and everyone else zero chance of checking this. Otherwise your original vector field would have to be rather funny and I think less likely to be given as an exercise. Again, you give us zero opportunity to check whether this is the case or not. To be honest, I find it quite annoying.Also note this passage from the homework guidelines:Reproduce the problem statement accurately.Type the problem statement exactly as worded. If you
  • #1
Robin04
260
16

Homework Statement


I have to calculate the partial derivative of an arctan function. I have started to calculate it but I wonder if there is any simpler form, because if the simplest solution is this complex then it would make my further calculation pretty painful...

Homework Equations


$$\beta = \arctan{(\frac{x^2 + y^2}{z^2})}$$

The Attempt at a Solution


$$\frac{\partial \beta}{\partial x} = \frac{\partial}{\partial x} (\arctan{(\frac{x^2 + y^2}{z^2})}) = \frac{1}{1+ (\frac{x^2 + y^2}{z^2})^2} \frac{\partial}{\partial x}(\frac{x^2 + y^2}{z^2}) = \frac{\frac{2x}{z^2}}{1+(\frac{x^2 + y^2}{z^2})^2} = \frac{2x}{z^2 + \frac{(x^2 + y^2)^2}{z^2}}$$
 
Last edited:
Physics news on Phys.org
  • #2
Please do not just post part of a problem. Give us the entire problem.

Your form is correct assuming that this is indeed what you want to compute.
 
  • Like
Likes Robin04
  • #3
Orodruin said:
Please do not just post part of a problem. Give us the entire problem.

Your form is correct assuming that this is indeed what you want to compute.

Well, I'm trying to calculate the divergence of a vector field in a spherical polar coordinate system. This is quite a long calculation so that's why I didn't mention any details of it. I'm about to arrive at the final equation of the divergence which is full of complex derivatives so that's why I am looking for a simpler form of this arctan derivative.

So you're saying this is the simplest form I can get?
 
  • #4
Robin04 said:
$$\frac{\partial \beta}{\partial x} = \frac{\partial}{\partial x} (\arctan{(\frac{x^2 + y^2}{z^2})}) = \frac{1}{1+ (\frac{x^2 + y^2}{z^2})^2} \frac{\partial}{\partial x}(\frac{x^2 + y^2}{z^2}) = \frac{\frac{2}{z^2}}{1+(\frac{x^2 + y^2}{z^2})^2} = \frac{2x}{z^2 + \frac{(x^2 + y^2)^2}{z^2}}$$
You have a mistake in the next-to-last expression. The numerator should be ##\frac {2x}{z^2}##. It looks like the following expression is correct though.
Also, it would be better to simplify your final expression so that you don't have a fraction in the denominator.
 
  • Like
Likes Robin04
  • #5
Mark44 said:
You have a mistake in the next-to-last expression. The numerator should be ##\frac {2x}{z^2}##. It looks like the following expression is correct though.
Also, it would be better to simplify your final expression so that you don't have a fraction in the denominator.

Ah, thank you. That's what I missed. :)
 
  • #6
Robin04 said:

Homework Statement


I have to calculate the partial derivative of an arctan function. I have started to calculate it but I wonder if there is any simpler form, because if the simplest solution is this complex then it would make my further calculation pretty painful...

Homework Equations


$$\beta = \arctan{(\frac{x^2 + y^2}{z^2})}$$

The Attempt at a Solution


$$\frac{\partial \beta}{\partial x} = \frac{\partial}{\partial x} (\arctan{(\frac{x^2 + y^2}{z^2})}) = \frac{1}{1+ (\frac{x^2 + y^2}{z^2})^2} \frac{\partial}{\partial x}(\frac{x^2 + y^2}{z^2}) = \frac{\frac{2x}{z^2}}{1+(\frac{x^2 + y^2}{z^2})^2} = \frac{2x}{z^2 + \frac{(x^2 + y^2)^2}{z^2}}$$

Depending on what you want to do later, it may be better to re-write the result as
$$\partial \beta / \partial x = \frac{2 x z^2}{(x^2+y^2)^2 + z^4}$$
 
  • #7
Robin04 said:
Well, I'm trying to calculate the divergence of a vector field in a spherical polar coordinate system. This is quite a long calculation so that's why I didn't mention any details of it.
This is exactly why you should at least give the full problem! How else are we going to know if your calculations are correct up to this point?
 
  • #8
Robin04 said:
Well, I'm trying to calculate the divergence of a vector field in a spherical polar coordinate system. This is quite a long calculation so that's why I didn't mention any details of it. I'm about to arrive at the final equation of the divergence which is full of complex derivatives so that's why I am looking for a simpler form of this arctan derivative.

So you're saying this is the simplest form I can get?

Why don't you use the formulas for the divergence in spherical coordinates?
 
  • #9
Orodruin said:
This is exactly why you should at least give the full problem! How else are we going to know if your calculations are correct up to this point?
I'm sorry, I was misunderstandable. What I wanted to say is that the reason why I started this thread is only because of this little problem of simplifying the expression (which is already solved, thank you :) ). I don't want to bring my whole project here because I'm still working on it and I haven't encountered any other problems yet. I'm following a method my teacher told me and I want to continue and see where I can get with it. If I get stuck with it then I'll start a new thread where I'll describe the whole problem precisely. Thank you for your help, I really appreciate it! :)
 
  • #10
Ray Vickson said:
Why don't you use the formulas for the divergence in spherical coordinates?
Because I want to find it on my own. We're learning orthogonal curvilinear coordinate systems at uni and I'm practicing the method of finding these equations. I have the formula in my handbook so I can check in the end if I got it right. :)
 
  • #11
Robin04 said:
I'm sorry, I was misunderstandable. What I wanted to say is that the reason why I started this thread is only because of this little problem of simplifying the expression

I still think you should post the entire problem. Nobody here will solve it for you, only give you hints and guidance where you need it. The reason I am telling you this is that your expression looks strange. I would expect such an expression if you had gone wrong at an earlier stage, but you are giving me and everyone else zero chance of checking this. Otherwise your original vector field would have to be rather funny and I think less likely to be given as an exercise. Again, you give us zero opportunity to check whether this is the case or not. To be honest, I find it quite annoying.
 
  • #12
Also note this passage from the homework guidelines:
Reproduce the problem statement accurately.
Type the problem statement exactly as worded. If you're only asking about one part of a long problem it may not be necessary to type up the entire problem, but you need to ensure you've provided the proper context for the sub-problem. If you paraphrase or summarize, make sure you're not changing the meaning or omitting important information. It's very frustrating trying to help with a problem only to discover that critical information is missing.
As it is, you are not providing the proper context.
 
  • #13
Orodruin said:
I still think you should post the entire problem. Nobody here will solve it for you, only give you hints and guidance where you need it. The reason I am telling you this is that your expression looks strange. I would expect such an expression if you had gone wrong at an earlier stage, but you are giving me and everyone else zero chance of checking this. Otherwise your original vector field would have to be rather funny and I think less likely to be given as an exercise. Again, you give us zero opportunity to check whether this is the case or not. To be honest, I find it quite annoying.
Okay, if you insist, then I would appreciate your help. :) I'll try to explain what I'm doing.

I'm starting my physics BSc degree next september (I'm studying computer science at the moment) but I decided to attend a course which is for physics students in the second semester. I'm lacking quite some knowledge that they already learned in the first semester but I'm trying to understand as much as I can. The goal of the course is to give an introduction to advanced concepts of mathematics used in theoretical physics. The first lecture was about orthogonal curvilinear coordinate systems and we calculated the divergence of a vector field in a cylindrical polar coordinate system. I decided to practice it a bit in order to understand the concept better so I started to do the same in spherical polar coordinate system. The method we learned is not the simplest one, the lecturer said the next week we're going to learn a better method.

I uploaded the pictures of what I've done so far. I hope it's readable.

Little explanation:
Page 1:
- I definine the relationship between the cartesian and the spherical polar coordinates.
- I choose the bases (to represent vectors) ##\vec{t_r}, \vec{t_\alpha}, \vec{t_\beta}## and then I set their magnitude to ##1## and name them ##\vec{e_r}, \vec{e_\alpha}, \vec{e_\beta}##
- I check if they're perpendicular to each other by their scalar product.
- I define my vector field ##\vec{v}(\vec{r})## with the components ##v_x(x, y, z), v_y(x, y, z), v_z(x, y, z)## and write the equation for the divergence.

Page 2:
- I define new unity vectors ##\vec{E_x}, \vec{E_y}, \vec{E_z}## that are aligned with the x,y,z axis.
- I represent a vector with both bases and then express the relationship of the components.
- The next problem is that I can't differentiate with respect to x, y, z as written in the divergence formula, I need to express them with the relationship between the cartesian and the spherical polar coordinates and that part with the f function is like a skeleton for how I want to do it and it gives me which derivatives to calculate. This is where I encountered with the arctan function.

Page 3:
- I continue calculating these derivatives.

Page 4:
I'm substituting everything in the divergence formula and it's waiting to be solved :D
 

Attachments

  • 1.jpg
    1.jpg
    34.5 KB · Views: 443
  • 2.jpg
    2.jpg
    32.8 KB · Views: 400
  • 3.jpg
    3.jpg
    31.3 KB · Views: 428
  • 4.jpg
    4.jpg
    29.6 KB · Views: 429
Last edited:
  • #14
I am sorry, but it is impossible to see what you write in those pages. Anyway, as I suspected, you have gone wrong long before the issue you posted in this thread. Based on what you are looking to do, the angle ##\beta## is the polar angle. It is not given by
$$
\tan(\beta) = \frac{x^2+y^2}{z^2}.
$$
Instead, I would suggest that you look back at your derivation for the coordinate expressions.
 
  • Like
Likes Robin04
  • #15
Orodruin said:
I am sorry, but it is impossible to see what you write in those pages.
Is it because of the quality of the images or my handwriting style?

Orodruin said:
Anyway, as I suspected, you have gone wrong long before the issue you posted in this thread. Based on what you are looking to do, the angle β\beta is the polar angle. It is not given by
tan(β)=x2+y2z2.​
Oh, yes, you're right. Thank you! :)
 
  • #16
Robin04 said:
Is it because of the quality of the images or my handwriting style?
Image quality. Because of it I really cannot say anything about your handwriting.

Robin04 said:
Oh, yes, you're right. Thank you! :)
So what do you get instead?
 
  • #17
Orodruin said:
Image quality. Because of it I really cannot say anything about your handwriting.
1.1.jpg

1.2.jpg

2.1.jpg

2.2.jpg

3.1.jpg

3.2.jpg

4.1.jpg

4.2.jpg


Orodruin said:
So what do you get instead?
I missed a square root, so ##\beta = \arctan{\sqrt{\frac{x^2+y^2}{z^2}}}##
I haven't recalculated the derivatives yet, so in the images I still have the wrong formulas for ##\beta##
 

Attachments

  • 1.1.jpg
    1.1.jpg
    56.6 KB · Views: 590
  • 1.2.jpg
    1.2.jpg
    53.9 KB · Views: 518
  • 2.1.jpg
    2.1.jpg
    56.4 KB · Views: 481
  • 2.2.jpg
    2.2.jpg
    59.9 KB · Views: 547
  • 3.1.jpg
    3.1.jpg
    58.5 KB · Views: 606
  • 3.2.jpg
    3.2.jpg
    55.8 KB · Views: 491
  • 4.1.jpg
    4.1.jpg
    48.4 KB · Views: 510
  • 4.2.jpg
    4.2.jpg
    50.3 KB · Views: 437
  • #18
Robin04 said:
I missed a square root, so ##\beta = \arctan{\sqrt{\frac{x^2+y^2}{z^2}}}##

Indeed, or written a bit differently, ##\beta = \arctan\left(\rho/z\right)##, where ##\rho^2 = x^2 + y^2##. This should help you significantly in determining the derivative.
 
  • Like
Likes Robin04

Related to Divergence of a vector field in a spherical polar coordinate system

What is the definition of divergence in a spherical polar coordinate system?

The divergence of a vector field in a spherical polar coordinate system is a measure of the net flow of the vector field through an infinitesimal sphere centered at a point in the coordinate system. It is a scalar quantity that represents the magnitude of the source or sink at that point.

How is divergence calculated in a spherical polar coordinate system?

In a spherical polar coordinate system, divergence is calculated using the formula:

div(F) = (1/r^2) * ∂(r^2Fr)/∂r + (1/rsinθ) * ∂(sinθFθ)/∂θ + (1/rsinθ) * ∂Fφ/∂φ

where r, θ, and φ are the radial, polar, and azimuthal coordinates respectively, and Fr, Fθ, and Fφ are the components of the vector field in those directions.

What does a positive or negative divergence value indicate?

A positive divergence value indicates a net outflow of the vector field from a point, while a negative divergence value indicates a net inflow of the vector field towards a point. A divergence value of zero indicates that there is no net flow at that point.

What is the physical significance of divergence in a spherical polar coordinate system?

In a physical sense, divergence represents the rate at which a vector field is either spreading out or converging at a given point. It is an important concept in fluid dynamics and electromagnetism, where it is used to understand the behavior of fluids and electric and magnetic fields.

How is divergence used in practical applications?

Divergence is used in various practical applications, such as in the study of fluid flow, weather forecasting, and computer graphics. It is also used in engineering fields, such as in the design of aerodynamic structures and analyzing electric and magnetic fields in electronic devices.

Similar threads

  • Calculus and Beyond Homework Help
Replies
3
Views
1K
  • Calculus and Beyond Homework Help
Replies
3
Views
576
  • Calculus and Beyond Homework Help
Replies
18
Views
1K
  • Calculus and Beyond Homework Help
Replies
8
Views
890
  • Calculus and Beyond Homework Help
Replies
19
Views
988
  • Calculus and Beyond Homework Help
Replies
6
Views
776
  • Calculus and Beyond Homework Help
Replies
3
Views
318
  • Calculus and Beyond Homework Help
Replies
3
Views
895
  • Calculus and Beyond Homework Help
Replies
8
Views
1K
  • Calculus and Beyond Homework Help
Replies
8
Views
489
Back
Top