# Magnetic field in a cavity

We are given an infinitely long cylinder of radius $b$ with an empty cylinder (not coaxial) cut out of it, of radius $a$. The system carries a steady current (direction along the cylinders) of size $I$. I am trying to find the magnetic field at a point in the hollow. I am told that the answer is that the magnetic field is uniform throughout the cavity. and is proportional to $d\over b^2-a^2$ where $d$ is the distance between the centers of the cylinders.

Attempt:

I have found by using Ampere's law that the magnetic field at a point at distance r from the axis in a cylinder of radius $R$ carrying a steady current, $I$, is given by $\mu_0 I r\over 2\pi R^2$. So I thought I would use superposition. But what I get is ${\mu_0 I \sqrt{(x-d)^2+y^2}\over 2\pi b^2}-{\mu_0 I \sqrt{(x)^2+y^2}\over 2\pi a^2}$. However this is not the given answer!

-

You need to assume that the current is distributed equally over the remaining cross sectional area of the wire. – Ron Maimon Jul 14 '12 at 4:16

## 2 Answers

This is a problem of superposition--- you can imagine this is a uniform cylinder carrying a current, and the cut-out part is another uniform cylinder carrying a current of the same current density in the opposite direction. Then you superpose the two fields of the two cylinders, and you get the total field.

Ampere's law tells you that the magnetic field inside a cylinder is linearly proportional to the distance from the center, and goes around the center line as given by the right hand rule. So that for a uniform cylinder with current density j going in the z-direction,

$$B_x \propto - j(y-y_0)$$ $$B_y \propto + j(x-x_0)$$

for the opposite current density cylinder, you just reverse the sign of j. When you add, the x and y dependent parts cancel out, so that the field is constant.

-

Hint: Take the position vector of center of hole as $\vec{a}$, and take the relative p.v. of a point in the cavity as $\vec{r_1}$. Solve vectorially, you'll be surprised by the result.

A similar surprise occurs when you have the same cylinder with a uniform charge density. Maybe you should try this first, magnetic fields involve the extra cross product (It gets out of the way here, though)

Yes, superposition is useful here.

-

Thanks, in my attempt I used the origin as the center of the hole and that answer is what I got... I can't seem to get the right answer :( – light Feb 29 '12 at 11:51
Vectors can make complicated stuff easier. Use the origin as the center of the main cylinder. Note that you applied Pythagoras theorem to non-perpendicular lines. Bad idea. Have you tried vectors yet? It really makes the solution beautiful. – Manishearth♦ Feb 29 '12 at 11:59
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 11, "mathjax_display_tex": 2, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.9452193975448608, "perplexity_flag": "head"}