# Numerical Methods

Author: John J Weber III, PhD Corresponding Textbook Sections:

• Section 1.4 – The Approximation Method of Euler

## Expected Educational Results

• Objective 1–1: I can evaluate or estimate a limit from the graph of a function.

• Objective 1–2: I can explain why a limit does not exist.

• Objective 1–3: I can explain the relationship between a limit that does not exist and the vertical asymptote of a function.

## Prerequisites

### Algebra

#### Equation of a Line

The point-slope of the equation of a line with slope $m$$m$ and passing through the point $\left({x}_{0},{y}_{0}\right)$$(x_0,y_0)$ is $y-{y}_{0}=m\left(x-{x}_{0}\right)$$y-y_0=m(x-x_0)$

### Calculus I

#### Derivatives

##### Differentiation Rules

General Formulas

• $\frac{d}{dx}c=0$$\displaystyle \frac{d}{dx}c=0$, where $c$$c$ is any constant.

• $\frac{d}{dx}\left[cf\left(x\right)\right]=c{f}^{\phantom{\rule{0.167em}{0ex}}\prime }\left(x\right)$$\displaystyle \frac{d}{dx}[cf(x)]=cf^{\,\prime}(x)$, where $c$$c$ is any constant.

• $\frac{d}{dx}\left[f\left(x\right)±g\left(x\right)\right]={f}^{\phantom{\rule{0.167em}{0ex}}\prime }\left(x\right)±{g}^{\phantom{\rule{0.167em}{0ex}}\prime }\left(x\right)$$\displaystyle \frac{d}{dx}[f(x)\pm g(x)]=f^{\,\prime}(x)\pm g^{\,\prime}(x)$

• $\frac{d}{dx}\left[f\left(x\right)g\left(x\right)\right]={f}^{\phantom{\rule{0.167em}{0ex}}\prime }\left(x\right)g\left(x\right)+{g}^{\phantom{\rule{0.167em}{0ex}}\prime }\left(x\right)f\left(x\right)$$\displaystyle \frac{d}{dx}[f(x)g(x)]=f^{\,\prime}(x)g(x)+g^{\,\prime}(x)f(x)$

• $\frac{d}{dx}\frac{f\left(x\right)}{g\left(x\right)}=\frac{{f}^{\phantom{\rule{0.167em}{0ex}}\prime }\left(x\right)g\left(x\right)-{g}^{\phantom{\rule{0.167em}{0ex}}\prime }\left(x\right)f\left(x\right)}{\left[g\left(x\right){\right]}^{2}}$$\displaystyle \frac{d}{dx}\frac{f(x)}{g(x)}=\frac{f^{\,\prime}(x)g(x)-g^{\,\prime}(x)f(x)}{[g(x)]^2}$

• $\frac{d}{dx}f\left(g\left(x\right)\right)={f}^{\phantom{\rule{0.167em}{0ex}}\prime }\left(g\left(x\right)\right){g}^{\phantom{\rule{0.167em}{0ex}}\prime }\left(x\right)$$\displaystyle \frac{d}{dx}f(g(x))=f^{\,\prime}(g(x))g^{\,\prime}(x)$

• $\frac{d}{dx}{x}^{n}=n{x}^{n-1}$$\displaystyle \frac{d}{dx}x^n=nx^{n-1}$\index{differentiation rules!power rule}

Exponential and Logarithmic Formulas

• $\frac{d}{dx}{e}^{x}={e}^{x}$$\displaystyle \frac{d}{dx}e^x=e^x$

• $\frac{d}{dx}{a}^{x}=\mathrm{ln}\left(a\right){a}^{x}$$\displaystyle \frac{d}{dx}a^x=\ln{(a)}a^x$, $a>0$$a>0$, $a\ne 1$$a\ne 1$

• $\frac{d}{dx}\mathrm{ln}\left(x\right)=\frac{1}{x}$$\displaystyle \frac{d}{dx}\ln{(x)}=\frac{1}{x}$

• $\frac{d}{dx}{\mathrm{log}}_{b}\left(x\right)=\frac{1}{x\mathrm{ln}\left(b\right)}$$\displaystyle \frac{d}{dx}\log_b{(x)}=\frac{1}{x\ln{(b)}}$, $b>0$$b>0$, $b\ne 1$$b\ne 1$

Trigonometric Formulas

• $\frac{d}{dx}\mathrm{sin}\left(x\right)=\mathrm{cos}\left(x\right)$$\displaystyle \frac{d}{dx}\sin{(x)}=\cos{(x)}$

• $\frac{d}{dx}\mathrm{cos}\left(x\right)=-\mathrm{sin}\left(x\right)$$\displaystyle \frac{d}{dx}\cos{(x)}=-\sin{(x)}$

