solomonxie / blog-in-the-issues

A personalised tech-blog, notebook, diary, presentation and introduction.
https://solomonxie.github.io
65 stars 12 forks source link

Calculus Basics 微积分基础 #49

Open solomonxie opened 6 years ago

solomonxie commented 6 years ago

Notes on basic Calculus concepts.

Study resources

Study Tools

Practice To-do List (Linked with Unit tests)

Table of Contents

solomonxie commented 6 years ago

❖ 「Logistic Growth」 Model

Tags: #LogisticGrowth #LogisticGrowthModel #LogisticEquation #LogisticModel #LogisticRegression

This is a very famous example of Differential Equation, and has been applied to numerous of real life problems as a model. It's originally a Population Model created by Verhulst, as studying the population's growth.

Refer to lectures: ▶Khan academy, ▶MIT Gilbert Strang's, ▶The Organic Chemistry Tutor, ▶Krista King, ▶Bozeman Science

「Intuition」 & 「Origin」 of Logistic Growth Model

Refer to Khan academy: ▶Logistic models & differential equations (Part 1)

Let's let P(t) as the population's size in term of time t, and dP/dt represents the Population's growth.

「Malthus'」 Exponential growth theory of population

Mr. Malthus first introduced the exponential growth theory for the population by using a fairly simple equation: image Where P is the "Population Size", t is the "Time", r is the "Growth Rate".

「Verhulst's」 Logistic growth theory of population

Mr. Verhulst enhanced the exponential growth theory of population, as saying that the population's growth is NOT ALWAYS growing, but there is always a certain LIMIT or a Carrying Capacity to the exponential growth. And combining the exponential growth with a limit, it's then called the Logistic Growth.

And the logistic growth got its equation:

image Where P is the "Population Size" (N is often used instead), t is "Time", r is the "Growth Rate", K is the "Carrying Capacity". And the (1 - P/K) determines how close is the Population Size to the Limit K, which means as the population gets closer and closer to the limit, the growth gets slower and slower.

"It explains how density dependent limiting factors eventually decrease the growth rate until a population reaches a Carrying Capacity ( K )."

「Carrying Capacity」

Carrying Capacity means the "celling", the "limit", the "asymptote".

image

Get the 「Original Population Function」 P(t)

It's gonna use the method Separable Equations, which introduced the initial condition as P₀ in this case.

We could directly solve the Logistic Equation as solving differential equation to get the antiderivative: image

But we still have a constant C in the antiderivative, which required us to introduce an Initial Condition to get rid of C and get the specific function:

image

Solving 「Logistic Model」 Problems

Example

image Solve:

Example

image Solve:

solomonxie commented 6 years ago

Slope Field

▶ Refer to Khan academy: Worked example: range of solution curve from slope field

image

Example

image Solve: image

Example

image Solve: Hint: Try a point or points in each quadrant, like Q1: (2,2), Q2: (-2,2), Q3: (-2,-2), Q4: (2,-2)

image

Example

image Solve:

Example

image Solve:

solomonxie commented 6 years ago

Euler's Method

Euler's method means an approximation by writing down every critical value in a table, and iterate many many times until it get closer to the target value.

Refer to Wiki: Euler method

Approximation: image

Iterate table: image

Example

image Solve:

solomonxie commented 6 years ago

Area under Rate function

[Refer to Khan academy: Area under rate function gives the net change](Area under rate function gives the net change)

We're used to the function graph that using ordinary X-Y axes. But it's also very often we use the X-R axes (where Rate of the function as the vertical axis) for real problems.

Assume there's a function of a car's distance: D(t), and the car's speed is represented as a function r(t). Instead of showing the function graph of D(t), we're showing the Rate function's graph:

image

Based on the distance formula Distance = speed × time, we could know that D(t) = r(t) × Δt By using a more calculus based term: The distance it traveled in a period of time is D(t) = ʃ r(t) dt

So in the graph above, the AREA of rate function actually means THE DISTANCE TRAVELED IN A PERIOD OF TIME, which means:

THE DISTANCE IS THE ACCUMULATED SPEED.

