https://artofproblemsolving.com/wiki/api.php?action=feedcontributions&user=ThinkFlow&feedformat=atomAoPS Wiki - User contributions [en]2024-03-29T07:11:43ZUser contributionsMediaWiki 1.31.1https://artofproblemsolving.com/wiki/index.php?title=LaTeX:Math&diff=32550LaTeX:Math2009-08-03T22:05:55Z<p>ThinkFlow: /* Aligning Equations (align) */</p>
<hr />
<div>{{Latex}}<br />
<br />
This article will detail how to work with math mode in LaTeX and how to display equations, formulas, and mathematical expressions in general.<br />
<br />
==Math Mode==<br />
LaTeX uses a special math mode to display mathematics. To place something written in TeX in '''math mode''', use <nowiki>$</nowiki> signs to enclose the math you want to display. For example, open a new source file in TeXnicCenter and type or copy/paste the following: <br />
<br />
<br />
<pre><nowiki><br />
\documentclass{article}<br />
\begin{document}<br />
The solution to $\sqrt{x} = 5$ is $x=25$.<br />
\end{document} <br />
</nowiki></pre><br />
Save the document (press Ctrl-S or click File, then Save) as 'mymath' (don't include the quote marks in the name) in a folder of your choice. The file will appear in your folder as 'mymath.tex.'<br />
<br />
Compile the document just as you compiled your [[LaTeX:Basics|first document]]. When you view the output file, you should see<br />
<br />
[[Image:Mathsamp1.gif]]<br />
<br />
If you remove the <nowiki>$</nowiki> symbols from your source file then try to compile, you should get 'Missing <nowiki>$</nowiki> inserted' error messages in the Output window of TeXnicCenter (try it and see - you may have to scroll up in the Output window to see the errors).<br />
<br />
Nearly all mathematical items, such as variables, expressions, equations, etc., should be written in math mode. In fact, most math will generate errors if you don't remember to put it in math mode.<br />
<br />
== Display Math ==<br />
As we saw above, when using <nowiki>$</nowiki>math stuff here<nowiki>$</nowiki> to typeset math, the resulting math expression appears right in the text at the location of the <nowiki>$</nowiki>...<nowiki>$</nowiki>. Sometimes we want to break some of the math out of the text and give it its own special line. To do so, we use <nowiki>\[</nowiki>math stuff here<nowiki>\]</nowiki> or <nowiki>$$math stuff here$$</nowiki> to put the math text in display math mode:<br />
<pre><nowiki><br />
\documentclass{article}<br />
\begin{document}<br />
The solution to \[\sqrt{x} = 5\] is \[x=25.\]<br />
\end{document} <br />
</nowiki></pre><br />
After you compile this and view it, you should see:<br />
<br />
[[Image:Mathsamp2.gif]]<br />
<br />
Notice that the equations are on their own lines and are centered. As a matter of style, usually we put this '''display math''' on their own lines in the source file, like this:<br />
<pre><nowiki><br />
\documentclass{article}<br />
\begin{document}<br />
The solution to<br />
\[<br />
\sqrt{x} = 5<br />
\]<br />
is<br />
\[<br />
x=25.<br />
\]<br />
\end{document} <br />
</nowiki></pre><br />
<br />
We can also use<br />
<br />
\begin{equation} math \end{equation}<br />
<br />
to display mathematics. This approach also creates a label, which we can refer to later if we like. Make sure you read our notes about referencing before using these labels for references - it's much better to use \label and \ref than to refer to the equations by number in your source file.<br />
<pre><nowiki><br />
\documentclass{article}<br />
\begin{document}<br />
\begin{equation}<br />
2+2=4<br />
\end{equation} <br />
\end{document} <br />
</nowiki></pre><br />
<br />
Notice the (1) out to the right when you compile the above. Once again, rather than typing (1) in your source file to refer to this equation, use LaTeX [[LaTeX:Layout|referencing]] commands.<br />
<br />
Generally, you'll only use \begin{equation} when you need the label.<br />
<br />
== Display Style (\<!-- -->displaystyle) ==<br />
Sometimes we have complicated expressions that we don't want to put on their own lines, but that doesn't render well with <nowiki>$</nowiki>...<nowiki>$</nowiki> mode. For example:<br />
<pre><nowiki><br />
\documentclass{article}<br />
\begin{document}<br />
Evaluate the sum $\sum_{i=0}^n i^3$.<br />
\end{document} <br />
</nowiki></pre><br />
gives us<br />
<br />
[[Image:Mathsamp3.gif]]<br />
<br />
That summation symbol is a little ugly. We can make it prettier by using \<!-- -->displaystyle:<br />
<pre><nowiki><br />
\documentclass{article}<br />
\begin{document}<br />
Evaluate the sum $\</nowiki><nowiki>displaystyle\sum\limits_{i=0}^n i^3$.<br />
\end{document} <br />
</nowiki></pre><br />
This gives us:<br />
<br />
[[Image:Mathsamp4.gif]]<br />
<br />
Notice that the summation symbol looks much nicer now - adding the \<!-- -->displaystyle at the beginning of your math (inside the <nowiki>$</nowiki>...<nowiki>$</nowiki>) will often make complicated math render more nicely. Note that it is not necessary to use \<!-- -->displaystyle when using display mode (<nowiki>\[ and \]</nowiki> or \begin{equation} and \end{equation}).<br />
<br />
== Aligning Equations (align) ==<br />
A pair of very useful tools for displaying equations well are the "align" and "align*" environments. They allow you to neatly align a string of equations:<br />
<pre><nowiki><br />
\documentclass{article}<br />
\usepackage{amsmath}<br />
\begin{document}<br />
\begin{align*}<br />
2x^2 + 3(x-1)(x-2) & = 2x^2 + 3(x^2-3x+2)\\<br />
&= 2x^2 + 3x^2 - 9x + 6\\<br />
&= 5x^2 - 9x + 6<br />
\end{align*}<br />
\end{document} <br />
</nowiki></pre><br />
Compiling this should give:<br />
<cmath><br />
\begin{align*}<br />
2x^2 + 3(x-1)(x-2) & = 2x^2 + 3(x^2-3x+2)\\<br />
&= 2x^2 + 3x^2 - 9x + 6\\<br />
&= 5x^2 - 9x + 6<br />
\end{align*} </cmath><br />
<br />
There are a few things to notice here. First, the align command requires that you use the package amsmath (and there's no reason to ''not'' use this package). Second, the * after align prevents line numbers from popping up after each line - try removing both of the *s from the source file and compile to see equation numbers. Next, notice that each line is of the form<br />
<pre>Math stuff & more math stuff \\</pre><br />
The & symbols separate the columns. There must be two columns (i.e. one & symbol). The \\ tells LaTeX that you are finished with this line and are on to the next. Notice that there's no \\ on the last line; the \end{align*} tells LaTeX that you're finished. As you see above, you can leave some columns blank. As a style issue, notice that we start a new line in our source file after each \\. We could run all the lines together, but that makes editing very difficult.<br />
<br />
Typically, we use relational symbols like =, >, or < immediately following the &; align ensures that these symbols are arranged into a vertical column as you see above. That's why we like align.<br />
<br />
Finally, notice that there are no <dollar/> symbols, <nowiki>$$ ... $$</nowiki>, or <nowiki>\[ ... \]</nowiki>, yet everything is rendered in math mode. This happens because align automatically puts everything in math mode - you don't need <dollar/>s or <nowiki>\[ ... \]</nowiki> tags.<br />
<br />
Finally, note that in an align environment, you can use the \nonumber command if you want only some lines to be numbered. For example,<br />
<pre><nowiki><br />
\documentclass{article}<br />
\usepackage{amsmath}<br />
\begin{document}<br />
\begin{align}<br />
2x^2 + 3(x-1)(x-2) & = 2x^2 + 3(x^2-3x+2)\\<br />
\nonumber &= 2x^2 + 3x^2 - 9x + 6\\<br />
&= 5x^2 - 9x + 6<br />
\end{align}<br />
\end{document} <br />
</nowiki></pre><br />
compiles to this:<br />
<cmath>\begin{align}<br />
2x^2 + 3(x-1)(x-2) & = 2x^2 + 3(x^2-3x+2)\\<br />
\nonumber &= 2x^2 + 3x^2 - 9x + 6\\<br />
&= 5x^2 - 9x + 6<br />
\end{align}</cmath><br />
<br />
==Additional Packages==<br />
The basic LaTeX program does not include all the math you'll want to use. In order to access all the math functions and symbols we will introduce in the guide pages, you'll have to include a number of packages. We include these packages by using the \usepackage command between the \documentclass line and the \begin{document} line, such as:<br />
<pre><nowiki><br />
\documentclass{article}<br />
\usepackage{amsmath}<br />
\begin{document}<br />
We can write more than just $x$ now.<br />
Now we can write things like $\binom{5}{3}$.<br />
\end{document}<br />
</nowiki></pre><br />
<br />
The package used above is part of the basic MiKTeX installation, so you don't have to download anything new to include them. Later, you may want to read more about [[LaTeX:Layout|how to include more packages]] and [[LaTeX:Packages|how you can create packages of your own]].<br />
<br />
Finally, one last point of style - notice in that last example that we put the x in math mode by writing <nowiki>$x$</nowiki> instead of just x. Try compiling with and without the x in math mode and you'll see why. Always put your math in math mode!<br />
<br />
If you find you want to do some math typesetting that you can't find on this page, or among our discussions of [[LaTeX:Symbols|symbols]] or [[LaTeX:Commands|commands]], try reading the [ftp://ftp.ams.org/pub/tex/doc/amsmath/amsldoc.pdf user's guide for the amsmath package], which contains some of the really fancy applications of the ams packages.<br />
<br />
==See Also==<br />
*[[LaTeX:Examples | Next: Examples]]<br />
*[[LaTeX:Basics | Previous: Basics]]</div>ThinkFlowhttps://artofproblemsolving.com/wiki/index.php?title=User:Gauss1181&diff=32091User:Gauss11812009-06-07T23:48:09Z<p>ThinkFlow: </p>
<hr />
<div>This user does not exist. <math>^{\text{\textit{[Citation needed]}}}</math></div>ThinkFlowhttps://artofproblemsolving.com/wiki/index.php?title=Talk:Shoelace_Theorem&diff=31529Talk:Shoelace Theorem2009-05-03T20:32:53Z<p>ThinkFlow: </p>
<hr />
<div>==Proof==<br />
Perhaps we can use induction? But I do not know how to prove it nicely for a triangle. --[[User:1=2|1=2]] 12:50, 16 June 2008 (UTC)<br />
<br />
I think that it has to do with the determinant of something; the form for a triangle is very similar to the determinant of a matrix. Volume 2 has a proof, if someone wants to copy it. [[User:ThinkFlow|ThinkFlow]] 20:32, 3 May 2009 (UTC)</div>ThinkFlowhttps://artofproblemsolving.com/wiki/index.php?title=2008_AMC_10B_Problems/Problem_9&diff=310522008 AMC 10B Problems/Problem 92009-03-30T23:08:30Z<p>ThinkFlow: Added answer "A" after "1"</p>
<hr />
<div>==Problem==<br />
<br />
A quadratic equation <math>ax^2 - 2ax + b = 0</math> has two real solutions. What is the average of these two solutions?<br />
<br />
<math>\mathrm{(A)}\ 1\qquad\mathrm{(B)}\ 2\qquad\mathrm{(C)}\ \frac ba\qquad\mathrm{(D)}\ \frac{2b}a\qquad\mathrm{(E)}\ \sqrt{2b-a}</math><br />
<br />
==Solution==<br />
<br />
Dividing both sides by <math>a</math>, we get <math>x^2 - 2x + b/a = 0</math>. By Vieta's formulas, the sum of the roots is <math>2</math>, therefore their average is <math>1\Rightarrow \boxed{A}</math>.<br />
<br />
==See also==<br />
{{AMC10 box|year=2008|ab=B|num-b=8|num-a=10}}</div>ThinkFlowhttps://artofproblemsolving.com/wiki/index.php?title=2001_AMC_12_Problems/Problem_24&diff=309462001 AMC 12 Problems/Problem 242009-03-23T17:57:51Z<p>ThinkFlow: fixed letter</p>
<hr />
<div>== Problem ==<br />
<br />
In <math>\triangle ABC</math>, <math>\angle ABC=45^\circ</math>. Point <math>D</math> is on <math>\overline{BC}</math> so that <math>2\cdot BD=CD</math> and <math>\angle DAB=15^\circ</math>. Find <math>\angle ACB</math>.<br />
<br />
<math><br />
\text{(A) }54^\circ<br />
\qquad<br />
\text{(B) }60^\circ<br />
\qquad<br />
\text{(C) }72^\circ<br />
\qquad<br />
\text{(D) }75^\circ<br />
\qquad<br />
\text{(E) }90^\circ<br />
</math><br />
<br />
== Solution ==<br />
<br />
<asy><br />
unitsize(2cm);<br />
defaultpen(0.8);<br />
pair A=(0,0), B=(4,0), D=intersectionpoint( A -- (dir(15)*100), B -- (B+100*dir(135)) ), C=B+3*(D-B);<br />
pair ortho=rotate(-90)*(D-A);<br />
pair E=intersectionpoint(A--D, C--(C+10*ortho));<br />
draw(A--B--C--cycle); <br />
draw(A--D);<br />
draw(C--E, dashed);<br />
draw(B--E, dashed);<br />
draw( rightanglemark(C,E,D) );<br />
draw( scale(2)*anglemark(B,A,D) );<br />
draw( anglemark(D,B,A) );<br />
label("$15^\circ$",(0.6,0),5*ENE);<br />
label("$45^\circ$",B,5*WNW,UnFill);<br />
label("$A$",A,SW);<br />
label("$B$",B,SE);<br />
label("$C$",C,N);<br />
label("$D$",D,NE);<br />
label("$E$",E,S);<br />
</asy><br />
<br />
We start with the observation that <math>\angle ADB = 180^\circ - 15^\circ - 45^\circ = 120^\circ</math>, and <math>\angle ADC = 15^\circ + 45^\circ = 60^\circ</math>.<br />
<br />
We can draw the height <math>CE</math> from <math>C</math> onto <math>AD</math>. In the triangle <math>CED</math>, we have <math>\frac {ED}{CD} = \cos EDC = \cos 60^\circ = \frac 12</math>. Hence <math>ED = CD/2</math>.<br />
<br />
By the definition of <math>D</math>, we also have <math>BD=CD/2</math>, therefore <math>BD=DE</math>. This means that the triangle <math>BDE</math> is isosceles, and as <math>\angle BDE=120^\circ</math>, we must have <math>\angle BED = \angle EBD = 30^\circ</math>. <br />
<br />
Then we compute <math>\angle ABE = 45^\circ - 30^\circ = 15^\circ</math>, thus <math>\angle ABE = \angle BAE</math> and the triangle <math>ABE</math> is isosceles as well. Hence <math>AE=BE</math>.<br />
<br />
Now we can note that <math>\angle DCE = 180^\circ - 90^\circ - 60^\circ = 30^\circ</math>, hence also the triangle <math>EBC</math> is isosceles and we have <math>BE=CE</math>.<br />
<br />
Combining the previous two observations we get that <math>AE=EC</math>, and as <math>\angle ACE=90^\circ</math>, this means that <math>\angle CAE = \angle ACE = 45^\circ</math>.<br />
<br />
Finally, we get <math>\angle ACB = \angle ACE + \angle ECD = 45^\circ + 30^\circ = \boxed{75^\circ}</math>.<br />
<br />
== See Also ==<br />
<br />
{{AMC12 box|year=2001|num-b=23|num-a=25}}</div>ThinkFlowhttps://artofproblemsolving.com/wiki/index.php?title=2002_AMC_12A_Problems/Problem_20&diff=307722002 AMC 12A Problems/Problem 202009-03-17T17:08:01Z<p>ThinkFlow: spelling correction</p>
<hr />
<div>== Problem ==<br />
<br />
Suppose that <math>a</math> and <math>b</math> are digits, not both nine and not both zero, and the repeating decimal <math>0.\overline{ab}</math> is expressed as a fraction in lowest terms. How many different denominators are possible?<br />
<br />
<math><br />
\text{(A) }3<br />
\qquad<br />
\text{(B) }4<br />
\qquad<br />
\text{(C) }5<br />
\qquad<br />
\text{(D) }8<br />
\qquad<br />
\text{(E) }9<br />
</math><br />
<br />
== Solution ==<br />
<br />
The repeating decimal <math>0.\overline{ab}</math> is equal to <br />
<cmath><br />
\frac{ab}{100} + \frac{ab}{10000} + \cdots<br />
=<br />
ab\cdot\left(\frac 1{10^2} + \frac 1{10^4} + \cdots \right)<br />
= <br />
ab \cdot \frac 1{99}<br />
=<br />
\frac{ab}{99}<br />
</cmath><br />
<br />
When expressed in lowest terms, the denominator of this fraction will always be a divisor of the number <math>99 = 3\cdot 3\cdot 11</math>. This gives us the possibilities <math>\{1,3,9,11,33,99\}</math>. As <math>a</math> and <math>b</math> are not both nine and not both zero, the denumerator <math>1</math> can not be achieved, leaving us with <math>\boxed{5}</math> possible denumerators.<br />
<br />
(The other ones are achieved e.g. for <math>ab</math> equal to <math>33</math>, <math>11</math>, <math>9</math>, <math>3</math>, and <math>1</math>, respectively.)<br />
<br />
== See Also ==<br />
<br />
{{AMC12 box|year=2002|ab=A|num-b=19|num-a=21}}</div>ThinkFlowhttps://artofproblemsolving.com/wiki/index.php?title=2000_AMC_10_Problems/Problem_17&diff=307572000 AMC 10 Problems/Problem 172009-03-16T22:16:57Z<p>ThinkFlow: /* Solution */</p>
<hr />
<div>==Problem==<br />
<br />
Boris has an incredible coin changing machine. When he puts in a quarter, it returns five nickels; when he puts in a nickel, it returns five pennies; and when he puts in a penny, it returns five quarters. Boris starts with just one penny. Which of the following amounts could Boris have after using the machine repeatedly?<br />
<br />
<math>\mathrm{(A)}</math> <dollar/><math>3.63</math> <br />
<br />
<math>\mathrm{(B)}</math> <dollar/><math>5.13</math><br />
<br />
<math>\mathrm{(C)}</math> <dollar/><math>6.30</math> <br />
<br />
<math>\mathrm{(D)}</math> <dollar/><math>7.45</math> <br />
<br />
<math>\mathrm{(E)}</math> <dollar/><math>9.07</math><br />
<br />
==Solution==<br />
<br />
Consider what happens each time he puts a coin in. If he puts in a quarter, he gets five nickels back, so the amount of money he has doesn't change. Similarly, if he puts a nickel in the machine, he gets five pennies back and the money value doesn't change. However, if he puts a penny in, he gets five quarters back, increasing the amount of money he has by <math>124</math> cents. <br />
<br />
This implies that the only possible values, in cents, he can have are the ones one more than a multiple of <math>124</math>. Of the choices given, the only one is <math>\boxed{\text{D}}</math><br />
<br />
==See Also==<br />
<br />
{{AMC10 box|year=2000|num-b=16|num-a=18}}</div>ThinkFlowhttps://artofproblemsolving.com/wiki/index.php?title=2000_AMC_10_Problems/Problem_5&diff=307562000 AMC 10 Problems/Problem 52009-03-16T22:06:38Z<p>ThinkFlow: /* Solution */</p>
<hr />
<div>==Problem==<br />
<br />
Points <math>M</math> and <math>N</math> are the midpoints of sides <math>PA</math> and <math>PB</math> of <math>\triangle PAB</math>. As <math>P</math> moves along a line that is parallel to side <math>AB</math>, how many of the four quantities listed below change?<br />
<br />
(a) the length of the segment <math>MN</math><br />
<br />
(b) the perimeter of <math>\triangle PAB</math><br />
<br />
(c) the area of <math>\triangle PAB</math><br />
<br />
(d) the area of trapezoid <math>ABNM</math><br />
<br />
<asy><br />
draw((2,0)--(8,0)--(6,4)--cycle);<br />
draw((4,2)--(7,2));<br />
draw((1,4)--(9,4),Arrows);<br />
label("$A$",(2,0),SW);<br />
label("$B$",(8,0),SE);<br />
label("$M$",(4,2),W);<br />
label("$N$",(7,2),E);<br />
label("$P$",(6,4),N);<br />
</asy><br />
<br />
<math>\mathrm{(A)}\ 0 \qquad\mathrm{(B)}\ 1 \qquad\mathrm{(C)}\ 2 \qquad\mathrm{(D)}\ 3 \qquad\mathrm{(E)}\ 4</math><br />
<br />
==Solution==<br />
<br />
(a) Clearly <math>AB</math> does not change, and <math>MN=\frac{1}{2}AB</math>, so <math>MN</math> doesn't change either.<br />
<br />
(b) Obviously, the perimeter changes.<br />
<br />
(c) The area clearly doesn't change, as both the base <math>AB</math> and its corresponding height remain the same.<br />
<br />
(d) The bases <math>AB</math> and <math>MN</math> do not change, and neither does the height, so the trapezoid remains the same.<br />
<br />
Only <math>1</math> quantity changes, so the correct answer is <math>\boxed{\text{B}}</math>.<br />
<br />
==See Also==<br />
<br />
{{AMC10 box|year=2000|num-b=4|num-a=6}}</div>ThinkFlowhttps://artofproblemsolving.com/wiki/index.php?title=Divisibility_rules&diff=28420Divisibility rules2008-11-25T20:11:52Z<p>ThinkFlow: /* Divisibility Rule for 17 */</p>
<hr />
<div>These '''divisibility rules''' help determine when [[positive integer]]s are [[divisibility | divisible]] by particular other [[integer]]s. All of these rules apply for [[Base number| base-10]] ''only'' -- other bases have their own, different versions of these rules.<br />
<br />
<br />
== Divisibility Rule for 2 and Powers of 2 ==<br />
A number is divisible by <math>2^n</math> if and only if the last <math>{n}</math> digits of the number are divisible by <math>2^n</math>. Thus, in particular, a number is divisible by 2 if and only if its units digit is divisble by 2, i.e. if the number ends in 0, 2, 4, 6 or 8.<br />
<br />
[[Divisibility rules/Rule for 2 and powers of 2 proof | Proof]]<br />
<br />
== Divisibility Rule for 3 and 9==<br />
A number is divisible by 3 or 9 if and only if the sum of its digits is divisible by 3 or 9, respectively. Note that this does ''not'' work for higher powers of 3. For instance, the sum of the digits of 1899 is divisible by 27, but 1899 is not itself divisible by 27.<br />
<br />
[[Divisibility rules/Rule for 3 and 9 proof | Proof]]<br />
<br />
== Divisibility Rule for 5 and Powers of 5 ==<br />
A number is divisible by <math>5^n</math> if and only if the last <math>n</math> digits are divisible by that power of 5.<br />
<br />
[[Divisibility rules/Rule for 5 and powers of 5 proof | Proof]]<br />
<br />
== Divisibility Rule for 7 ==<br />
Rule 1: Partition <math>N</math> into 3 digit numbers from the right (<math>d_3d_2d_1,d_6d_5d_4,\dots</math>). The alternating sum (<math>d_3d_2d_1 - d_6d_5d_4 + d_9d_8d_7 - \dots</math>) is divisible by 7 if and only if <math>N</math> is divisible by 7.<br />
<br />
[[Divisibility rules/Rule 1 for 7 proof | Proof]]<br />
<br />
Rule 2: Truncate the last digit of <math>N</math>, double that digit, and subtract it from the rest of the number (or vice-versa). <math>N</math> is divisible by 7 if and only if the result is divisible by 7. <br />
<br />
[[Divisibility rules/Rule 2 for 7 proof | Proof]]<br />
<br />
== Divisibility Rule for 11 ==<br />
A number is divisible by 11 if and only if the [[alternating sum]] of the digits is divisible by 11.<br />
<br />
[[Divisibility rules/Rule for 11 proof | Proof]]<br />
<br />
== Divisibility Rule for 13 ==<br />
Rule 1: Truncate the last digit, multiply it by 4 and add it to the rest of the number. The result is divisible by 13 if and only if the original number was divisble by 13. This process can be repeated for large numbers, as with the second divisibility rule for 7. <br />
<br />
[[Divisibility rules/Rule 1 for 13 proof | Proof]]<br />
<br />
Rule 2: Partition <math>N</math> into 3 digit numbers from the right (<math>d_3d_2d_1,d_6d_5d_4,\dots</math>). The alternating sum (<math>d_3d_2d_1 - d_6d_5d_4 + d_9d_8d_7 - \dots</math>) is divisible by 13 if and only if <math>N</math> is divisible by 13.<br />
<br />
[[Divisibility rules/Rule 2 for 13 proof | Proof]]<br />
<br />
==Divisibility Rule for 17==<br />
Truncate the last digit, multiply it by 5 and subtract from the remaining leading number. The number is divisible if and only if the result is divisible. The process can be repeated for any number.<br />
<br />
[[Divisibility rules/Rule for 17 proof | Proof]]<br />
<br />
==Divisibility Rule for 19==<br />
Truncate the last digit, multiply it by 2 and add to the remaining leading number. The number is divisible if and only if the result is divisible. This can also be repeated for large numbers.<br />
<br />
[[Divisibility rules/Rule for 19 proof | Proof]]<br />
<br />
==More general note for primes ==<br />
For every [[prime number]] other than 2 and 5, there exists a rule similar to rule 2 for divisibility by 7. For a general prime <math>p</math>, there exists some number <math>q</math> such that an integer is divisible by <math>p</math> if and only if truncating the last digit, multiplying it by <math>q</math> and subtracting it from the remaining number gives us a result divisible by <math>p</math>. Divisibility rule 2 for 7 says that for <math>p = 7</math>, <math>q = 2</math>. The divisibility rule for 11 is equivalent to choosing <math>q = 1</math>. The divisibility rule for 3 is equivalent to choosing <math>q = -1</math>. These rules can also be found under the appropriate conditions in [[number base]]s other than 10. Also note that these rules exist in two forms: if <math>q</math> is replaced by <math>p - q</math> then subtraction may be replaced with addition. We see one instance of this in the divisibility rule for 13: we could multiply by 9 and subtract rather than multiplying by 4 and adding.<br />
<br />
== More general note for composites ==<br />
A number is divisible by <math>N</math>, where the [[prime factorization]] of <math>N</math> is <math>p_1^{e_1}p_2^{e_2}\cdots p_n^{e_n}</math>, if the number is divisible by each of <math>p_1^{e_1}, p_2^{e_2},\ldots, p_n^{e_n}</math>.<br />
<br />
=== Example ===<br />
Is 55682168544 divisible by 36?<br />
<br />
==== Solution ====<br />
First, we find the prime factorization of 36 to be <math>2^2\cdot 3^2</math>. Thus we must check for divisibility by 4 and 9 to see if it's divisible by 36.<br />
<br />
Since the last two digits, 44, of the number is divisible by 4, so is the entire number.<br />
<br />
To check for divisibility by 9, we look to see if the sum of the digits is divisible by 9. The sum of the digits is 54 which is divisible by 9.<br />
<br />
Thus, the number is divisible by both 4 and 9 and must be divisible by 36.<br />
<br />
== Example Problems ==<br />
* [[2006_AMC_10B_Problems/Problem_25 | 2006 AMC 10B Problem 25]]<br />
<br />
<br />
<br />
== Resources ==<br />
==== Books ====<br />
* The AoPS [http://www.artofproblemsolving.com/Books/AoPS_B_Item.php?page_id=10 Introduction to Number Theory] by [[Mathew Crawford]].<br />
* The [http://www.artofproblemsolving.com/Books/AoPS_B_Item.php?page_id=1 Art of Problem Solving] by [[Sandor Lehoczky]] and [[Richard Rusczyk]].<br />
<br />
==== Classes ====<br />
* [http://www.artofproblemsolving.com/Classes/AoPS_C_ClassesS.php#begnum AoPS Introduction to Number Theory Course]<br />
<br />
<br />
<br />
== See also ==<br />
* [[Number theory]]<br />
* [[Modular arithmetic]]<br />
* [[Math books]]<br />
* [[Mathematics competitions]]</div>ThinkFlow