• $\frac{d}{dx}\mathrm{tan}\left(x\right)={\mathrm{sec}}^{2}\left(x\right)$$\displaystyle \frac{d}{dx}\tan{(x)}=\sec^2{(x)}$

• $\frac{d}{dx}\mathrm{cot}\left(x\right)=-{\mathrm{csc}}^{2}\left(x\right)$$\displaystyle \frac{d}{dx}\cot{(x)}=-\csc^2{(x)}$

• $\frac{d}{dx}\mathrm{sec}\left(x\right)=\mathrm{sec}\left(x\right)\mathrm{tan}\left(x\right)$$\displaystyle \frac{d}{dx}\sec{(x)}=\sec{(x)}\tan{(x)}$

• $\frac{d}{dx}\mathrm{csc}\left(x\right)=-\mathrm{csc}\left(x\right)\mathrm{cot}\left(x\right)$$\displaystyle \frac{d}{dx}\csc{(x)}=-\csc{(x)}\cot{(x)}$

Inverse Trigonometric Formulas

• $\frac{d}{dx}\mathrm{arcsin}\left(x\right)=\frac{1}{\sqrt{1-{x}^{2}}}$$\displaystyle \frac{d}{dx}\arcsin{(x)}=\frac{1}{\sqrt{1-x^2}}$

• $\frac{d}{dx}\mathrm{arccos}\left(x\right)=-\frac{1}{\sqrt{1-{x}^{2}}}$$\displaystyle \frac{d}{dx}\arccos{(x)}=-\frac{1}{\sqrt{1-x^2}}$

• $\frac{d}{dx}\mathrm{arctan}\left(x\right)=\frac{1}{1+{x}^{2}}$$\displaystyle \frac{d}{dx}\arctan{(x)}=\frac{1}{1+x^2}$

• $\frac{d}{dx}\text{arccot}\left(x\right)=-\frac{1}{1+{x}^{2}}$$\displaystyle \frac{d}{dx}\text{arccot}{(x)}=-\frac{1}{1+x^2}$

• $\frac{d}{dx}\text{arcsec}\left(x\right)=\frac{1}{|x|\sqrt{{x}^{2}-1}}$$\displaystyle \frac{d}{dx}\text{arcsec}{(x)}=\frac{1}{|x|\sqrt{x^2-1}}$

• $\frac{d}{dx}\text{arccsc}\left(x\right)=-\frac{1}{|x|\sqrt{{x}^{2}-1}}$$\displaystyle \frac{d}{dx}\text{arccsc}{(x)}=-\frac{1}{|x|\sqrt{x^2-1}}$

Hyperbolic Formulas

• $\frac{d}{dx}\mathrm{sinh}\left(x\right)=\mathrm{cosh}\left(x\right)$$\displaystyle \frac{d}{dx}\sinh{(x)}=\cosh{(x)}$

• $\frac{d}{dx}\mathrm{cosh}\left(x\right)=\mathrm{sinh}\left(x\right)$$\displaystyle \frac{d}{dx}\cosh{(x)}=\sinh{(x)}$

• $\frac{d}{dx}\mathrm{tanh}\left(x\right)={\text{sech}}^{2}\left(x\right)$$\displaystyle \frac{d}{dx}\tanh{(x)}=\text{sech}^2{(x)}$

• $\frac{d}{dx}\mathrm{coth}\left(x\right)=-{\text{csch}}^{2}\left(x\right)$$\displaystyle \frac{d}{dx}\coth{(x)}=-\text{csch}^2{(x)}$

• $\frac{d}{dx}\text{sech}\left(x\right)=-\text{sech}\left(x\right)\mathrm{tanh}\left(x\right)$$\displaystyle \frac{d}{dx}\text{sech}{(x)}=-\text{sech}{(x)}\tanh{(x)}$

• $\frac{d}{dx}\text{csch}\left(x\right)=-\text{csch}\left(x\right)\mathrm{coth}\left(x\right)$$\displaystyle \frac{d}{dx}\text{csch}{(x)}=-\text{csch}{(x)}\coth{(x)}$

Inverse Hyperbolic Formulas

• $\frac{d}{dx}\text{arcsinh}\left(x\right)=\frac{1}{\sqrt{1+{x}^{2}}}$$\displaystyle \frac{d}{dx}\text{arcsinh}{(x)}=\frac{1}{\sqrt{1+x^2}}$

• $\frac{d}{dx}\text{arccosh}\left(x\right)=\frac{1}{\sqrt{{x}^{2}-1}}$$\displaystyle \frac{d}{dx}\text{arccosh}{(x)}=\frac{1}{\sqrt{x^2-1}}$

• $\frac{d}{dx}\text{arctanh}\left(x\right)=\frac{1}{1-{x}^{2}}$$\displaystyle \frac{d}{dx}\text{arctanh}{(x)}=\frac{1}{1-x^2}$