Try to intuitively understand this in mind, then problems will be solved easily.

Strategy:

Example

image Solve:

Example

image Solve: image

Example

image Solve: image

solomonxie commented 6 years ago

Motion problems (Integral calc)

►Jump to Khan academy for some practice: Motion problems (with integrals)

「Displacement」 vs. 「Distance」

Displacement literally means "the change in position", but actually it means the SHORTCUT of two points, the shortest distance between two points.

image

▶Jump over to previous note in Linear Algebra: Displacement is a vector, distance is a scalar.

Even if you've been travelling all the time without stops, but your DISPLACEMENT still can be 0:

image

Example

image Solve: image

Example

image Solve:

Example

image Solve:

solomonxie commented 6 years ago

Planar motion (Integral Calc)

►Jump to Khan academy for some practice: Planar motion (with integrals)

Example

image Solve:

solomonxie commented 6 years ago

❖ Function Area between curve & axes

►Jump to Khan academy for some practice: Curve areas

Area Between 「X-axis」 & 「Curve」

Strategy:

Example

image Solve:

Area Between 「Y-axis」 & 「Curve」

Strategy:

Example

image Solve:

Example

image Solve:

Area Between 「Two curves」

Strategy:

Example

image

Solve:

image

Example

image

Solve:

image

image

「Horizontal areas」 between curves

Example

image Solve:

solomonxie commented 6 years ago

❖ Area of 「Polar Curves」 (Integral Calc)

Calculating area for polar curves, means we're now under the Polar Coordinate to do integration. And instead of using rectangles to calculate the area, we are to use triangles to integrate the area for a curve.

▶ Back to Polar functions (Differential Calc)

image

There're a few notable differences for calculating Area of Polar Curves:

▶ Practice at Khan academy: Area bounded by polar curves

Refer to Khan Academy: Area bounded by polar curves

image

image

Finding the right 「boundaries」

The most tricky part in Polar system, is finding the right boundaries for θ, and it will be the first step for polar integral as well.

Refer to youtube: Finding Area In Polar Coordinates

Why is this? image

Better to try out on Desmos.com, to see if the interval produces the right shape.

Example

Find out the boundaries of θ for integrating the shaded area: image Solve: image

Example

Find out the boundaries of θ for both of the polar curves: image Solve:

Example

image Solve:

Example

Find out the boundaries of θ for integrating the shaded area: image Solve:

Example

Find out the boundaries of θ for integrating the shaded area: image Solve:

Area between 「two Polar Curves」

Example

image Solve:

Example

image Solve:

Example

image Solve:

Example

image Solve: image

solomonxie commented 6 years ago

Arc Length (Integral Calc)

►Jump to Khan academy for some practice: Arc Length. ▼Refer to Khan academy: Arc length intro

image image

Formula

image

Example

image Solve:

「Arc length」 of polar curves

Refer to Khan academy: Arc length of polar curves

▶ Practice at Khan academy: Arc length of polar curves

image

Formula:

image

Example of finding out the right boundaries

Find out the boundaries for each shape: image Solve:

Example

Find out the right boundaries for θ for the red arc length: image Solve:

Example

image Solve:

solomonxie commented 6 years ago

Parametric Curve Arc Length

Parametric Curves are from Parametric Equations, means both x and y are functions, in terms of t: x(t) and y(t).

►Jump to Khan academy for some practice: Arc Length.

Refer to xaktly: Parametric Equations ▼Refer to Khan academy: Parametric curve arc length

image

Formula

image

Example

image Solve:

solomonxie commented 6 years ago

❖ Volumes of 「3D Solids」 (Integral Calc)

Strategy:

Anyways, the key to solve these problems, is to HAVE STRONG SENSE OF 3D SHAPES. So that you could sense what is this problem asking for. And once you know what it's saying, you could easily solve it.

Volumes of solids of 「known shapes cross-section」

►Jump to Khan academy for some practice: Volumes of solids of known cross-section

Example

image Solve:

Example

image Solve:

Volumes of 「unknown solids」

Example

image Solve:

solomonxie commented 6 years ago

❖ Disc Method

