Ampere's Law vs Biot-Savart Law: Which to Use

Use Ampere's law when the current has enough symmetry that the magnetic field is constant along a loop you can draw: long wires, long solenoids, cylindrical conductors. Use Biot-Savart everywhere else, integrating each segment's contribution. It is the same split Gauss and Coulomb have.

AP Physics: Unit 12 (topics 12.3 Magnetic Fields of Current-Carrying Wires and the Biot-Savart Law, 12.4 Ampere's Law). Both topics sit in AP Physics C: Electricity and Magnetism Unit 12, Magnetic Fields and Electromagnetism, weighted at 10 to 20 percent of the multiple-choice section over approximately 10 to 20 class periods. Essential knowledge 12.3.A.1 gives the Biot-Savart law as defining the magnitude and direction of the magnetic field created by an electrical current, and 12.3.A.3 gives the field at the centre of a circular loop as a derived equation. The Topic 12.3 boundary statement limits required quantitative Biot-Savart analysis to a location along the perpendicular bisector of a straight conductor, a location along the central axis of a circular loop, and the centre of a segment of a circular loop. Essential knowledge 12.4.A.1 gives Ampere's law with an Amperian loop, and its subpoints give the long straight wire and the long solenoid as derived equations, with 12.4.A.1.ii stating that unless otherwise stated all solenoids are assumed very long with uniform fields inside and negligible fields outside. The Topic 12.4 boundary statement limits quantitative application to symmetrical magnetic fields and names long straight wires, long solenoids, and conductive slabs or cylindrical conductors carrying a current density. Neither law appears in the AP Physics 2 CED.

The choice, in one line

Every magnetic field in this course comes from a current, and these are the two routes from the current to the field. Neither is more correct than the other. The difference is entirely about what work you have to do.

The [Biot-Savart law](/glossary/biot-savart-law) is a recipe for adding. Every short segment of current-carrying wire makes its own small magnetic field, and you add up all of those contributions along the whole wire. It works on any current path whatsoever. The cost is that each contribution is a cross product, which is to say a vector with a direction that changes as you move along the wire, so you resolve into components before you integrate.

[Ampere's law](/glossary/amperes-law) is a recipe for cancelling. You draw a closed loop, and the law tells you the circulation of B\vec{B} around it. If the loop can be chosen so that the field magnitude is constant along it and always parallel to it, the integral collapses to BB times a length and you solve for BB in one line. The cost is that such a loop exists only for a short list of current geometries.

So the decision procedure is:

  1. Long straight wire, long solenoid, or a slab or cylinder carrying a current density? Ampere.
  2. Anything else, including a single loop, an arc, or a finite segment? Biot-Savart.

If that pattern sounds familiar, it should. It is exactly the relationship Gauss's law has to Coulomb's law, moved from the electric half of the course to the magnetic half. Coulomb is to Gauss as Biot-Savart is to Ampere: an always-applicable integrating law paired with a symmetry shortcut. Recognising that once means you learn one decision procedure instead of two, and it is the reason Coulomb's law vs Gauss's law is worth reading alongside this page even though it is about a different field.

Side by side

Biot-Savart lawAmpere's law
Printed form, C: E&M sheetdB=μ04πI(d×r^)r2d\vec{B} = \frac{\mu_0}{4\pi}\frac{I(d\vec{\ell} \times \hat{r})}{r^2}Bd=μ0Ienc\oint \vec{B} \cdot d\vec{\ell} = \mu_0 I_{\mathrm{enc}}
What it gives youThe field contributed by one short segmentThe circulation of B\vec{B} around a closed loop
MethodIntegrate along the current pathChoose a loop, then cancel
Vector or scalar workVector: a cross product per elementScalar once the loop is chosen well
What you must knowThe full geometry of the current pathOnly the net current threading the loop
Works on any current?Yes, alwaysAlways true, but only solves for BB under symmetry
Geometries the CED requiresPerpendicular bisector of a straight conductor, along the axis of a circular loop, at the centre of a segment of a circular loopLong straight wires, long solenoids, conductive slabs, cylindrical conductors with a current density
Direction comes fromThe cross product itselfThe right-hand rule, applied separately
Falls off as1/r21/r^2 per elementDepends on the geometry; 1/r1/r for a wire
Electric analogueCoulomb's law in integral formGauss's law

The row that decides a problem is what you must know. Biot-Savart demands every detail of the wire's shape, because each piece contributes differently. Ampere demands only a number, the enclosed current, and hands you the field without your knowing how the current is distributed inside the loop, as long as the distribution is symmetric.

The row people skip is the 1/r21/r^2 against 1/r1/r. Each element of current produces an inverse-square field, exactly like a point charge. The field of an infinite wire falls off as 1/r1/r instead, and that is not a contradiction: it is what you get after adding infinitely many inverse-square contributions from a line that extends forever. The same thing happens on the electric side, where a point charge gives 1/r21/r^2 and an infinite line of charge gives 1/r1/r.

What the CED lets each one do

Both topics carry boundary statements, and reading them together tells you which problems are which before you start.

Biot-Savart, from the Topic 12.3 boundary statement: AP Physics C: Electricity and Magnetism only expects students to perform quantitative analysis of certain cases of current-carrying conductors using the Biot-Savart law, such as at a location along the perpendicular bisector of a straight conductor, at a location along the central axis of a circular loop, or at the centre of a segment of a circular loop.

Ampere, from the Topic 12.4 boundary statement: AP Physics C: Electricity and Magnetism only expects quantitative application of Ampere's law limited to situations involving symmetrical magnetic fields, and it names the shapes: long straight wires, long solenoids carrying currents, and conductive slabs or cylindrical conductors carrying a current density.

Put the two lists side by side and three things stand out.

  • The two lists barely overlap. A circular loop and an arc appear only on the Biot-Savart list. A solenoid and a slab appear only on the Ampere list. The exam is not asking you to choose between them very often; it is asking you to recognise which one the geometry already chose.
  • The straight wire is on both, in different guises: the perpendicular bisector of a finite straight conductor for Biot-Savart, the long straight wire for Ampere. That overlap is the standard exercise for showing that the two routes agree, and worked example one does it.
  • Every Biot-Savart case on that list is one where the cross product is easy. Along the perpendicular bisector, at the centre of a loop, at the centre of an arc: in all three, either dd\vec{\ell} is perpendicular to r^\hat{r} everywhere or the distance rr is constant, or both. The CED is not asking for hard integrals; it is asking for the ones where symmetry does most of the cross product for you.

That last point has a check you can run yourself. The C: E&M sheet's calculus table prints five integrals: xndx\int x^n dx, eaxdx\int e^{ax} dx, dxx+a\int \frac{dx}{x+a}, cos(ax)dx\int \cos(ax) dx and sin(ax)dx\int \sin(ax) dx. The integral you would need for a general straight segment, dx(x2+a2)3/2\int \frac{dx}{(x^2+a^2)^{3/2}}, is not among them. The calculus formulas reference lists the printed set. The exam sets Biot-Savart problems whose integrals you can do without it.

The overlap: a long straight wire, both ways

This is the one geometry where you genuinely have a choice, and comparing the two routes on it is the fastest way to feel the difference in cost.

Ampere. The field circles the wire and has the same magnitude at every point of a circle of radius rr centred on it. So Bd=B(2πr)=μ0I\oint \vec{B} \cdot d\vec{\ell} = B(2\pi r) = \mu_0 I, and B=μ0I2πrB = \frac{\mu_0 I}{2\pi r}. Three lines, one of which is a symmetry argument. The CED prints this as a derived equation under essential knowledge 12.4.A.1.i.

Biot-Savart. Set up coordinates along the wire, write each element's contribution as dB=μ04πIdxsinθr2dB = \frac{\mu_0}{4\pi}\frac{I\,dx\sin\theta}{r^2}, notice that every element's field points the same way at the field point so the vector sum becomes a scalar one, express sinθ\sin\theta and rr in terms of xx and the perpendicular distance aa, and integrate from minus infinity to infinity. You arrive at B=μ0I2πaB = \frac{\mu_0 I}{2\pi a}, the same answer, after roughly a page.

Same result, wildly different effort, which is the whole argument for learning Ampere's law at all. And the reason the effort differs is worth naming: Biot-Savart never used the symmetry. It rebuilt the answer element by element, and the symmetry only showed up at the end as an integral that happened to be doable. Ampere's law uses the symmetry at the start, as an argument about what the field can possibly look like, and never integrates anything.

One caution. Because the wire example works both ways, it is tempting to conclude that Ampere's law is always available and just harder to see. It is not. The next section is the counterexample.

The case that separates them: the centre of a circular loop

Bend the wire into a circle of radius RR and ask for the field at the centre. Now try Ampere's law.

What closed path has B\vec{B} constant along it and parallel to it? Not a circle in the plane of the loop, because the field there is perpendicular to the plane, not tangent to any circle drawn in it. Not a circle around the wire itself, because that circle passes through regions where the other parts of the loop contribute differently. There is no usable Amperian loop, so Ampere's law is still true and gives you nothing.

Biot-Savart, on the other hand, finishes almost instantly, and for a specific reason: at the centre of the loop, every element dd\vec{\ell} is perpendicular to its r^\hat{r}, so d×r^=d\lvert d\vec{\ell} \times \hat{r} \rvert = d\ell with no sine to carry, and every element is the same distance RR away. The integral reduces to d=2πR\int d\ell = 2\pi R, and you get

Bcentre of loop=μ0I2RB_{\text{centre of loop}} = \frac{\mu_0 I}{2R}

which the CED prints as a derived equation under essential knowledge 12.3.A.3. Worked example two does the arithmetic.

The same argument, run over a fraction of a circle instead of a whole one, handles the arc case on the CED's list: a semicircular arc contributes half as much, a quarter arc a quarter as much, because the only thing the integral counted was arc length. That gives you a family of answers with no new work, and no version of Ampere's law reaches any of them.

So the honest summary is not that Ampere's law is a faster Biot-Savart. It is that Ampere's law solves a narrow set of problems almost for free and is unavailable outside it, while Biot-Savart solves everything at a price.

What the C: E&M equation sheet prints

Everything in this comparison sits on one page, the Electricity and Magnetism sheet, which is one of the four sheets in the C: E&M booklet alongside the constants page, the mechanics page, and the geometry, vectors, calculus and identities page.

From the magnetism block:

  • dB=μ04πI(d×r^)r2d\vec{B} = \frac{\mu_0}{4\pi}\frac{I(d\vec{\ell} \times \hat{r})}{r^2}, the Biot-Savart law, in differential form, for one element
  • Bd=μ0Ienc\oint \vec{B} \cdot d\vec{\ell} = \mu_0 I_{\mathrm{enc}}, Ampere's law
  • Bsol=μ0nIB_{\mathrm{sol}} = \mu_0 n I, the solenoid field, where nn is turns per unit length
  • FB=I(d×B)\vec{F}_B = \int I(d\vec{\ell} \times \vec{B}), the force on a current-carrying wire, which is a different integral and is easy to confuse with Biot-Savart because it has the same shape
  • BdA=0\oint \vec{B} \cdot d\vec{A} = 0, Gauss's law for magnetism

The constants page prints μ0=4π×107 (Tm)/A\mu_0 = 4\pi \times 10^{-7} \ \mathrm{(T \cdot m)/A}. In practice, carry μ04π=1.0×107\frac{\mu_0}{4\pi} = 1.0 \times 10^{-7} and μ02π=2.0×107\frac{\mu_0}{2\pi} = 2.0 \times 10^{-7} in your head; both appear constantly and both are exact to the sheet's precision.

Three observations that repay a second look.

Biot-Savart is printed as dBd\vec{B}, not B\vec{B}. The sheet is handing you an integrand. Nothing on the sheet performs the integral for you, which is the sheet's way of saying that the setup is the graded work.

Bsol=μ0nIB_{\mathrm{sol}} = \mu_0 n I is printed as a finished result. The CED reaches it as a derived equation under essential knowledge 12.4.A.1.iii, in the Ampere's law topic, but the sheet gives you the answer outright. So the solenoid is the one Ampere case you can quote rather than derive.

The cross product magnitude rule is not on this page. A×B=ABsinθ\lvert \vec{A} \times \vec{B} \rvert = AB\sin\theta is printed on the fourth sheet, in the vectors block, alongside the dot product and the component form of vector addition. If you are doing Biot-Savart by hand and want the sine, that is where it lives; the vector operations reference collects that block.

Neither law appears on the AP Physics 2 sheet. That course prints B=μ0I2πrB = \frac{\mu_0 I}{2\pi r} as a bare result, which is the answer Ampere's law gives for a long wire, handed over without the law.

When it costs a mark

Trying Ampere's law on a loop or an arc. Writing B(2πR)=μ0IB(2\pi R) = \mu_0 I for the centre of a circular loop gives μ0I2πR\frac{\mu_0 I}{2\pi R}, which is off from the correct μ0I2R\frac{\mu_0 I}{2R} by a factor of π\pi. It looks like a plausible answer, and the step that fails is the unstated claim that BB is constant and tangent along that circle.

Losing the direction because Biot-Savart's cross product was treated as a product. d×r^d\vec{\ell} \times \hat{r} is a vector perpendicular to both. If you compute magnitudes only and never say which way the contributions point, you cannot know whether they add or cancel, and on the axis of a loop they partly cancel.

Confusing dB=μ04πI(d×r^)r2d\vec{B} = \frac{\mu_0}{4\pi}\frac{I(d\vec{\ell} \times \hat{r})}{r^2} with FB=I(d×B)\vec{F}_B = \int I(d\vec{\ell} \times \vec{B}). One is the field a current makes; the other is the force a field puts on a current. Both are printed within four lines of each other on the sheet and both contain Id×I\,d\vec{\ell} \times something. Read which vector is inside the cross product.

Forgetting that r^\hat{r} points from the source element to the field point. Reversing it flips the sign of every contribution, which flips the direction of the answer while leaving its magnitude right.

Using nn as the number of turns in the solenoid formula. In Bsol=μ0nIB_{\mathrm{sol}} = \mu_0 n I, the sheet's symbol list defines nn as the number of loops per unit length, while NN is the total number of loops. A solenoid with 500 turns over 0.25 m0.25 \ \mathrm{m} has n=2000 m1n = 2000 \ \mathrm{m^{-1}}, and using 500 understates the field by a factor of four.

Where these sit in the course

The Biot-Savart law is Topic 12.3 and Ampere's law is Topic 12.4, consecutive and closing topics of Unit 12, Magnetic Fields and Electromagnetism, which the CED weights at 10 to 20 percent of the multiple-choice section over roughly 10 to 20 class periods.

The ordering matches Unit 8's. There, the integral form of Coulomb's law comes in Topic 8.4 and Gauss's law arrives in 8.6 as the shortcut. Here, Biot-Savart comes in 12.3 and Ampere's law arrives in 12.4 as the shortcut. In both units the labour-intensive law is taught first, because the shortcut only makes sense once you know what it is short for.

Essential knowledge 12.3.A.2 is worth reading before either calculation: the magnetic field vectors around a small segment of current-carrying wire are tangent to concentric circles centred on that wire, and the field has no component toward, away from, or parallel to the segment. That single sentence is the geometric fact both laws are built on, and it is why a magnetic field can never be handled by a closed-surface argument the way an electric field can. The structural comparison is Gauss's law vs Ampere's law.

What comes next in the course uses the output of both. Unit 13 takes these fields, pushes them through a loop as magnetic flux, and asks what happens when the flux changes.

A long straight wire, by Ampere and by Biot-Savart

A long straight wire carries I=12 AI = 12 \ \mathrm{A}. (a) Use Ampere's law to find the magnitude of the magnetic field at a perpendicular distance r=0.060 mr = 0.060 \ \mathrm{m} from the wire. (b) Set up the same calculation with the Biot-Savart law and confirm it gives the same expression. Use μ0=4π×107 (Tm)/A\mu_0 = 4\pi \times 10^{-7} \ \mathrm{(T \cdot m)/A}.

  1. (a) Symmetry argument first. Rotating about the wire or sliding along it changes nothing, and essential knowledge 12.3.A.2 says the field is tangent to circles centred on the wire. So BB is constant along a circle of radius rr and points along it.

  2. The loop integral collapses: Bd=B(2πr)\oint \vec{B} \cdot d\vec{\ell} = B(2\pi r), with Ienc=12 AI_{\mathrm{enc}} = 12 \ \mathrm{A}.

  3. B(2πr)=μ0IB(2\pi r) = \mu_0 I, so B=μ0I2πrB = \dfrac{\mu_0 I}{2\pi r}.

  4. Numerically, μ02π=2.0×107\dfrac{\mu_0}{2\pi} = 2.0 \times 10^{-7}, so B=(2.0×107)120.060=(2.0×107)(200)=4.0×105 TB = (2.0 \times 10^{-7})\dfrac{12}{0.060} = (2.0 \times 10^{-7})(200) = 4.0 \times 10^{-5} \ \mathrm{T}.

  5. (b) Now Biot-Savart. Put the wire along the xx axis and the field point at perpendicular distance a=ra = r from the origin. An element at position xx is a distance x2+a2\sqrt{x^2+a^2} away.

  6. The cross product gives d×r^=dxsinθ\lvert d\vec{\ell} \times \hat{r} \rvert = dx\sin\theta, where θ\theta is the angle between the wire and the line to the field point, so sinθ=a/x2+a2\sin\theta = a/\sqrt{x^2+a^2}.

  7. Every element's contribution points the same way at the field point (out of the page, say), so the vector sum becomes a scalar integral: B=μ0I4πadx(x2+a2)3/2B = \dfrac{\mu_0 I}{4\pi}\displaystyle\int_{-\infty}^{\infty} \dfrac{a\,dx}{(x^2+a^2)^{3/2}}.

  8. That integral evaluates to 2/a2/a, giving B=μ0I4π2a=μ0I2πaB = \dfrac{\mu_0 I}{4\pi}\cdot\dfrac{2}{a} = \dfrac{\mu_0 I}{2\pi a}, identical to part (a).

  9. Same number, 4.0×105 T4.0 \times 10^{-5} \ \mathrm{T}, and about a page of extra work. Note also that the integral needed here is not one of the five printed on the C: E&M calculus table.

B=μ0I/(2πr)=4.0×105 TB = \mu_0 I/(2\pi r) = 4.0 \times 10^{-5} \ \mathrm{T}, circling the wire, by either route. Ampere's law reaches it in three lines because it uses the symmetry as an argument rather than rediscovering it inside an integral.

The centre of a loop and of an arc: Biot-Savart only

A circular loop of radius R=0.050 mR = 0.050 \ \mathrm{m} carries I=3.0 AI = 3.0 \ \mathrm{A}. (a) Find the magnetic field at the centre. (b) Explain why Ampere's law cannot be used. (c) Find the field at the centre of curvature of a semicircular arc of the same radius carrying the same current.

  1. (a) Apply Biot-Savart at the centre. Every element of the loop is the same distance RR from the centre, so r2=R2r^2 = R^2 comes out of the integral as a constant.

  2. Every element dd\vec{\ell} runs along the circle and r^\hat{r} points from it to the centre, so the two are perpendicular and d×r^=d\lvert d\vec{\ell} \times \hat{r} \rvert = d\ell exactly, with no sine factor to track.

  3. Every element's contribution points the same way, perpendicular to the plane of the loop, so the contributions add without any cancellation.

  4. B=μ0I4πR2d=μ0I4πR2(2πR)=μ0I2RB = \dfrac{\mu_0 I}{4\pi R^2}\displaystyle\int d\ell = \dfrac{\mu_0 I}{4\pi R^2}(2\pi R) = \dfrac{\mu_0 I}{2R}, which is the CED's derived equation for this case.

  5. Numerically, B=(4π×107)(3.0)2(0.050)=3.770×1060.10=3.77×105 TB = \dfrac{(4\pi \times 10^{-7})(3.0)}{2(0.050)} = \dfrac{3.770 \times 10^{-6}}{0.10} = 3.77 \times 10^{-5} \ \mathrm{T}, about 3.8×105 T3.8 \times 10^{-5} \ \mathrm{T}, perpendicular to the plane of the loop.

  6. (b) Ampere's law needs a closed path along which BB is constant and tangent. In the plane of the loop the field is perpendicular to the plane, so no circle drawn there is tangent to it, and there is no other candidate path. The law remains true and yields nothing.

  7. (c) For an arc, the only thing the integral counted was arc length. A semicircle has d=πR\int d\ell = \pi R instead of 2πR2\pi R, exactly half.

  8. Bsemicircle=μ0I4R=(4π×107)(3.0)4(0.050)=3.770×1060.20=1.88×105 TB_{\text{semicircle}} = \dfrac{\mu_0 I}{4R} = \dfrac{(4\pi \times 10^{-7})(3.0)}{4(0.050)} = \dfrac{3.770 \times 10^{-6}}{0.20} = 1.88 \times 10^{-5} \ \mathrm{T}, about 1.9×105 T1.9 \times 10^{-5} \ \mathrm{T}, half the full-loop value as expected.

Full loop: B=μ0I/(2R)=3.8×105 TB = \mu_0 I/(2R) = 3.8 \times 10^{-5} \ \mathrm{T}. Semicircular arc: B=μ0I/(4R)=1.9×105 TB = \mu_0 I/(4R) = 1.9 \times 10^{-5} \ \mathrm{T}. Ampere's law reaches neither, because no closed path has a constant tangential field.

A long solenoid: Ampere only

A long solenoid has 800800 turns per metre and carries I=2.5 AI = 2.5 \ \mathrm{A}. Find the magnetic field inside it, and say why the Biot-Savart law is the wrong tool here.

  1. Start from the modelling assumption the CED supplies in essential knowledge 12.4.A.1.ii: unless otherwise stated, all solenoids are assumed to be very long, with uniform magnetic fields inside and negligible magnetic fields outside.

  2. That assumption is what makes an Amperian rectangle work. Take a rectangle with one long side of length \ell running inside the solenoid parallel to its axis, the opposite long side outside, and two short sides crossing the windings.

  3. The outside side contributes nothing, because the field there is negligible. The two short sides contribute nothing, because the field is perpendicular to them. Only the inside side contributes, giving Bd=B\oint \vec{B} \cdot d\vec{\ell} = B\ell.

  4. The current threading that rectangle is one II for every turn it crosses, which is nn\ell turns, so Ienc=nII_{\mathrm{enc}} = nI\ell.

  5. Ampere's law: B=μ0nIB\ell = \mu_0 n I \ell, and the length cancels, leaving B=μ0nIB = \mu_0 n I, the equation printed on the sheet as BsolB_{\mathrm{sol}}.

  6. Numerically, B=(4π×107)(800)(2.5)=(1.2566×106)(2000)=2.51×103 TB = (4\pi \times 10^{-7})(800)(2.5) = (1.2566 \times 10^{-6})(2000) = 2.51 \times 10^{-3} \ \mathrm{T}, about 2.5×103 T2.5 \times 10^{-3} \ \mathrm{T}.

  7. Note what is not in the answer: the radius of the solenoid, and where inside it you are standing. The field is uniform across the whole interior, which is what makes solenoids useful.

  8. Why not Biot-Savart? Because a solenoid is a stack of loops, and adding their axial contributions means integrating the on-axis loop result over the length of the stack, then arguing separately that the off-axis field matches. It is a much longer route to the same three-symbol answer, and it is not on the CED's Biot-Savart list.

B=μ0nI=2.5×103 TB = \mu_0 n I = 2.5 \times 10^{-3} \ \mathrm{T}, uniform and along the axis inside the solenoid, negligible outside. Use nn in turns per metre, not the total number of turns.

Frequently asked questions

What is the difference between Ampere's law and the Biot-Savart law?

The Biot-Savart law gives the magnetic field contributed by one short segment of current-carrying wire, as a cross product of the segment with the unit vector toward the field point, divided by the square of the distance. You integrate it along the whole current path. Ampere's law relates the line integral of the magnetic field around a closed loop to the current enclosed by that loop, and gives the field directly when the geometry is symmetric enough for the field to be constant along the loop. Biot-Savart works on any current path and costs an integral; Ampere's law works on a short list of shapes and costs almost nothing.

When should I use Ampere's law instead of Biot-Savart?

Use Ampere's law when the current has a symmetry that makes the magnetic field constant in magnitude and tangent along a closed path you can draw. The AP Physics C: Electricity and Magnetism CED names the cases in the Topic 12.4 boundary statement: long straight wires, long solenoids carrying currents, and conductive slabs or cylindrical conductors carrying a current density. For a circular loop, a semicircular arc or a finite segment, no such path exists, and the Biot-Savart law is the tool.

Why can't Ampere's law find the field at the centre of a circular loop?

Because there is no closed path through that region along which the magnetic field has constant magnitude and points along the path. In the plane of the loop the field is perpendicular to the plane, so no circle drawn in that plane is tangent to it. Ampere's law is still perfectly true there; it simply cannot be rearranged to isolate B. The Biot-Savart law handles the case in a few lines, giving B equals mu zero I over two R, which the CED prints as a derived equation under essential knowledge 12.3.A.3.

Is the Biot-Savart law the magnetic version of Coulomb's law?

In the way it is used, yes. Coulomb's law gives the electric field of one point charge and you superpose contributions to handle a distribution; the Biot-Savart law gives the magnetic field of one current element and you integrate contributions along the wire. Each element's field falls off as one over distance squared, exactly like a point charge. The difference is that the Biot-Savart contribution is a cross product, so its direction is perpendicular to both the current element and the line to the field point rather than along that line.

Do Ampere's law and the Biot-Savart law ever give different answers?

No. For steady currents they describe the same magnetic field, and where both can be applied they agree exactly. The standard demonstration is the long straight wire: Ampere's law gives B equals mu zero I over two pi r in three lines, and the Biot-Savart integral over an infinite wire gives the same expression after about a page of work. Any disagreement means one of them was misapplied, most often by assuming a symmetry the geometry does not have.

What is n in the solenoid formula B equals mu zero n I?

It is the number of loops per unit length, not the total number of loops. The symbol list on the AP Physics C: Electricity and Magnetism equation sheet defines n as the number of loops per unit length and N as the number of loops, and the two appear in different equations on the same page. A solenoid with 500 turns wound over 0.25 metres has n equal to 2000 per metre. Using 500 instead would understate the field by a factor of four.

Are Ampere's law and the Biot-Savart law in AP Physics 2?

Neither appears in the AP Physics 2 CED or on its equation sheet. What that course prints is the finished result for a long straight wire, B equals mu zero I over two pi r, which is what Ampere's law produces for that geometry. Both laws are AP Physics C: Electricity and Magnetism content, appearing as Topic 12.3 for Biot-Savart and Topic 12.4 for Ampere's law, in Unit 12.