• $\frac{d}{dx}\text{arccoth}\left(x\right)=\frac{1}{1-{x}^{2}}$$\displaystyle \frac{d}{dx}\text{arccoth}{(x)}=\frac{1}{1-x^2}$

• $\frac{d}{dx}\text{arcsech}\left(x\right)=-\frac{1}{x\sqrt{1-{x}^{2}}}$$\displaystyle \frac{d}{dx}\text{arcsech}{(x)}=-\frac{1}{x\sqrt{1-x^2}}$

• $\frac{d}{dx}\text{arccsch}\left(x\right)=-\frac{1}{|x|\sqrt{1+{x}^{2}}}$$\displaystyle \frac{d}{dx}\text{arccsch}{(x)}=-\frac{1}{|x|\sqrt{1+x^2}}$

#### Partial Derivatives

One of the conditions for the Existence and Uniqueness Theorem uses a first-order partial derivative of the dependent variable.

An ordinary differential equation (ODE) in the form $\frac{dy}{dx}=f\left(x,y\right)$$\displaystyle\frac{dy}{dx}=f(x,y)$ states that the derivative of $y$$y$ with respect to $x$$x$ is a function dependent on both $x$$x$ and $y$$y$, where $y$$y$ is a function of $x$$x$. Since the function $f$$f$ is dependent on more than one variable, we will need to find partial derivatives, specifically the partial derivative of $f$$f$ with respect to $y$$y$, i.e., $\frac{\partial f}{\partial y}$$\displaystyle\frac{\partial f}{\partial y}$ or ${f}_{y}\left(x,y\right)$$f_y(x,y)$. But this is the similar to derivatives (without needing implicit differentiation since $y$$y$ is a dependent variable of $f$$f$) in Calculus I if we treat all occurrences of $x$$x$ as either coefficients of $y$$y$ or constants.

Example 01

Find the partial derivative of $f\left(x,y\right)=x{y}^{2}-{x}^{3}y+{x}^{2}$$f(x,y)=x{\color{gsured}y^2}-x^3{\color{gsured}y}+x^2$ with respect to $y$${\color{gsured}y}$.

The solution is $\frac{\partial f\left(x,y\right)}{\partial y}=x\left(2y\right)-{x}^{3}\left(1\right)+0=2xy-{x}^{3}$$\displaystyle\frac{\partial f(x,y)}{\partial {\color{gsured}y}}=x({\color{gsured}2y})-x^3({\color{gsured}1})+0=2xy-x^3$.

Example 2

Find the partial derivative of $f\left(x,y\right)=x\sqrt[3]{{y}^{2}}-\mathrm{tan}\left(y\right)\sqrt{x}+15\mathrm{ln}\left(x\right)$$f(x,y)=x{\color{gsured}\sqrt[3]{y^2}}-{\color{gsured}\tan{(y)}}\sqrt{x}+15\ln{(x)}$ with respect to $y$${\color{gsured}y}$.

The solution is $\frac{\partial f\left(x,y\right)}{\partial y}=x\left(\frac{2}{3}{y}^{-\frac{1}{3}}\right)-{\mathrm{sec}}^{2}\left(y\right)\sqrt{x}$$\displaystyle\frac{\partial f(x,y)}{\partial {\color{gsured}y}}=x\left({\color{gsured}\frac{2}{3}y^{-\frac{1}{3}}}\right)-{\color{gsured}\sec^2{(y)}}\sqrt{x}$.

#### Practice Examples

Find the partial derivative of $f\left(x,y\right)$$f(x,y)$ with respect to $y$$y$. Verify your answers with a classmate or using software.

1. $f\left(x,y\right)={x}^{2}{y}^{2}-4{x}^{5}+{\mathrm{sin}}^{2}\left(x\right)-\mathrm{ln}\left(y\right)$$\displaystyle f(x,y)=x^2y^2-4x^5+\sin^2{(x)}-\ln{(y)}$

2. $f\left(x,y\right)=x\mathrm{sin}\left(y\right)-y\mathrm{cos}\left(x\right)$$\displaystyle f(x,y)=x\sin{(y)}-y\cos{(x)}$

3. $f\left(x,y\right)=\sqrt{{x}^{2}+y}$$\displaystyle f(x,y)=\sqrt{x^2+y}$

4. $f\left(x,y\right)=\frac{x}{y}$$\displaystyle f(x,y)=\frac{x}{y}$

5. $f\left(x,y\right)=\frac{y\sqrt{x}+4xy+{e}^{4y}}{{x}^{2}+1}$$\displaystyle f(x,y)=\frac{y\sqrt{x}+4xy+e^{4y}}{x^2+1}$