Disc Method is a method for calculating the Volume of a 3D shape by rotating a 2D shape.

The strategy of this method is:

►Jump to Khan academy for some practice: Disc Method ▼Refer to the article: Finding volumes of 3-D objects with circular symmetry in at least one dimension

image image

Example

image Solve:

Example

image Solve:

Example

image Solve:

solomonxie commented 6 years ago

Washer Method

This method is another kind of Disc Method, which works on the discs which its centre is hollow.

Strategy:

►Jump to Khan academy for some practice: Washer method ▼Refer to the article: The washer method of calculating volumes of revolution

image

Example

image Solve:

solomonxie commented 6 years ago

❖ Shell Method

Shell Method is particularly good for calculating volume of a 3D shape by rotating a 2D shape around a VERTICAL LINE. Imagine there is a CYLINDER, and we're to calculate the surface area of the cylinder, and integrate the surface areas when the cylinder gets thiner and thiner.

image

Refer to Khan academy: Shell method for rotating around vertical line ►Jump to Khan academy for some practice: Shell method ▼Refer to Desmos Animation: Solids of Revolution (about y-axis) screencast 2018-06-22 00-46-21

▼Refer to the awesome article: The shell method of finding volumes of revolution

image

▼Refer to mathdemos.org for more intuitive animations: SHELL METHOD DEMO GALLERY

2curves1_shellsmovie cone_shellsmovie sin2_shellsmovie

Example

image Solve:

solomonxie commented 6 years ago

❖ 「Series」 basics (Calculus level)

►Jump back to previous note: Series (High school level)

Explicit Sequence vs. Recursive Sequence:

Explicit sequence would be presented as: a𝓃 = a₁ · kⁿ⁻¹. Recursive sequence would be presented as: a₁ = 3, a𝓃 = k · a𝓃₋₁

Sequence vs. Series:

Sequence is a LIST of numbers, Series is a NUMBER: the SUM of a sequence.

Convergence vs. Divergence:

Convergence means the limit of a function EXISTS. Divergence means the limit DOES NOT EXISTS.

「Geometric Series」 in 𝚺 Notation

▼Refer to Cool Math: Geometric Series image

Example

image

「Infinite Sequence」convergence | divergence

►Jump to practice: Sequence convergence/divergence

Example

image

「Finite Geometric Series」

►Jump to practice: Finite geometric series

Example

image Solve:

「Partial Sums」

Partial sums is just a fancy word for Finite series, because it's a a part of infinite series.

Example

image Solve:

Example

image Solve:

solomonxie commented 6 years ago

❖ Infinite Seires

image

Evaluate 「Infinite Series」 as limit of 「partial sums」

Evaluate the series, is actually to evaluate the LIMIT of the series function.

Example

image Solve: image

Example

image Solve: image

solomonxie commented 6 years ago

Infinite Geometric Series

Common Formula (Finite & Infinite)

image

Infintite Formula

image

Determine the Infinite Geometric Series Converges or Diverges

There are two basic rules for infinite geometric series: image

Example

image Solve:

Evaluate Infinite Geometric Series

Example

image Solve:

solomonxie commented 6 years ago

❖ Convergence Tests [DRAFT]

Here lists common Convergence Tests and overview of each. Details are singled out to each section.

Convergence test are a set of tests to determine wether the series CONVERGENT or DIVERGENT. It includes:

Test Description
► Divergent Test Take nth term's limit. (only to test divergence)
► Integral Test Take limit of the series function's integration.
► p-series Test Examine at the p value of 1/nᴾ.
► Comparison Test Compare the series to a "similar" p-series or geometric-series.
► Ratio Test Take limit of two terms ratio.
► Root Test Take the limit of nth root of nth term.
► Alternating Test Test if terms are decreasing, and take limit of nth term.

「Divergent Test」

Take the limit of nth term, if it's NOT ZERO, then it's DIVERGENT.

image

「Integral Test」

「p-series Test」

image

「Direct Comparison Test」

Compare the series to a "similar" p-series or geometric-series.

image

「Limit Comparison Test」

Compare the series to a "similar" p-series or geometric-series.

