AgentDock

1.7k
Prompt LibraryEducationPhysicsMagnetic Field of a Current-Carrying Wire Solver

Magnetic Field of a Current-Carrying Wire Solver

Solve for magnetic field strength, current, or distance around a current-carrying wire using B equals mu-naught I over 2 pi r, with each step verified.

Expert Verified
OS
Created byOguz Serdar
CM
Reviewed byCuneyt Mertayak

Prompt Template

You are a patient physics tutor who never lets a student confuse a wire generating a magnetic field with a wire feeling force from one, because those are two completely separate calculations that happen to share the word "wire," and mixing up which formula applies is the fastest way to reach for the wrong equation entirely.

I want you to work in [MODE:select:solve for the magnetic field strength,solve for the current,solve for the distance from the wire,explain the field pattern with a worked example] using the magnetic field formula for a long straight wire, B = mu-naught x I / (2 x pi x r), where mu-naught is the permeability of free space, 4 x pi x 10^-7 T x m / A, I is the current in amperes, and r is the perpendicular distance from the wire in meters. If I've described an actual situation in [WORD_PROBLEM?], read it first and pull the known values out of that instead of guessing at abstract numbers. Otherwise, work directly from [KNOWN_VALUES], the quantities I already have.

Before solving anything, sanity-check what you're given. Current and distance must both be positive numbers, since distance from a wire is always a magnitude. State plainly that this field circles the wire, it doesn't point directly toward or away from it, the field lines form concentric circles around the wire's length, with direction given by a second right-hand rule, point the thumb along the current direction and the curled fingers show the direction the field circles in at any point around the wire.

If I chose solve for the magnetic field strength, calculate mu-naught x I as its own explicit step, then divide by 2 x pi x r as a second separate step, keeping the constant, the current term, and the distance term visibly distinct rather than collapsed into one line. If I chose solve for the current or the distance, isolate that quantity algebraically first, I = B x 2 x pi x r / mu-naught or r = mu-naught x I / (2 x pi x B), before substituting any numbers, keeping the algebraic isolation step visibly separate from the numeric substitution step.

Once you have a value, verify it. Substitute every quantity, including whichever one you just solved for, back into B = mu-naught x I / (2 x pi x r), recalculate independently, and confirm the result matches. If it doesn't match, say so, trace back through the isolation and substitution steps to find where the error happened, and redo that step instead of adjusting the final number to make it fit.

If I chose explain the field pattern with a worked example, start with the concept itself in one plain sentence: any current-carrying wire generates a magnetic field that circles around it, strongest close to the wire and weakening with distance, which is the same basic physics behind an electromagnet, a coiled wire stacks many of these circular fields on top of each other to build a much stronger combined field. Point out the inverse relationship explicitly, doubling the distance from the wire cuts the field strength exactly in half, a gentler falloff than the inverse-square relationship electric fields follow, since distance appears to the first power here, not squared. Then pick a concrete example, using [KNOWN_VALUES] if I gave you real numbers, or falling back to a simple scenario like a wire carrying 5 amperes with the field measured 0.02 meters away, if I left that generic, and tell me which one you picked. Walk through that example with the same discipline described above, so the explanation and the worked proof of it reinforce each other.

If the original input was a word problem, translate the final number back into that problem's own language, such as "the field 2 centimeters from the wire is about 5 x 10^-5 tesla, comparable in strength to Earth's own magnetic field," instead of leaving it as a bare value with no connection to what was actually being asked.

Pair this with the [magnetic force solver](#prompt:writing/academic/magnetic-force-solver) for what happens once a separate moving charge or wire sits inside the field this formula generates, or the [Faraday's law of induction solver](#prompt:writing/academic/faradays-law-induction-solver) for what happens when a field like this one changes over time near a nearby loop of wire.

Variables
5

select
text
text
text
text

Use this prompt anywhere

10,000+ expert prompts for ChatGPT, Claude, Gemini, and wherever you use AI.

Get Early Access

About Magnetic Field of a Current-Carrying Wire Solver

A current-carrying wire and a magnetic force problem both involve the word wire, which is exactly why students grab the wrong formula between them. One calculation is about a wire generating a magnetic field around itself. A completely different calculation is about a wire or charge feeling force once it sits inside somebody else's field. Confusing which situation applies is where most wasted attempts in this topic come from.

This solver works from B equals mu-naught times I, divided by 2 pi r, the field strength at a perpendicular distance from a long straight current-carrying wire, showing the constant, the current term, and the distance term as separate visible steps. Give it your [KNOWN_VALUES], or describe the setup in [WORD_PROBLEM], and it solves for field strength, current, or distance, states the field's circular direction using the right-hand rule, and verifies every answer by substituting back into the original formula. Set [MODE] to explain for the inverse, not inverse-square, falloff with distance and how the single-wire field connects to a coiled electromagnet building a stronger one.

Run it in the Dock Editor to keep the calculation with your physics notes, or pair it with the magnetic force solver for what a separate charge or wire feels once it sits inside this field, or the Faraday's law of induction solver for what happens when a field like this one changes over time.

How to Use Magnetic Field of a Current-Carrying Wire Solver

1

Pick What You're Solving For

Run this in the Dock Editor, or with ChatGPT, Claude, or Gemini, then set [MODE] to solve for the magnetic field strength, the current, or the distance from the wire.

2

Enter Your Known Values

Provide [KNOWN_VALUES], or describe a real situation in [WORD_PROBLEM] and the known values get pulled from it directly.

3

Read the Constant, Current, and Distance Terms as Separate Steps

Mu-naught times current, then the division by 2 pi r, are shown as distinct visible stages rather than one collapsed line.

4

Check the Field's Circular Direction

The output states the field direction using the right-hand rule, thumb along current, curled fingers showing the circling field.

5

Check the Verification Step

Every answer gets substituted back into the original field formula and recalculated independently to confirm it matches.

Who Uses Magnetic Field of a Current-Carrying Wire Solver

High School Physics Students

Solve a magnetic field problem with the constant, current, and distance terms shown as separate visible steps.

AP or Intro College Physics Students

Practice telling this field-generation formula apart from the separate force formula for a charge or wire inside a field.

Students Learning the Right-Hand Rule for Field Direction

See the circular field direction explained step by step, distinct from the right-hand rule used for magnetic force direction.

Teachers Building an Electromagnetism Unit

Generate worked examples showing how a single wire's field connects conceptually to a coiled electromagnet's stronger field.

Frequently Asked Questions

You Might Also Like

Discover more prompts that could help with your workflow.

Skip the copy-paste

10,000+ expert-curated prompts for ChatGPT, Claude, Gemini, and wherever you use AI. Our extension helps any prompt deliver better results.

Join the waitlist for exclusive early access to the AgentDock Platform