#Maths # A History of Calculus # Differentiation ## The Fundamental Theorems There are a couple very, very well defined rules regarding calculus that highlight the base of what this field of mathematics attempts to accomplish. Alright, enough of the fancy talk. Let's take a look at the first "rule" of calculus: $\int_{a}^b F'(x) \, dx = F(b) - F(a) $ More on this in the integration section. ## The Limit Limits are used as tools for approximations, allowing us to find the maximum value of a function as it subtends to the number. One way we write this is: $\lim_{ n \to \infty } \frac{n+1}{n+2}$ The keener among you may have realised that there is no such thing as infinity - meaning that we can't just take a limit and substitute it for infinity! Instead, think of what would happen if we just let the variable $n$ continuously increase - it'll get us to a value: $\lim_{ n \to \infty } \frac{n+1}{n+2} = 1$ A function which has an infinite limit is called a *divergent* function. There's much more to discover with limits! [[More on Limits (Maths)|More knowledge on limits couldn't (and will) help! ]] ## The Derivative Taking the derivative is an integral (haha, see what I did?) part of calculus. It forms the backbone of differential, heck, even integral calculus, so today I'll be reinforcing that notion(or at least trying to!) and introducing the base level of differentiation to you. ### Derivative Properties A derivative finds the **gradient** of the line tangent to a curve and gives it in expression form. To take the derivative of a simple expression, all you have to do is use the power rule: >[!INFO] Power Rule Formula >$f'(x) = nx^{n-1}$ > So the derivative of $x^3$ would just be $3x^2$, simple as that. ## Methods to take the Derivative ### The Chain Rule We may sometimes get a composite function to differentiate like $(4x)^3$. We can't actually differentiate this using the power rule anymore as x is no longer a constant, so we have to use the **chain rule**. >[!INFO] Chain Rule Formula >$f'(g'(x)) = f'g(x) \times g'(x)$ So differentiating the above example gives us $12(4x)^2$. ### The Product Rule >[!Info] Product Rule >Given a composite function $f(x) = uv$ we can rewrite $f'(x)$ as: $f'(x) = u'v + v'u$ ### The Quotient Rule >[!Info] Quotient Rule >Given a function where one of the terms can be written as $\frac{1}{v}$ we can rewrite the derivative $f'(x)$ as: >$f'(x) = \frac{u'v - v'u}{2v}$ ## Implicit Differentiation ^1 The ancestor of multivariable calculus, this revolves around isolating a variable in terms of another to create a single-variable equation to differentiate. A simple example of an expression that requires this is: $y^2 = x$ Taking the differentiated form gives us: $\frac{d}{dx}(y^2) =1$ Since differentials are just ratios we can rewrite the derivative of $y^2$ as $\frac{d}{dy}$. This is akin [^1]: This could be completely bypassed by using [[Gradient|multivariable calc]]. By taking the partials, we can get the equivalent function in a much, much simpler format. Let's not get too ahead of ourselves though! ## Second Derivatives Differentiate an expression again to get an expression for the rate of change of the rate of change! # The Integral Sometimes, we want to find the area under a curve. We'd typically make a couple triangles, rectangles, add up the areas and voila! However, what would happen if we had to find the area under a curve where you couldn't use geometry? This is known as taking a **Riemann Sum**, taking its name from the mathematician [Bernhard Riemann](https://www.britannica.com/biography/Bernhard-Riemann) and is the most simple version of the integral you can get. Also, integration is sometimes referred to as anti-differentiation. More on why later! ## Integration by Substitution I cry Sometimes, even the experts don't want to integrate - integration is considered one of the most difficult aspects of maths after all! As a result, any shortcut that can be taken by a mathematician will be taken - as seen in this technique. Let's take a composite function. For example: $f(x) = \frac{2}{2x^2+3}$ It'd be hard to integrate this function, no? However, there's a clever trick we can use - where we substitute $2x^2 + 3$ with $u$. Yep, just introduce a new variable. Who knew how effective that was? $f(u) = \frac{2}{u}$ If we wanted to integrate it, we'd just get: $\int f(u) \, du = 2\ln u + c$ We can therefore replace the $u$ with it's original constituent: $\int f(u) \, dx = 2\ln (2u^2+3) + c$ >[!Example]- Additional Example - 10G Question 14 HL AA Textbook >Find $\int_{0}^5 \frac{x}{\sqrt{ x+4 }} \, dx$ > >**Solution:** >Let's replace the square root at the denominator by substituting it with $u$: >$\sqrt{ x+4 } = u$ >This lets us assemble the expression: >$\int_{0}^5 \frac{x}{u} \, du$ >Where this time, $x$ is an arbitrary constant we must account for during integration. Integrating in terms of $u$ gives us: >$\int_{0}^5 \frac{x}{u} \, du = x\ln u$ >Replace the $u$ by putting it in terms of $x$: >$\int_{0}^5 \frac{x}{u} \, du = x\ln \sqrt{ x+4 }$ >Substitute values to find our definite integral! >$\int_{0}^5 \frac{x}{u} \, du = 5\ln \sqrt{ 9 } - 0 = 5\ln 3$ ## Integration by Parts Differentiated functions come in all shapes and sizes. It may be easy to differentiate, but integration is a whole new ballpark - there are many expressions that may be easy to differentiate but are near-impossible to integrate! One of these functions would include **composite functions** - no matter how easy it is to chain rule and differentiate to one, reversing the process is a completely different ballpark. To integrate by parts, we use this formula: $\int u \frac{dv}{dx} \, dx = uv \ - \int v \frac{du}{dx}\, dx$ Where $u$ and $v$ are arbitrary fractions that make up a product rule. >[!Abstract]- Proving Integration by Parts >The general produce rule gives us a differentiated expression as shown: >$\frac{d}{dx} (uv) = u \frac{dv}{dx} + \frac{du}{dx} v$ >Integrate both sides: >$uv = \int u \frac{dv}{dx} \, dx + \int \frac{du}{dx} v \, dx $ >Isolate $\int \frac{du}{dx} v \, dx$. This gives us: >$\int u \frac{dv}{dx} \, dx = uv \ - \int v \frac{du}{dx}\, dx$ As an example, we can take the expression $x \sin x$. To integrate this, we can let $u$ be $x$ and $\frac{dv}{dx}$ be $\sin x$. We can rewrite this integral as: $\int x\sin x \, dx = -x\cos x - \int -\cos x \, dx$ Remember the constants! This gives us our indefinite answer: $\int x\sin x \, dx = -x\cos x + \sin x + c$ >[!Tip]- Integration by Parts - Order >Note that for Integration by Parts regardless of the function you choose as $u$ or $v$ the answer will stay the same - so it's therefore best you choose accordingly so that answering questions remains easy. >For example, if we chose $\sin x$ as $u$ and $x$ as $\frac{dv}{dx}$, we could get: >$\int x\sin x \, dx = \frac{x^2}{2}\sin x - \int \frac{x^2}{2}\cos x \, dx $ >Let $\cos x = v$ and $\frac{x^2}{2} = u$: >$\int x\sin x \, dx = \frac{x^2\sin x}{2} - \frac{x^2\sin x}{2}- \int x\sin x \, dx $ >On second thoughts, maybe it was better to just stick to the original, given that we're back to where we were... >This is why you want to assign the $u$ variable to something that will differentiate the fastest into a constant - it cancels out faster! >[!Example]- Additional Example - 10H Question 18 >Find $\int (2x+1)\ln x \, dx$. > >**Solution:** > >Let $u = \ln x$ and $v = (2x+1)$ >This means that $\frac{du}{dx} = \frac{1}{x}$ and $v = x^2+x$ >We can write our formula as: >$\int (2x+1)\ln x \, dx = (x^2+x)(\ln x) - \int \left(\frac{x^2+x}{x} \right) \, dx $ >I would love to leave it off here but it does seem we need to differentiate further - so here we go! Simplify the integral: >$\int (2x+1)\ln x \, dx = (x^2\ln x+x\ln x) - \int \left({x+1} \right) \, dx$ >$\int (2x+1)\ln x \, dx = (x^2\ln x+x\ln x) - \frac{x^2}{2} - x + c$ >:( ## Geometric Interpretation Extended - Area under the Curve %%bit needs additional diagrams regarding the small change h. zoom in and stuff pls%% At the start of this section, we mentioned that the integral actually denotes the area under the graph - so let's make sure that we know that yes, taking the integral does give us an expression for the area of the graph. ![[Pasted image 20230819211723.png]] When demarcated by limits, we can get a numerical value for the area. This gives us the *definite integral*, where we denoted limits on any axis $a$ and $b$ as shown: $\int_{a}^b f(x) \, dx $ This lets us find the area under the curve at any point. To find the area between the function and the y axis we can extend this definition to express the function in terms of $y$, $g(y)$, giving us: $\int_{c}^d g(y) \, dy $ These arbitrary numerical constants have order, which means that given our above diagram, we'll need to order $b$ as 4 and $a$ as 2. Throwing this at the equation gives us: $\int_{2}^4 x^2+3 \, dx = \left[ \frac{x^3}{3}+3x \right]_{2}^4 = \frac{100}{3} - \frac{26}{3} = \frac{74}{3}$ Mind you, finding an expression in terms of $y$ is just the equivalent of taking the inverse of the function in $x$ - so the equation $x^2+3$ above yields the function: $g(y) = \sqrt{ y-3 }$ Time to integrate with the same bounds as before, this time with $c$ being 2 and $d$ being 4! $\int_{2}^4 g(y) \, dx = [\frac{2}{3}(y-3)^{3/2}]_{2}^4 $ This is another form of the **fundamental theorem of calculus**, as it is the inverse process between finding the change in a value between two bounds - differentiation. The Fundamental Theorem is given by: $f'(x) = \frac{f(x+h) - f(x)}{h}$When $h > 0$ and denotes a minuscule small change in the function $f(x)$, giving us an approximation of the value. We can also denote the bounds of an integral with the arbitrary variables $x$ and $h$: $g(x+h) - g(x) = \int_{x}^{x+h} f(t) \, dt $ Where $f(t)$ is an arbitrary integrated function that we can easily substitute $x$ into. Using the existing fundamental theorem yields: $\frac{g(x+h)-g(x)}{h}= \frac{1}{h}\int_{x}^{x+h} f(t) \, dt $ As a break, let's take a look at the diagram of $g(x)$. The domain for our integral is now $h$, with the line in the graph being the function $f(t)$. ![[Pasted image 20230821201310.png]] A close-up of the function gives us a better idea of the small change $h$. ![[Pasted image 20230821202424.png]] If we let this small change $h$ subtend to a limit of 0, we can create an expression for the instantaneous change in $g(x)$, giving us an expression for $g'(x)$: $g'(x) = \lim_{ h \to 0 } \frac{g(x+h) - g(x)}{h} = f(x)$ This proves that integration is anti-differentiation! %%graph diagram%% ^[: Notice the similarities between this and the [[Infinite Series and Approximations (Maths)#The Taylor Series|Taylor series approximations.]] Anything pop into your mind?] # Trigonometry and Derivatives Dealing with standing wave equations isn't easy! Hence why the maths behind it isn't easy either. Hence, to get you all into shape we'll be taking a look at trigonometric differentiation here - so hopefully you'll get a better grasp of whatever's going on. ## Sine, Cosine, Tangent Differentiation The derivatives of the trigonometric functions are as follows: $\frac{d}{dx}\sin x = \cos x$ $\frac{d}{dx}\cos x = -\sin x$ $\frac{d}{dx}\tan x = sec^2x$ ## Reciprocal Trig Differentiation This is even worse... trigonometric derivatives power -1 electric boogaloo 2, I suppose! Prerequisites: [[Trig Identities - Derivations DLC Ver. (Maths)|Knowledge of Trig Identities]] and [[The Unit Circle (Maths)|The Unit Circle]]. $\frac{d}{dx} \csc x = -\csc x\cot x$ $\frac{d}{dx}\sec x = \sec x \tan x$ $\frac{d}{dx}\cot x = -\csc 2x$ Remember that these functions are only functions within the range $-\frac{\pi}{2} < f(x) < \frac{\pi}{2}$, or else they become many-to-one and are not functions by the strict definition. ## Inverse Trig Differentiation We can even extend our derivatives to the inverse trig laws: $\frac{d}{dx}\arcsin x = \frac{1}{\sqrt{ 1-x^2 }}$ $\frac{d}{dx}\arccos x = - \frac{1}{\sqrt{ 1-x^2 }}$ $\frac{d}{dx} \arctan x = \frac{1}{1+x^2}$ %%now figure out how to derive these you asshat!%% # Logarithm Differentiation Pain. Identities below: $\frac{d}{dx}\log_{a} x=\frac{1}{x\ln a}$ $\frac{d}{dx}\log x = \frac{1}{x\ln 10}$ $\frac{d}{dx}\ln x= \frac{1}{x}$ $\int \ln x \, dx = x\ln x+x+c$ $\int \log x \, dx = x\log x+x+c$ # Applying Calculus - Optimisations We can also use calculus to find the maximum or minimum values of a solution. Let's look at a couple graphs to take a closer look at this application: ![[Pasted image 20230819141134.png]] Classic parabola with an equation of $y = (x-5)^2$, nothing too special about it. Notice that at the vertex (minimum point) of the graph that there is no net change in the *gradient* - the geometric change in the derivative. As a result, we can note that when the derivative is 0, we can get the minimum point. As a result, the $x$ coordinate of the minimum point is given by: $\frac{dy}{dx} = 0 = 2x - 10$ $x = 5, y = 0$ This method finds us the one root for the parabola as well - a cool secondary method to find single-root solution parabolas! This can also be extended to second derivatives to find *inflection points*, where the rate of change of the rate of change is equal to zero. Note that when both the derivative and second derivatives are equal to zero the point at which this occurs is called a **stationary inflection point**, where the tangent line is a straight, horizontal line. # Example Questions >[!Example]- 10H Integration by Parts Question 16 >Find $\int x^2e^{-x} \, dx$. >**Solution:** >Simple integration by parts formula substitution. Take $x^2$ as $u$ and $e^{-x}$ as $\frac{dv}{dt}$. >Now recall the formula from the cavities of your mind! >$\int x^2e^{-x} \, dx = x^2(-e^{-x}) + \int 2xe^{-x} \, dx $ >Integrate the secondary integral once more (double integration by parts) to get our answer for the indefinite integral: >$\int x^2e^{-x} \, dx = x^2(-e^{-x}) - 2xe^{-x} + \int 2e^{-x} \, dx $ >$\int x^2e^{-x} \, dx = -x^2e^{-x} - 2xe^{-x} - 2e^{-x} + c$ > # What's Next? This is a really, really hasty introduction to calculus. Try not to put our math teachers out of business! Navigate to more maths here: [[Maths Contents Page]] Go forth and take the step into differential equations: [[Ordinary Differential Equations (Maths)]] More Calculus: [[Infinite Series and Approximations (Maths)]] The inexorable tide of multivariable calculus: [[Gradient]]