image

「Ratio Test」

Take limit of two terms ratio.

image

「Root Test」

Take the limit of nth root of nth term.

image

「Alternating Series Test」

Test if terms are decreasing, and take limit of nth term.

image

「Absolute Convergence」 & 「Conditional Convergence」

image

solomonxie commented 6 years ago

nth Term Test

It's also called the nth term divergence test. The test can only tell if the series is divergent or not. It CAN NOT tell if it converges.

Jump over to Khan academy practice: nth term test Refer to Khan academy: nth term divergence test

▼Here is the divergent test, very simple: image

Example

image Solve:

solomonxie commented 6 years ago

Integral Test

►Jump over to have practice at Khan academy: Integral test. Refer to article from tkiryl: The Integral Test Refer to Khan academy: Integral Test

▼Refer to awesome article from xaktly: Integral Test

image

image

「Conditions」 of Integral test

Assume the series a𝖓 can be represented as a function f(x). There are a few limitations for it to use the Integral test:

「Using」 Integral test

image

Example

image Solve: image

「Understanding」 Integral test

The Integral test has introduced the idea of calculating the total area under the function:

As been said above, we got this conclusion: image

Notice: DO NOT use the Integral Test to EVALUATE series, because in general they are NOT equal.

solomonxie commented 6 years ago

p-series Test

For the the series in form of 1/nᴾ, the easiest way to determine its convergence is using the p-series test:

image

▼Refer to xaktly: p-series test/harmonic series image

「Harmonic Series」

Harmonic Series is ∑ 1/n, and Harmonic Series DIVERGES. That's all you need to know.

image

▼Refer to Khan academy: harmonic series diverges image

solomonxie commented 6 years ago

❖ Comparison Test

You can understand Comparison Test intuitively as a Sandwich Test.

THIS TEST IS GOOD FOR RATIONAL EXPRESSIONS.

「Direct Comparison Test」

Assume that we have a series a_n, and we're to make up a similar series to it as b_n:

The logic is:

It's so much easier if you think it graphically.

▼Refer to video: Comparison Test (KristaKingMath) image image

▼Refer to xaktly: Comparison Test image

Example

image Solve:

「Limit Comparison Test」

Limit comparison test is like an extension when the Direct comparison test won't work. etc., when we compare a with b, although b converges but a > b, so we can't make any conclusion. And that's where the limit comparison test comes in place.

The logic is:

Jump over to Khan academy for practice: Limit comparison test

▼Refer to video: Limit Comparison Test (KristaKingMath) image

▼Refer to xaktly: Limit Comparison Test image

Example

image Solve: image

Example

image Solve:

solomonxie commented 6 years ago

Ratio Test

THIS TEST IS GOOD FOR FACTORIALS.

▼Refer to xaktly: Ratio test / root test

image

Example

image Solve:

Example

image Solve:

solomonxie commented 6 years ago

Root Test

"The root test is used in situations where a series term or part of it is raised to the power of the index variable. "

Notice: The root test isn't a good choice if a series contains factorial terms. If the root test isn't fairly easy to use, you probably shouldn't use it. But when it works, it often cuts to convergence or divergence quickly.

▼Refer to xaktly: Ratio test / root test

image

Example

image Solve:

solomonxie commented 6 years ago

❖ Alternating Series Test

It's the test for Alternating series.

►Refer to Khan academy: Alternating series test ►Refer to xaktly: Alternating Series

Alternating Series

It means, Terms of the series "alternate" between positive and negative.

etc., The alternating harmonic series: image

The Alternating Series Test

image

The very good example of this test is the Alternating Harmonic Series:

image

▲ It does CONVERGES. (But the Harmonic Series does NOT converge)

Strategy:

Example

image Solve:

Example

image Solve:

solomonxie commented 6 years ago

❖ 「Absolute」 vs. 「Conditional Convergence」

This section is not about calculation, but rather about the logic.

▶Refer to Khan academy: Conditional & absolute convergence

▶ Back to previous note on: p-series test ▶ Practice at Khan academy: determine-absolute-or-conditional-convergence

image

