Unless otherwise specified, each part of this problem is worth 0.1 points, for a total of 2.75 points.
As mentioned in the previous problem, Markdown is a special way of writing text in order to specify formatting, like whether text should be bold, italicized, etc.
For the following few exercises, try to format the specified text using Markdown. You can use the following website as a reference: https://help.github.com/articles/markdown-basics
Note that in this assignment, the formatted text and equations are actually images, so you cannot look at the cell in edit mode to see the answer. However, in future assignments, we will write all the instructions and equations in Markdown, so in the future you will always be able to look at the cell in edit mode to see how the formatting is done.
Banana
Orange
One of the advantages of using Markdown is that it allows us to easily write equations using LaTeX.
The next few exercises will go over the basics of LaTeX equation formatting. You should be able to find all of the symbols you need on this page. Alternatively, if you forget the mathematical operation that a particular symbol corresponds to, check the Wikipedia page on mathematical notation.
$like this$
. Format "y=ax+b" to produce the following:
$y = ax + b$
Many equations require the use of exponents or underscores. To include a superscript, use the ^
symbol, and for subscripts, use the _
symbol.
$x^4_1 + x^3_2 + x_3^2 + x_4$
Sometimes, we need to use exponents or underscores that require more than one character. Unfortunately, by default, the ^
or _
symbols only apply to the next character. To tell them to apply to multiple characters, the exponent or subscript needs to be wrapped in curly braces.
$X^{(1)}_{ij}$
We may ask you to use Greek variable names or letters in some of the assignments for this course. In general, greek letters can be formatted in LaTeX with \letter
, where "letter" is the name of the greek letter. For the lowercase version, use \letter
, and for the uppercase version, use \Letter
. For example, to format the greek letter "delta", you would do \delta
to produce $\delta$ and \Delta
to produce $\Delta$.
For reference, the greek letters used in this equation are called:
$\alpha + 2\beta - \gamma^2 + \theta_{mn} - (\mu\pi)^{\sigma+\lambda}$
LaTeX has special commands for some common functions, such as logarithms of exponentials. For logarithms, the relevant command is \log{}
, and for exponentials, the relevant command is \exp{}
, where the expression inside the logarithm or exponential goes inside the curly braces.
$y = \log{x}\Leftrightarrow\exp{y}=x$
Similar to the logarithm and the exponential is the square root, which can be formatted using the \sqrt{}
command.
$\sqrt{(x-y)^2}$
Many equations use dots, either to signify multiplication (or a dot product), or to indicate that the operation should be repeated. For a single dot, use \cdot{}
, and for multiple dots, use \ldots{}
.
$x_1\cdot{}x_2\cdot{}\ldots{}\cdot{}x_n$
LaTeX can also render fractions using the \frac{}{}
command. The numerator goes in the first pair of curly brackets, and the denominator goes in the second pair of curly brackets.
$\frac{\alpha}{\alpha+\beta+\gamma}$
Sums and products across variables can be displayed using \sum
and \prod
. To get the variables above and below the sum or product symbols, you can use superscripts and subscripts.
As a reminder, the large sum and product symbols mean the sum or product of a series of numbers or variables. Usually, the index variable along with its starting value is defined underneath the sum/product symbol (e.g. $i=1$), and its final value is given above the sum/product. For example, the following is a sum of all $x_i$ where $1\leq i\leq N$:
and similarly, the following is a product of all $y_j$ where $1\leq j\leq M$:
Displaying an integral is very similar to a sum or product. To do so, use the \int
command. The integral limits can be set using superscripts and subscripts.
Derivatives can be displayed using fractions, in addition to the \partial
symbol, which looks like this: $\partial$
$\frac{\partial y}{\partial x}=2x-1$