# How to perform this kind of text wrapping

How to do this kind of text formatting in LaTeX: There is a centered text for a header and beside will be a picture. In Microsoft Word, it looks like this: When I use wrapfig, the image goes to the bottom, and when I use \begin{figure}, the image does not become aligned with the text. Please note that the first set of text is centered with the image and the others are centered with the page.

The code:

\documentclass{article}
\usepackage{polynom,array}
\usepackage[table]{xcolor}
\usepackage{graphicx}
\usepackage{pgf,tikz}
\usepackage{mathrsfs}
\usetikzlibrary{arrows}
\usepackage{setspace}
\usepackage{wrapfig}
\usepackage[margin=1in, paperheight=11in, paperwidth=8.5in]{geometry}
\def\labelitemi{---}
\begin{document}
\includegraphics[scale=0.15]{pshs}
\begin{center}
Republic of the Philippines
\linebreak Department of Science and Technology
\linebreak Philippine Science High School - Central Visayas Campus
\linebreak Talaytay, Argao, Cebu
\end{center}
\begin{center}
\textbf{Problem Set in Mathematics 3}
\end{center}
\begin{enumerate}
\item Consider the function $f(x)=-x^5+4x^4-x^3-10x^2+4x+8$.
\begin{enumerate}
\item Precisely how many zeros does $f(x)$ have? (\texttt{1 pt.})
\begin{itemize}
\item By Theorem 1.3, $f(x)$ has precisely five zeros since the degree of $f(x)$ is 5.
\end{itemize}
\item Using Theorem 1.4, tabulate the possible number of positive real, negative real, and imaginary zeros of $f(x)$. (\texttt{2 pts.})
\begin{itemize}
\item By Theorem 1.4, $f(x)$ has three sign variations and $f(-x)$ has two sign variations. Thus $f(x)$ can have either one or three positive real zeros and zero or two negative real zeros.
\singlespacing
\begin{center}
\begin{tabular}{|c|c|c|c|c|} \hline
No. of positive real solutions & 3 & 3 & 1 & 1 \\   \hline
No. of negative real solutions & 2 & 0 & 2 & 0 \\   \hline
No. of imaginary solutions & 0 & 2 & 2 & 4 \\   \hline
Total number of solutions & 5 & 5 & 5 & 5 \\ \hline
\end{tabular}
\end{center}
\singlespacing
\end{itemize}
\item Use Theorem 1.6 to determine the interval at which the real zeros of $f(x)$ are contained. (\texttt{1 pt.})
\begin{itemize}
\item By Theorem 1.6, the magnitude of the coefficient with the largest magnitude is 10, and the magnitude of the leading coefficient is 1, thus $M=\frac{10}{1}+1=11$. This means that all the real zeros are in the interval (-11, 11).
\end{itemize}
\item What are the possible rational zeros of $f(x)$ according to Theorem 1.8? (\texttt{2 pts.})
\begin{itemize}
\item The constant term of $f(x)$ is 8 and the leading coefficient of $f(x)$ is 1. By Theorem 1.8, the rational zeros are $\pm 1, \pm 2, \pm 4$, and $\pm 8$.
\end{itemize}
\item Give a lower bound of the real zeros of $f(x)$. Justify your answer using Theorem 1.5. (\texttt{2 pts.})
\begin{itemize}
\item We try -2:
\begin{center}
$\begin{array}{*{20}{c}}{\left. {\underline {\, { - 2} \,}}\! \right| }&{ - 1}&4&{ - 1}&{ - 10}&4&8\\{}&{}&2&{ - 12}&{26}&{ - 32}&{56} \\ \hline {}&{ - 1}&6&{ - 13}&{16}&{ - 28}&{64}\end{array}$
\end{center}
Since $(-1, 6, -13, 16, -28, 64)$ have alternating signs, then -2 is a lower bound of $f(x)$.
\end{itemize}
\item What are the zeros of $f(x)$? (\texttt{4 pts.})
\begin{itemize}
\item We try 2:
\begin{center}
$\begin{array}{*{20}{c}}{\left. {\underline {\, 2 \,}}\! \right| }&{ - 1}&4&{ - 1}&{ - 10}&4&8\\ {}&{}&{ - 2}&4&6&{ - 8}&{ - 8}\\ \hline {}&{ - 1}&2&3&{ - 4}&{ - 4}&0 \end{array}$
\end{center}
We try 2 the second time:
\begin{center}
$\begin{array}{*{20}{c}} {\left. {\underline {\, 2 \,}}\! \right| }&{ - 1}&2&3&{ - 4}&{ - 4}\\ {}&{}&{ - 2}&0&6&4\\ \hline {}&{ - 1}&0&3&2&0 \end{array}$
\end{center}
We try 2 the third time:
\begin{center}
$\begin{array}{*{20}{c}}{\left. {\underline {\, 2 \,}}\! \right| }&{ - 1}&0&3&2\\ {}&{}&{ - 2}&{ - 4}&{ - 2}\\ \hline {}&{ - 1}&{ - 2}&{ - 1}&0 \end{array}$
\end{center}
At this point, we factor $-x^2-2x-1$ and we get $-(x+1)(x+1)$. Thus, the zeros of $f(x)$ are 2 of multiplicity 3 and -1 of multiplicity 2.
\end{itemize}
\newpage
\item Write the complete factored form of $f(x)$. (\texttt{2 pts.})
\begin{itemize}
\item We had roots 2 of multiplicity 3 and -1 of multiplicity 2. With that, we have $(x-2)^3(x+1)^2$. But we should remember that after the third synthetic division process, we got $-(x+1)^2$ and not $(x+1)^2$. Thus, we must multiply -1 to our initial factored form. Thus the complete factored form of $f(x)$ is $-(x-2)^3(x+1)^2$.
\end{itemize}
\item Solve for the $y$-intercept of $f(x)$. (\texttt{1 pt.})
\begin{itemize}
\item The $y$-intercept of $f(x)$ is the constant term: 8.
\end{itemize}
\item Approximate\footnote{I did not use Newton's method; instead I used the first derivative test.} the turning point of $f(x)$ in the interval (-1, 2) up to 2 decimal places. (\texttt{2 pts.})
\begin{itemize}
\item We skip\footnote{This is so scripted.} to $f(0.25)=8.374$ and $f(0.15)=8.373$. We get closer: $f(0.18)$ and $f(0.22)$ both 8.394. So we must settle in the middle: $f(0.20)=8.398$. Thus the turning point between the interval (-1,2) is at $(0.20, 8.40)$.
\end{itemize}
\item Sketch the graph\footnote{Made with Geogebra} of $f(x)$. (\texttt{3 pts.})
\begin{itemize}
\item Note the axes' labels:
\begin{figure}[h]
\definecolor{uuuuuu}{rgb}{0.26666666666666666,0.26666666666666666,0.26666666666666666}
\definecolor{qqwuqq}{rgb}{0.,0.39215686274509803,0.}
\begin{center}
\begin{tikzpicture}[line cap=round,line join=round,>=triangle 45,x=2.0cm,y=0.5cm]
\draw [color=black,, xstep=2.0cm,ystep=0.5cm] (-2.,-9.) grid (3.,11.);
\draw[<->,color=black] (-2.,0.) -- (3.,0.);
\foreach \x in {-2.,-1.5,-1.,-0.5,0.5,1.,1.5,2.,2.5}
\draw[shift={(\x,0)},color=black] (0pt,2pt) -- (0pt,-2pt) node[below] {\footnotesize $\x$};
\draw[<->,color=black] (0.,-9.) -- (0.,11.);
\foreach \y in {-8.,-6.,-4.,-2.,2.,4.,6.,8.,10.}
\draw[shift={(0,\y)},color=black] (2pt,0pt) -- (-2pt,0pt) node[left] {\footnotesize $\y$};
\draw[color=black] (0pt,-10pt) node[right] {\footnotesize $0$};
\clip(-2.,-9.) rectangle (3.,11.);
\draw[line width=1.2pt,color=qqwuqq,smooth,samples=100,domain=-2.0:3.0] plot(\x,{0-(\x)^(5.0)+4.0*(\x)^(4.0)-(\x)^(3.0)-10.0*(\x)^(2.0)+4.0*(\x)+8.0});
\begin{scriptsize}
\draw [fill=uuuuuu] (0.2,8.39808) circle (1.5pt);
\draw [fill=uuuuuu] (-1.,0.) circle (1.5pt);
\draw [fill=uuuuuu] (2.,0.) circle (1.5pt);
\draw [fill=uuuuuu] (0.,8.) circle (1.5pt);
\end{scriptsize}
\end{tikzpicture}
\end{center}
\end{figure}
\end{itemize}
\end{enumerate}
\newpage
\item Find a polynomial function, in factored form that is represented by the graph in Figure 1. Explain in 4 to 7 sentences in bullet format. Note that the leading coefficient is not 1. (\texttt{5pts.})
\begin{itemize}
\renewcommand\labelitemi{\bullet}
\item Figure 1:
\begin{figure}[h]
\begin{center}
\definecolor{tetete}{rgb}{0.,0.39215686274509803,0.}
\begin{tikzpicture}[line cap=round,line join=round,>=triangle 45,x=1.0cm,y=1.0cm]
\draw [color=black,, xstep=1.0cm,ystep=1.0cm] (-4.,-6.) grid (5.,3.);
\draw[<->,color=black] (-4.,0.) -- (5.,0.);
\foreach \x in {-4.,-3.,-2.,-1.,1.,2.,3.,4.}
\draw[shift={(\x,0)},color=black] (0pt,2pt) -- (0pt,-2pt) node[below] {\footnotesize $\x$};
\draw[<->,color=black] (0.,-6.) -- (0.,3.);
\foreach \y in {-6.,-5.,-4.,-3.,-2.,-1.,1.,2.}
\draw[shift={(0,\y)},color=black] (2pt,0pt) -- (-2pt,0pt) node[left] {\footnotesize $\y$};
\draw[color=black] (0pt,-10pt) node[right] {\footnotesize $0$};
\clip(-4.,-6.) rectangle (5.,3.);
\draw[line width=1.2pt,color=tetete,smooth,samples=100,domain=-4.0:5.0] plot(\x,{0.25*((\x)+1.0)^(3.0)*((\x)-2.0)^(2.0)*((\x)-3.0)});
\end{tikzpicture}
\end{center}
\end{figure}
\item The name of the function described in Figure 1 will be named $g_n(x)$.
\item At (1,0), $g_n(x)$ sways \textbf{a little bit}\footnote{Does qualify the 2nd derivative test} which may indicate that it has a factor of $(x+1)^3$.
\item At (2,0), $g_n(x)$ bounces \textbf{a little bit}\footnote{Does qualify the 1st derivative test} which may indicate that it has a factor of $(x-2)^2$.
\item At (3,0), $g_n(x)$ goes \textbf{straight up}\footnote{Does not qualify the $n$th derivative tests} which may indicate that it has a factor of $(x-3)$.
\item We would call our new function $g_1(x)$ with the factored form $(x+1)^3(x-2)^2(x-3)$ and we would also establish the functional equation $g_n(x)=n \times g_1(x)$. Finding the value of $n$: $g_n(0)=3$ and $g_1(0)=12$; $n=\frac{1}{4}$.
\item Thus $g_n(x)=\frac{1}{4}(x+1)^3(x-2)^2(x-3)$
\end{itemize}
\hrule
\item Determine \textbf{all the values}\footnote{There is only one value.} of $k$ such that $3x+2$ is a factor of the polynomial function $h(x)=6x^3-5x^2-12x+k$. (\texttt{5 pts.})
\begin{itemize}
\item $3x+2=0$ becomes $x+\frac{2}{3}=0$, and thus $-\frac{2}{3}$ is a root of $h(x)$. We do synthetic division to get the value of $k$:
\begin{center}
$\begin{array}{*{20}{c}}{\left. {\underline {\, { - {\textstyle{2 \over 3}}} \,}}\! \right| }&6&{ - 5}&{ - 12}&k\\{}&{}&{ - 4}&6&4\\\hline{}&6&{ - 9}&{ - 6}&0\end{array}$
\end{center}
This gives us the equation $k+4=0$, so $k=-4$.
\end{itemize}
\end{enumerate}
\end{document}


The image:

There is really no wrapping. Just put the text beside the logo, by putting each in a minipage (which by default align on their vertical centers). I put the logo in a 0pt width box, so that the text stays horizontally centered over the whole text width.

\begin{minipage}{0pt}
\makebox[0pt][l]{\includegraphics[scale=0.15]{pshs}}%
\end{minipage}%
\begin{minipage}{\linewidth}
\centering
Republic of the Philippines \linebreak Department of Science and
Technology \linebreak Philippine Science High School - Central
Visayas Campus \linebreak Talaytay, Argao, Cebu
\end{minipage} • but the header isn't centered over the whole text, not if the heading "problem set" is centered. is this a case where \noindent might be needed? – barbara beeton Dec 18 '16 at 16:41

Simply put the image and the header text in a tabularx environment, and use \adjustimage from adjustbox for scaling and vertical centring. Unrelated: in a figure or table environment, don't use the center environment, as it will add some unwanted vertical spacing. Use \centeringinstead. Also, in the second plot, I had to comment the last line — I obtained a ‘dimension too large’ error message.

\documentclass{article}
\usepackage{polynom,array}
\usepackage[table]{xcolor}
\usepackage{graphicx}
\usepackage{pgf,tikz}
\usepackage{mathrsfs}
\usetikzlibrary{arrows}
\usepackage{setspace}
\usepackage{wrapfig}
\usepackage[margin=1in, paperheight=11in, paperwidth=8.5in]{geometry}
\def\labelitemi{---}

\begin{document}

\begin{tabularx}{\linewidth}{@{}l>{\centering}X@{}}
\adjustimage{scale=0.15, valign=T}{pshs} & Republic of the Philippines
\linebreak Department of Science and Technology
\linebreak Philippine Science High School - Central Visayas Campus
\linebreak Talaytay, Argao, Cebu
\end{tabularx}
\bigskip

\begin{center}
\textbf{Problem Set in Mathematics 3}
\end{center}
\begin{enumerate}
\item Consider the function $f(x)=-x^5+4x^4-x^3-10x^2+4x+8$.
\begin{enumerate}
\item Precisely how many zeros does $f(x)$ have? (\texttt{1 pt.})
\begin{itemize}
\item By Theorem 1.3, $f(x)$ has precisely five zeros since the degree of $f(x)$ is 5.
\end{itemize}
\item Using Theorem 1.4, tabulate the possible number of positive real, negative real, and imaginary zeros of $f(x)$. (\texttt{2 pts.})
\begin{itemize}
\item By Theorem 1.4, $f(x)$ has three sign variations and $f(-x)$ has two sign variations. Thus $f(x)$ can have either one or three positive real zeros and zero or two negative real zeros.
\singlespacing
\begin{center}
\begin{tabular}{|c|c|c|c|c|} \hline
No. of positive real solutions & 3 & 3 & 1 & 1 \\ \hline
No. of negative real solutions & 2 & 0 & 2 & 0 \\ \hline
No. of imaginary solutions & 0 & 2 & 2 & 4 \\ \hline
Total number of solutions & 5 & 5 & 5 & 5 \\ \hline
\end{tabular}
\end{center}
\singlespacing
\end{itemize}
\item Use Theorem 1.6 to determine the interval at which the real zeros of $f(x)$ are contained. (\texttt{1 pt.})
\begin{itemize}
\item By Theorem 1.6, the magnitude of the coefficient with the largest magnitude is 10, and the magnitude of the leading coefficient is 1, thus $M=\frac{10}{1}+1=11$. This means that all the real zeros are in the interval (-11, 11).
\end{itemize}
\item What are the possible rational zeros of $f(x)$ according to Theorem 1.8? (\texttt{2 pts.})
\begin{itemize}
\item The constant term of $f(x)$ is 8 and the leading coefficient of $f(x)$ is 1. By Theorem 1.8, the rational zeros are $\pm 1, \pm 2, \pm 4$, and $\pm 8$.
\end{itemize}
\item Give a lower bound of the real zeros of $f(x)$. Justify your answer using Theorem 1.5. (\texttt{2 pts.})
\begin{itemize}
\item We try -2:
\begin{center}
$\begin{array}{*{20}{c}}{\left. {\underline {\, { - 2} \,}}\! \right| }&{ - 1}&4&{ - 1}&{ - 10}&4&8\\{}&{}&2&{ - 12}&{26}&{ - 32}&{56} \\ \hline {}&{ - 1}&6&{ - 13}&{16}&{ - 28}&{64}\end{array}$
\end{center}
Since $(-1, 6, -13, 16, -28, 64)$ have alternating signs, then -2 is a lower bound of $f(x)$.
\end{itemize}
\item What are the zeros of $f(x)$? (\texttt{4 pts.})
\begin{itemize}
\item We try 2:
\begin{center}
$\begin{array}{*{20}{c}}{\left. {\underline {\, 2 \,}}\! \right| }&{ - 1}&4&{ - 1}&{ - 10}&4&8\\ {}&{}&{ - 2}&4&6&{ - 8}&{ - 8}\\ \hline {}&{ - 1}&2&3&{ - 4}&{ - 4}&0 \end{array}$
\end{center}
We try 2 the second time:
\begin{center}
$\begin{array}{*{20}{c}} {\left. {\underline {\, 2 \,}}\! \right| }&{ - 1}&2&3&{ - 4}&{ - 4}\\ {}&{}&{ - 2}&0&6&4\\ \hline {}&{ - 1}&0&3&2&0 \end{array}$
\end{center}
We try 2 the third time:
\begin{center}
$\begin{array}{*{20}{c}}{\left. {\underline {\, 2 \,}}\! \right| }&{ - 1}&0&3&2\\ {}&{}&{ - 2}&{ - 4}&{ - 2}\\ \hline {}&{ - 1}&{ - 2}&{ - 1}&0 \end{array}$
\end{center}
At this point, we factor $-x^2-2x-1$ and we get $-(x+1)(x+1)$. Thus, the zeros of $f(x)$ are 2 of multiplicity 3 and -1 of multiplicity 2.
\end{itemize}
\newpage
\item Write the complete factored form of $f(x)$. (\texttt{2 pts.})
\begin{itemize}
\item We had roots 2 of multiplicity 3 and -1 of multiplicity 2. With that, we have $(x-2)^3(x+1)^2$. But we should remember that after the third synthetic division process, we got $-(x+1)^2$ and not $(x+1)^2$. Thus, we must multiply -1 to our initial factored form. Thus the complete factored form of $f(x)$ is $-(x-2)^3(x+1)^2$.
\end{itemize}
\item Solve for the $y$-intercept of $f(x)$. (\texttt{1 pt.})
\begin{itemize}
\item The $y$-intercept of $f(x)$ is the constant term: 8.
\end{itemize}
\item Approximate\footnote{I did not use Newton's method; instead I used the first derivative test.} the turning point of $f(x)$ in the interval (-1, 2) up to 2 decimal places. (\texttt{2 pts.})
\begin{itemize}
\item We skip\footnote{This is so scripted.} to $f(0.25)=8.374$ and $f(0.15)=8.373$. We get closer: $f(0.18)$ and $f(0.22)$ both 8.394. So we must settle in the middle: $f(0.20)=8.398$. Thus the turning point between the interval (-1,2) is at $(0.20, 8.40)$.
\end{itemize}
\item Sketch the graph\footnote{Made with Geogebra} of $f(x)$. (\texttt{3 pts.})
\begin{itemize}
\item Note the axes' labels:
\begin{figure}[h]
\definecolor{uuuuuu}{rgb}{0.26666666666666666,0.26666666666666666,0.26666666666666666}
\definecolor{qqwuqq}{rgb}{0.,0.39215686274509803,0.}
\begin{center}
\begin{tikzpicture}[line cap=round,line join=round,>=triangle 45,x=2.0cm,y=0.5cm]
\draw [color=black,, xstep=2.0cm,ystep=0.5cm] (-2.,-9.) grid (3.,11.);
\draw[<->,color=black] (-2.,0.) -- (3.,0.);
\foreach \x in {-2.,-1.5,-1.,-0.5,0.5,1.,1.5,2.,2.5}
\draw[shift={(\x,0)},color=black] (0pt,2pt) -- (0pt,-2pt) node[below] {\footnotesize $\x$};
\draw[<->,color=black] (0.,-9.) -- (0.,11.);
\foreach \y in {-8.,-6.,-4.,-2.,2.,4.,6.,8.,10.}
\draw[shift={(0,\y)},color=black] (2pt,0pt) -- (-2pt,0pt) node[left] {\footnotesize $\y$};
\draw[color=black] (0pt,-10pt) node[right] {\footnotesize $0$};
\clip(-2.,-9.) rectangle (3.,11.);
\draw[line width=1.2pt,color=qqwuqq,smooth,samples=100,domain=-2.0:3.0] plot(\x,{0-(\x)^(5.0)+4.0*(\x)^(4.0)-(\x)^(3.0)-10.0*(\x)^(2.0)+4.0*(\x)+8.0});
\begin{scriptsize}
\draw [fill=uuuuuu] (0.2,8.39808) circle (1.5pt);
\draw [fill=uuuuuu] (-1.,0.) circle (1.5pt);
\draw [fill=uuuuuu] (2.,0.) circle (1.5pt);
\draw [fill=uuuuuu] (0.,8.) circle (1.5pt);
\end{scriptsize}
\end{tikzpicture}
\end{center}
\end{figure}
\end{itemize}
\end{enumerate}
\newpage
\item Find a polynomial function, in factored form that is represented by the graph in Figure 1. Explain in 4 to 7 sentences in bullet format. Note that the leading coefficient is not 1. (\texttt{5pts.})
\begin{itemize}
\renewcommand\labelitemi{\textbullet}
\item Figure 1:
\begin{figure}[h]
\centering
\definecolor{tetete}{rgb}{0.,0.39215686274509803,0.}
\begin{tikzpicture}[line cap=round,line join=round,>=triangle 45,x=1.0cm,y=1.0cm]
\draw [color=black,, xstep=1.0cm,ystep=1.0cm] (-4.,-6.) grid (5.,3.);
\draw[<->,color=black] (-4.,0.) -- (5.,0.);
\foreach \x in {-4.,-3.,-2.,-1.,1.,2.,3.,4.}
\draw[shift={(\x,0)},color=black] (0pt,2pt) -- (0pt,-2pt) node[below] {\footnotesize $\x$};
\draw[<->,color=black] (0.,-6.) -- (0.,3.);
\foreach \y in {-6.,-5.,-4.,-3.,-2.,-1.,1.,2.}
\draw[shift={(0,\y)},color=black] (2pt,0pt) -- (-2pt,0pt) node[left] {\footnotesize $\y$};
\draw[color=black] (0pt,-10pt) node[right] {\footnotesize $0$};
\clip(-4.,-6.) rectangle (5.,3.);
%\draw[line width=1.2pt,color=tetete,smooth,samples=100,domain=-4.0:5.0] plot(\x,{0.25*((\x)+1.0)^(3.0)*((\x)-2.0)^(2.0)});
\end{tikzpicture}
\end{figure}
\item The name of the function described in Figure 1 will be named $g_n(x)$.
\item At (1,0), $g_n(x)$ sways \textbf{a little bit}\footnote{Does qualify the 2nd derivative test} which may indicate that it has a factor of $(x+1)^3$.
\item At (2,0), $g_n(x)$ bounces \textbf{a little bit}\footnote{Does qualify the 1st derivative test} which may indicate that it has a factor of $(x-2)^2$.
\item At (3,0), $g_n(x)$ goes \textbf{straight up}\footnote{Does not qualify the $n$th derivative tests} which may indicate that it has a factor of $(x-3)$.
\item We would call our new function $g_1(x)$ with the factored form $(x+1)^3(x-2)^2(x-3)$ and we would also establish the functional equation $g_n(x)=n \times g_1(x)$. Finding the value of $n$: $g_n(0)=3$ and $g_1(0)=12$; $n=\frac{1}{4}$.
\item Thus $g_n(x)=\frac{1}{4}(x+1)^3(x-2)^2(x-3)$
\end{itemize}
\hrule
\item Determine \textbf{all the values}\footnote{There is only one value.} of $k$ such that $3x+2$ is a factor of the polynomial function $h(x)=6x^3-5x^2-12x+k$. (\texttt{5 pts.})
\begin{itemize}
\item $3x+2=0$ becomes $x+\frac{2}{3}=0$, and thus $-\frac{2}{3}$ is a root of $h(x)$. We do synthetic division to get the value of $k$:
\begin{center}
$\begin{array}{*{20}{c}}{\left. {\underline {\, { - {\textstyle{2 \over 3}}} \,}}\! \right| }&6&{ - 5}&{ - 12}&k\\{}&{}&{ - 4}&6&4\\\hline{}&6&{ - 9}&{ - 6}&0\end{array}$
\end{center}
This gives us the equation $k+4=0$, so $k=-4$.
\end{itemize}
\end{enumerate}

\end{document} 