▼We can have a series in Given form and Absolute form: image

We call the series:

etc., image

▼Refer to xaktly image

Example

image Solve: image

Example

image Solve: image

Example

image Solve: image

Example

image Solve: image

solomonxie commented 6 years ago

❖ Error Estimation of Alternating Series

It's also called the Remainder Estimation of Alternating Series.

This is to calculating (approximating) an Infinite Alternating Series: image

►Jump over to Khan academy for practice: Alternating series remainder

►Refer to The Organic Chemistry Tutor: Alternate Series Estimation Theorem ►Refer to Mathonline: Error Estimation for Approximating Alternating Series ►Refer to mathwords: Alternating Series Remainder

The logic is:

▼Actual sum = Partial sum + Remainder: refer to Khan academy: Alternating series remainder

image

「Sign」 & 「Size」 of Error

►Refer to Khan academy: Alternating series remainder ►Refer to Khan academy: Worked example: alternating series remainder

For the Remainder series, its FIRST TERM is always DOMINATING the whole remainder:

Based on the error's sign, we could tell the approximated series is UNDERESTIMATED or OVERESTIMATED:

Bound the Error (accuracy control)

The error bound regards to the accuracy of the approximated series, and we want to control the accuracy before approximation.

►Refer to Khan academy: Worked example: alternating series remainder

We have 2 ways to bound the error in a range:

Bound by terms

The Larger n → The smaller gap → The lesser Error → The more accurate.

Strategy:

Bound the error

To bound the error in a range, we often say:

What they mean are the same: image

▲ And by solving the inequality, we will get the scope for n, then get the Smallest Integer of n in that scope.

Example

image Solve:

Example

image Solve:

solomonxie commented 6 years ago

❖ Error Estimation Theorem

The Error Estimation Theorem is not only for alternating series, but available for all infinite series.

▼Boundary of estimating series: refer to Khan academy: Series estimation with integrals

image

solomonxie commented 6 years ago

❖ Interval of Convergence

When we see the series as a function, we can actually specify an interval for the function so that the series certainly converges over this interval.

►Jump over to have practice at Khan academy: Interval of convergence

The method is kind of like finding the interval of an ordinary function:

Example

image Solve:

solomonxie commented 6 years ago

❖ Power Series

Try to think Power series = Geometric Series.

►Refer to Math24: Power series

Power series is actually the Geometric series in a more general and abstract form.

image

For easier to remember it, that could be simplified as:

image

In this function it's critical to know that: a_n IS A CONSTANT NUMBER! NOT A VARIABLE !

Differentiate 「Power series」

►Refer to Khan academy: Differentiating power series

We have 2 ways to differentiate series, they work same way:

Either way will do, it depends on the actual equation for you to choose which way you're gonna use.

Example

image Solve:

Example

image Solve:

Integrate 「Power Series」

Example

image Solve:

「Integrals & derivatives」 of functions with 「known power series」

► Jump over to have practice at Khan academy.

Example

image Solve:

Example

image Solve:

solomonxie commented 6 years ago

❖ Taylor Series

Taylor series, or Taylor polynomial is a series that can REPRESENT a function, regardless what function it is.

▼Refer to 3Blue1Brown for animation & intuition: Taylor series | Chapter 10, Essence of calculus

"Taylor Series is one of the most powerful tools Math has to offer for approximating functions." - 3Blue1Brown

►Refer to Khan academy: Taylor & Maclaurin polynomials intro (part 1) ▼Refer to xaktly: Taylor Series image

