% Written By Enoch Yu
% Downloaded from archive.enochyu.com

\documentclass{article}
\usepackage{graphicx}
\usepackage{amsmath,amsthm,amssymb}
\usepackage[font=small,labelfont=bf]{caption}
\usepackage{tikz}
\usetikzlibrary{calc, angles, quotes, shapes.geometric, decorations.pathreplacing}
\usepackage{tkz-euclide}
\usepackage[inline]{asymptote}
\usepackage{float}
\usepackage[margin=1in]{geometry}
\usepackage{gensymb}
\usepackage[normalem]{ulem}
\usepackage{hyperref}
\hypersetup{
    colorlinks=true,
    linkcolor=blue,
    filecolor=magenta,      
    urlcolor=cyan,
    pdftitle={Problem Set 18},
    pdfpagemode=FullScreen,
}
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhead[R]{Enoch Yu}
\pagenumbering{gobble}
\usepackage{enumitem}
\newtheorem{theorem}{Theorem}[section]
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem*{lemma*}{Lemma}
\newtheorem{sublemma}{Lemma}[section]
\newtheorem{proposition}{Proposition}
\newtheorem{corollary}{Corollary}[theorem]
\newenvironment{solution}{\begin{trivlist}\item[]{\bf Solution}}{\qed \end{trivlist}}
\newcommand{\verteq}{\rotatebox{90}{$\;\;=\;\;$}}
\newcommand*\circled[1]{\tikz[baseline=(char.base)]{
            \node[shape=circle,draw,inner sep=1pt] (char) {#1};}}
\newcommand{\triangled}[1]{\tikz[baseline=(char.base)]{
            \node[shape=regular polygon, regular polygon sides=3, draw, inner sep=0.2pt] (char) {#1};}}
\newcommand{\curlyuline}[1]{%
  \tikz[baseline=(X.base)]{
    \node[inner sep=0pt,outer sep=0pt] (X) {$#1$};
    \draw[decorate,decoration={brace,amplitude=4pt,mirror,raise=2pt}] (X.south west) -- (X.south east);
  }%
}

\title{Problem Set 18}
\author{Enoch Yu}
\date{June 2025}

\begin{document}

\section*{Problem}
A polynomial $f(x)$ leaves a remainder of $x^2 + x + 1$ when divided by $(x - 1)^3$, and a remainder of $3x + 2$ when divided by $(x - 2)^2$. What is the remainder when $f(x)$ is divided by $(x - 1)^2(x - 2)$?
\begin{solution}
\\\\
\textbf{Key Word} Irreducible Formula
\\\\
First of all, let's try writing what we know.
\begin{align*}
    f(x) 
        &= (x - 1)^3 Q(x) + (x^2 + x + 1) 
            && \Rightarrow \quad f(1) = 3 \\[1.5ex]
        &= (x - 2)^2 Q'(x) + (3x + 2) 
            && \Rightarrow \quad f(2) = 8 \\[1.5ex]
        &= (x - 1)^2 (x-2) Q''(x) + (a x^2 + b x + c)
\end{align*}
What can we do? First, we know that we have $(x - 1)^2$ in our third form and $(x - 1)^3$ in our first one. Hmm... Can we utilize them? Let's manipulate our first form first.
\[
f(x) = (x - 1)^2 \big[ (x - 1) Q(x) + 1 \big] + 3x
\]
Knowing this, can we also change the form of our third equation?
\begin{align*}
    f(x)
    &= (x - 1)^2 \big[ (x-2) Q''(x) + \uwave{\quad\quad}\  \big] + 3x \\
    &= (x - 1)^2 \big[ (x-2) Q''(x) + a \big] + 3x
\end{align*}
In other words, $a x^2 + b x + c = a(x - 1)^2 + 3x$. Because we know that $f(2) = 8$, $a = 2$. Yay! We got our remainder!! Substitute $2$ for $a$, and the remainder comes out to be $\boxed{2x^2 - x + 2}$.
\end{solution}

\section*{Problem}
Factor $2x^4 - 3x^3y + x^2y^2 - 8xy^3 + 4y^4$.
\begin{solution}
\\\\
\textbf{Key Word} Treating a Variable as 1
\\\\
\textcolor{red}{GENERAL RULE OF THUMB: If you need to factor a complex polynomial with two variable, treat one variable as one, and substitute that again.}
\\\\
Let $y = 1$.
\begin{align*}
    2x^4 - 3x^3 + x^2 - 8x + 4
    &= (x - 2)(2x^3 + x^2 + 3x - 2) \\
    &= (x - 2)(2x - 1)(x^2 + x + 2) \\
    &\Rightarrow \boxed{(x - 2y)(2x - y)(x^2 + xy + 2y^2)}
\end{align*}
\end{solution}

\newpage
\section*{Problem}
For the polynomial $P(x) = x^5 + x^4 + x^3 + x^2 + x + 1$, find the remainder when $P(x^6)$ is divided by $P(x)$.
\begin{solution}
\\\\
\textbf{Key Word} $x^n - 1 = (x - 1)(x^{n-1} + x^{n-2} + \dots + x + 1$
\\\\
First, we know that $x^6 - 1 = (x - 1)(x^5 + x^4 + x^3 + x^2 + x + 1)$. We also know that 30, 24, 18, 12 and 6 are multiples of 6. Can we use that?
\begin{align*}
    P(x^6)
    &= (x^{30} - 1) \quad
        &&\textcolor{red}{(x^6 - 1)(x^{24} + x^{18} + x^{12} + x^{6} + 1)} \\
    &+ (x^{24} - 1) \quad
        &&\textcolor{red}{(x^6 - 1)(x^{18} + x^{12} + x^{6} + 1)} \\
    &+ (x^{18} - 1) \quad
        &&\textcolor{red}{(x^6 - 1)(x^{12} + x^{6} + 1)} \\
    &+ (x^{12} - 1) \quad
        &&\textcolor{red}{(x^6 - 1)(x^{6} + 1)} \\
    &+ (x^{6} - 1) \quad
        &&\textcolor{red}{(x^6 - 1)(1)} \\
    &+ 6
\end{align*}
Therefore, the remainder is $\boxed{6}$.
\end{solution}

\section*{2021 Fall AMC 12A Problem 7}
A school has $100$ students and $5$ teachers. In the first period, each student is taking one class, and each teacher is teaching one class. The enrollments in the classes are $50, 20, 20, 5,$ and $5$. Let $t$ be the average value obtained if a teacher is picked at random and the number of students in their class is noted. Let $s$ be the average value obtained if a student was picked at random and the number of students in their class, including the student, is noted. What is $t-s$?
\\\\
$\textbf{(A)}\ {-}18.5  \qquad \textbf{(B)}\ {-}13.5 \qquad \textbf{(C)}\ 0 \qquad \textbf{(D)}\ 13.5 \qquad \textbf{(E)}\ 18.5$
\begin{solution}
\\\\
\textbf{Key Word} Expected Value
\\\\
\begin{align*}
    t
    &= 50\cdot\frac{1}{5} + 20\cdot\frac{1}{5} + 20\cdot\frac{1}{5} + 5\cdot\frac{1}{5} + 5\cdot\frac{1}{5} \\
    &= 10 + 4 + 4 + 1 + 1 \\
    &= 20 \\
    s
    &= 50\cdot\frac{50}{100} + 20\cdot\frac{20}{100} + 20\cdot\frac{20}{100} + 5\cdot\frac{5}{100} + 5\cdot\frac{5}{100} \\
    &= 25 + 4 + 4 + 0.25 + 0.25 \\
    &= 33.5
    \\\\
    \therefore t - s &= 20 - 33.5 = \boxed{\textbf{(B)}\ {-}13.5}
\end{align*}
\end{solution}

\newpage
\section*{2021 Fall AMC 12B Problem 21}
For real numbers $x$, let
\[
P(x) = 1 + \cos(x) + i\sin(x) - \cos(2x) - i\sin(2x) + \cos(3x) + i\sin(3x)
\]
where $i = \sqrt{-1}$. For how many values of $x$ with $0\leq x<2\pi$ does\[P(x)=0?\]
\\\\
$\textbf{(A)}\ 0 \qquad \textbf{(B)}\  1 \qquad \textbf{(C)}\  2 \qquad \textbf{(D)}\ 3 \qquad\textbf{(E)}\ 4$
\begin{solution}
\\\\
\textbf{Key Word} Trigonometric Identities
\\\\
Euler's Formula might help.. Maybe trigonometric identities?
\[
P(x) = 1 + \cos{x} - \cos2x + \cos3x + i(\sin{x} - \sin2x + \sin3x)
\]
In other words, $1 + \cos{x} - \cos2x + \cos3x = 0$ and $\sin{x} - \sin2x + \sin3x = 0$. Using trigonometric identities, we know that
\begin{align*}
    1 + \cos{x} - \cos2x + \cos3x
    &= 0 \\
    &= 1 + \cos{x} - (2\cos^2x - 1) + (4\cos^3x - 3\cos{x}) \\
    &= 4\cos^3x - 2\cos^2x - 2\cos{x} + 2 \\
    &= 2\cos^3x - \cos^2x - \cos{x} + 1 \\
    \sin{x} - \sin2x + \sin3x
    &= 0 \\
    &= \sin{x} - 2\sin{x}\cos{x} + 3\sin{x} - 4\sin^3x \\
    &= 4\sin^3x - 4\sin{x} + 2\sin{x}\cos{x} \\
    &= \sin{x}(2\sin^2x - 2 + \cos{x}) \\
    &= \sin{x}(-2\cos^2x + \cos{x}).
\end{align*}
$1 + \cos{x} - \cos2x + \cos3x = 0$ must satisfy when $\sin{x} = 0$, $\cos{x} = 0$ or $\cos{x} = \frac{1}{2}$. The cases when $\cos{x} = 0$ and $\cos{x} = \frac{1}{2}$ does not work. Moreover, for the case $\sin{x} = 0$ to work, $x = 0, \pi, 2\pi$. However, none of the cases work. Therefore, $\boxed{\textbf{(A)}\ 0}$ is the answer.
\end{solution}
Uploaded a \href{https://artofproblemsolving.com/wiki/index.php/2021_Fall_AMC_12B_Problems/Problem_21#Solution_6_.28Trig.29}{new solution} in AOPS!! \\

\end{document}
