Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download

📚 The CoCalc Library - books, templates and other resources

132937 views
License: OTHER
Kernel: Python 3

Unless otherwise specified, each part of this problem is worth 0.1 points, for a total of 2.75 points.

Markdown

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

  • Hint #1: after editing the Markdown, you will need to run the cell so that the formatting appears.

  • Hint #2: try selecting this cell so you can see what the Markdown looks like when you're editing it. Remember to run the cell again to see what it looks like when it is formatted.

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.

Italics and Boldface

Italicize the word "Banana", like this:
![](images/banana-italics.png)

Banana

Bold the word "Orange", like this:
![](images/orange-bold.png)

Orange

Lists

Make a bulleted list consisting of the words "Apple", "Banana", and "Orange", like this:
![](images/bulleted-list.png)
  • Apple

  • Banana

  • Orange

Make a numbered list consisting of the words "Strawberry", "Blueberry", and "Raspberry", like this:
![](images/numbered-list.png)
  1. Strawberry

  2. Blueberry

  3. Raspberry

Make the following list of lists:
![](images/list-of-lists.png)
  1. Fruits

    • Apple

    • Banana

    • Orange

  2. Berries

    • Strawberry

    • Blueberry

    • Raspberry

LaTeX Equations

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.

Basic equation formatting

To format an equation using LaTeX, you must wrap the text in dollar signs, $like this$. Format "y=ax+b" to produce the following:
![](images/latex-basic-equation.png)

y=ax+by=ax+b

Subscripts and superscripts

Many equations require the use of exponents or underscores. To include a superscript, use the ^ symbol, and for subscripts, use the _ symbol.

Format the following equation:
![](images/latex-subscripts-and-superscripts.png)

x14+x23+x32+x4x_1^4 + x_2^3 + 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.

Format the following equation:
![](images/latex-curly-braces.png)

Xij(1)X_{ij}^{(1)}

Greek letters

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.

Format the following equation, which uses several common greek variables (note: the only letters that are *not* greek are the numbers and the "m" and "n" subscripts).

For reference, the greek letters used in this equation are called:

α+2βγ2+θmn(μπ)σ+λ\alpha + 2\beta - \gamma^2 + \theta_{mn} - (\mu\pi)^{\sigma + \lambda}

Logarithm and exponential

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.

Format the following equation (you'll need to look up the appropriate symbol for the arrow yourself!)
![](images/latex-log-exp.png)

y=logxexpy=xy=\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.

Format the following equation:
![](images/latex-sqrt.png)

(xy)2\sqrt{(x-y)^2}

Dots

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{}.

Format the following equation:
![](images/latex-dots.png)

x1x2xnx_1\cdot{}x_2\cdot{}\ldots{}\cdot{}x_n

Fractions

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.

Format the following equation:
![](images/latex-fraction.png)

αα+β+γ\frac{\alpha}{\alpha+\beta+\gamma}

Sums and products

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=1i=1), and its final value is given above the sum/product. For example, the following is a sum of all xix_i where 1iN1\leq i\leq N:

and similarly, the following is a product of all yjy_j where 1jM1\leq j\leq M:

Format the following equation using double dollar signs (instead of single dollar signs like above). This will always make the equation display on a new line, and will make symbols like sums and products look nicer.
![](images/latex-sum-product.png)
i=1Nj=1Mxij\sum_{i=1}^N \prod_{j=1}^M x_{ij}

Integrals

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.

Format the following equation (again using double dollar signs):
![](images/latex-integral.png)
0x2dx\int_0^\infty x^2 dx

Derivatives

Derivatives can be displayed using fractions, in addition to the \partial symbol, which looks like this: \partial

Format the following equation (using single dollar signs):
![](images/latex-derivative.png)

yx=2x1\frac{\partial y}{\partial x}=2x-1

Putting it all together (1.15 points)

Format the following equation (using double dollar signs):
![](images/latex-challenge.png)
F(y)=y12πσ2e(xμ)22σ2dxF(y)=\int_{-\infty}^y \frac{1}{\sqrt{2\pi\sigma^2}}e^{\frac{-(x-\mu)^2}{2\sigma^2}}dx