image (▲ C represents the centre where we're centred at to approximate the function.)

▲ Notice: The Taylor Series is a Power Series, which means we can use a lot of techniques of power series on this to operate it easily.

We could expand it and make it clearer ▼: image

The main purpose of using a Taylor Polynomial is to REPLACE the original function with a polynomial, which it is easy to work with.

etc., we can express the function f(x) = eˣ as ▼: image

More importantly, by adding more & more terms into the polynomial, we can approximate the function more precisely:

►Refer to joseferrer: Mathematical explanation - Taylor series ►For More animation, visit Desmos: Taylor Series Visualization

97f5384c9b8d6ceebf3b894efc106adb

Example

image Solve:

Example

image Solve:

solomonxie commented 6 years ago

❖ Maclaurin Series

It's also called Maclaurin polynomials.

Maclaurin series is a special case of Taylor Series which centres at x=0.

image

▼Expand it we'll understand it better: image

▼Here is a graph we're trying to approximate a function centred at x=0: image

Example

image Solve:

Example

image Solve:

Evaluate 「Maclaurin Series」

To evaluate a Maclaurin series, we need to convert the series to a function, and then evaluate the function.

▼Jump forward to have a look at the note: Maclaurin Series of Common functions

solomonxie commented 6 years ago

❖ Lagrange Error Bound

It's also called the Lagrange Error Theorem, or Taylor's Remainder Theorem.

To approximate a function more precisely, we'd like to express the function as a sum of a Taylor Polynomial & a Remainder.

image (▲ For T is the Taylor polynomial with n terms, and R is the Remainder after n terms.)

▲Jump back to review the note on Error estimation Theorem.

►Jump over to have practice at Khan academy: Lagrange Error Bound.

The tricky part of that expression is to "preset" the accuracy of the Error, aka. the Remainder.

For bounding the Error, out strategy is to apply the Lagrange Error Bound theorem.

Simply saying, the theorem is:

Example

image Solve:

Example

image Solve:

Example

image Solve:

solomonxie commented 6 years ago

Finding Taylor series for a function [DRAFT]

►Refer to Khan academy's unit: Finding Taylor or Maclaurin series for a function

solomonxie commented 6 years ago

Function as a 「Geometric Series」

Example

image Solve:

solomonxie commented 6 years ago

❖ Maclaurin Series of Common functions

►Refer to Wiki: List of Maclaurin series of some common functions

Maclaurin series of these common functions are very useful, which we really want to memorize.

Function Maclaurin Series
sin(x) image
cos(x) image
tan(x) image
sec(x) image
image
Geometric series 1 image
Geometric series 2 image
Geometric series 3 image

Example

image Solve:

Example

image Solve: image

Example

image Solve:

Example

image Solve:

solomonxie commented 6 years ago

「Euler's Formula」 & 「Euler's Identity」

"The Euler's identity connects all of these FUNDAMENTAL NUMBERS in some mystical way that shows that there's some connectedness to the UNIVERSE. If this does not blow your mind, you have no emotion." - Sal Khan

▶︎Refer to the most well-known lecture from Sal Khan: Euler's formula & Euler's identity

Euler's formula: image

image

Euler's identity: image

solomonxie commented 5 years ago

Multivariable functions [DRAFT]

solomonxie commented 5 years ago

3D Vector Fileds [DRAFT]

solomonxie commented 5 years ago

Parametric Functions [DRAFT]

solomonxie commented 5 years ago

Partial derivatives [DRAFT]

"...this concept is nothing to be intimidated by. Partial differentiation is essentially just taking a multi dimensional problem and pretending that it's just a standard 1D problem when we consider each variable separately."

Refer to Coursera: Variables, constants & context

solomonxie commented 5 years ago

Gradient [DRAFT]

Now we take many partial derivatives out from a function, and we need to pack them together in a form. We call the form of pack The gradient of the function.

image

For example: image

solomonxie commented 5 years ago

Total derivatives [DRAFT]

Refer to Coursera: Differentiate with respect to anything

image

image

solomonxie commented 5 years ago

Jacobian [DRAFT]

solomonxie commented 5 years ago

Directional derivative [DRAFT]

It is the more general form of the Partial derivative, because it not only give the derivatives with respects to axes, but to any direction.

Refer to Khan academy: Directional derivative Refer to youtube: Directional Derivatives and The Gradient

The Partial derivatives only give the SLOPE in x direction and y direction and more directions with respect to the variables, but what if we want to have a SLOPE in ANY DIRECTION?

So the Directional derivative comes in place to achieve that.

How to do this:

image

The Directional derivative is the Dot product of The Gradient & Unit vector:

image

Which comes from:

image

image

image

image image