##DESCRIPTION
## insert description here
##ENDDESCRIPTION

## DBsubject(Electricity)
## DBchapter(Magnetism)
## DBsection(Force on a Moving Charge in a Magnetic Field: Examples and Applications)
## Date(12 January 2018)
## Institution(Brock University)
## Author(Kyle Winch)
## Edited (Sara Hesse, May 30 2018)
## TitleText('College Physics')
## AuthorText('Urone et al')
## EditionText('2017')
## Section('22.5')
## Problem('006')
## KEYWORDS('units','voltage','energy','magnetic','field','speed')


DOCUMENT();
loadMacros( "PGbasicmacros.pl",
                     "MathObjects.pl",
	             "PGauxiliaryFunctions.pl",
	             "PGchoicemacros.pl",
	             "PGanswermacros.pl",
                     "PG_CAPAmacros.pl",
                     "BrockPhysicsMacros.pl",
                     "answerHints.pl"
);

TEXT(beginproblem());

$showPartialCorrectAnswers = 1;
$showHint =3;

$T = random(0.095,0.105,0.001);
$speed = random(3.95,4.05,0.01);
$D = random(0.95,1.05,0.01);
$E = ($speed*10**6)*$T;
$F = ($E*($D*10**-2))*10**-3;

BEGIN_TEXT
<strong>If you don't solve this problem correctly in $showHint tries, you can get a hint.</strong>

$PAR
A velocity selector in a mass spectrometer uses a \($T \, \(\textrm{T}\) magnetic field.
$PAR

a) What electric field strength is needed to select a speed of \($speed\) \(\times 10^{6} \, \(\textrm{m/s}\)?
$PAR

\{ans_rule(40)\} \(\textrm{V/m}\)

$PAR
END_TEXT

ANS(num_cmp("$E"));

BEGIN_TEXT
b) What is the voltage between the plates if they are separated by \($D \, \(\textrm{cm}\)?
$PAR

\{ans_rule(40)\} \(\textrm{kV}\)

$PAR
END_TEXT

ANS(num_cmp("$F"));

BEGIN_HINT
Remember to make appropriate unit conversions. 
END_HINT
Context()->normalStrings;



ENDDOCUMENT()
