# calculus

Published articles for calculus.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## The Inequality

DevFeed: [The Inequality](<https://devfeed.tech/articles/the-inequality-40392.md>)

Original publisher: [Read original article](<https://www.jeremykun.com/2015/11/23/the-inequality/>)

Published: 2015-11-23T22:06:27Z

Content type: tutorial

Language: en

Sources: [Jeremy Kun](<https://devfeed.tech/sources/jeremy-kun.md>)

Topics: [math](<https://devfeed.tech/topics/math.md>), [Computer science](<https://devfeed.tech/topics/computer-science.md>), [Machine Learning & Artificial Intelligence](<https://devfeed.tech/topics/machine-learning-artificial-intelligence.md>), [Algorithms](<https://devfeed.tech/topics/algorithms.md>)

Tags: [calculus](<https://devfeed.tech/tags/calculus.md>), [cauchy-schwarz](<https://devfeed.tech/tags/cauchy-schwarz.md>), [chernoff-bound](<https://devfeed.tech/tags/chernoff-bound.md>), [computer-science](<https://devfeed.tech/tags/computer-science.md>), [euler-s-number](<https://devfeed.tech/tags/euler-s-number.md>), [inequality](<https://devfeed.tech/tags/inequality.md>), [machine-learning](<https://devfeed.tech/tags/machine-learning.md>), [math](<https://devfeed.tech/tags/math.md>), [mathematics](<https://devfeed.tech/tags/mathematics.md>), [taylor-series](<https://devfeed.tech/tags/taylor-series.md>)

### AI overview

This tutorial explains how the inequality 1+x ≤ e^x is used to bound the probability of bad events in machine-learning algorithm analysis and introduces its use in proving the weighted arithmetic-geometric mean inequality.

### Source excerpt

Math and computer science are full of inequalities, but there is one that shows up more often in my work than any other. Of course, I'm talking about $$\displaystyle 1+x \leq e^{x}$$ This is The Inequality. I've been told on many occasions that the entire field of machine learning reduces to The Inequality combined with the Chernoff bound (which is proved using The Inequality). Why does it show up so often in machine learning?

## Simulating a Biased Coin with a Fair Coin

DevFeed: [Simulating a Biased Coin with a Fair Coin](<https://devfeed.tech/articles/simulating-a-biased-coin-with-a-fair-coin-40344.md>)

Original publisher: [Read original article](<https://www.jeremykun.com/2014/02/12/simulating-a-biased-coin-with-a-fair-coin/>)

Published: 2014-02-12T10:00:51Z

Content type: tutorial

Language: en

Sources: [Jeremy Kun](<https://devfeed.tech/sources/jeremy-kun.md>)

Topics: [Computer science](<https://devfeed.tech/topics/computer-science.md>), [Algorithm](<https://devfeed.tech/topics/algorithm.md>), [Algorithms, Complexity](<https://devfeed.tech/topics/algorithms-complexity.md>), [Python](<https://devfeed.tech/topics/python.md>), [Mathematics](<https://devfeed.tech/topics/mathematics.md>)

Tags: [algorithm](<https://devfeed.tech/tags/algorithm.md>), [calculus](<https://devfeed.tech/tags/calculus.md>), [coins](<https://devfeed.tech/tags/coins.md>), [computational-complexity](<https://devfeed.tech/tags/computational-complexity.md>), [convergent-series](<https://devfeed.tech/tags/convergent-series.md>), [floating-point](<https://devfeed.tech/tags/floating-point.md>), [mathematics](<https://devfeed.tech/tags/mathematics.md>), [probabilistic](<https://devfeed.tech/tags/probabilistic.md>), [programming](<https://devfeed.tech/tags/programming.md>), [python](<https://devfeed.tech/tags/python.md>)

### AI overview

This guest article presents a Python algorithm for simulating a biased coin using a fair coin. It reads the intended probability's binary expansion and compares each bit with an independent fair random bit, returning when they differ. The method produces probability exactly equal to the intended bias, including for irrational probabilities, and has constant expected running time when the probability's bits are efficiently computable.

### Source excerpt

This is a guest post by my friend and colleague Adam Lelkes. Adam's interests are in algebra and theoretical computer science. This gem came up because Adam gave a talk on probabilistic computation in which he discussed this technique. Problem: simulate a biased coin using a fair coin. Solution: (in Python) def biasedCoin(binaryDigitStream, fairCoin): for d in binaryDigitStream: if fairCoin() != d: return d Discussion: This function takes two arguments, an iterator representing the binary expansion of the intended probability of getting 1 (let us denote it as $ p$) and another function that returns 1 or 0 with equal probability.

## The Two-Dimensional Fourier Transform and Digital Watermarking

DevFeed: [The Two-Dimensional Fourier Transform and Digital Watermarking](<https://devfeed.tech/articles/the-two-dimensional-fourier-transform-and-digital-watermarking-40336.md>)

Original publisher: [Read original article](<https://www.jeremykun.com/2013/12/30/the-two-dimensional-fourier-transform-and-digital-watermarking/>)

Published: 2013-12-30T19:24:05Z

Content type: tutorial

Language: en

Sources: [Jeremy Kun](<https://devfeed.tech/sources/jeremy-kun.md>)

Topics: [fourier transform](<https://devfeed.tech/topics/fourier-transform.md>), [watermarking](<https://devfeed.tech/topics/watermarking.md>), [Algorithm](<https://devfeed.tech/topics/algorithm.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [algorithm](<https://devfeed.tech/tags/algorithm.md>), [animations](<https://devfeed.tech/tags/animations.md>), [big-o-notation](<https://devfeed.tech/tags/big-o-notation.md>), [calculus](<https://devfeed.tech/tags/calculus.md>), [dimension](<https://devfeed.tech/tags/dimension.md>), [fft](<https://devfeed.tech/tags/fft.md>), [fourier-analysis](<https://devfeed.tech/tags/fourier-analysis.md>), [fourier-transform](<https://devfeed.tech/tags/fourier-transform.md>), [github](<https://devfeed.tech/tags/github.md>), [graphics](<https://devfeed.tech/tags/graphics.md>), [image-manipulation](<https://devfeed.tech/tags/image-manipulation.md>), [images](<https://devfeed.tech/tags/images.md>), [james-hance](<https://devfeed.tech/tags/james-hance.md>), [mathematics](<https://devfeed.tech/tags/mathematics.md>), [matrices](<https://devfeed.tech/tags/matrices.md>), [programming](<https://devfeed.tech/tags/programming.md>), [python](<https://devfeed.tech/tags/python.md>), [star-wars](<https://devfeed.tech/tags/star-wars.md>), [up](<https://devfeed.tech/tags/up.md>), [watermarking](<https://devfeed.tech/tags/watermarking.md>)

### AI overview

This tutorial introduces the multidimensional Fourier transform, explains its relationship to the one-dimensional transform, describes an FFT-style algorithm for computing it, and applies it to digitally watermarking images.

### Source excerpt

We've studied the Fourier transform quite a bit on this blog: with four primers and the Fast Fourier Transform algorithm under our belt, it's about time we opened up our eyes to higher dimensions. Indeed, in the decades since Cooley & Tukey's landmark paper, the most interesting applications of the discrete Fourier transform have occurred in dimensions greater than 1. But for all our work we haven't yet discussed what it means to take an "n-dimensional" Fourier transform.

## Optimism in the Face of Uncertainty: the UCB1 Algorithm

DevFeed: [Optimism in the Face of Uncertainty: the UCB1 Algorithm](<https://devfeed.tech/articles/optimism-in-the-face-of-uncertainty-the-ucb1-algorithm-40332.md>)

Original publisher: [Read original article](<https://www.jeremykun.com/2013/10/28/optimism-in-the-face-of-uncertainty-the-ucb1-algorithm/>)

Published: 2013-10-28T11:42:55Z

Content type: tutorial

Language: en

Sources: [Jeremy Kun](<https://devfeed.tech/sources/jeremy-kun.md>)

Topics: [Algorithm](<https://devfeed.tech/topics/algorithm.md>), [Mathematics](<https://devfeed.tech/topics/mathematics.md>), [Data Science](<https://devfeed.tech/topics/data-science.md>)

Tags: [algorithm](<https://devfeed.tech/tags/algorithm.md>), [bandit-learning](<https://devfeed.tech/tags/bandit-learning.md>), [bandits](<https://devfeed.tech/tags/bandits.md>), [big-o-notation](<https://devfeed.tech/tags/big-o-notation.md>), [calculus](<https://devfeed.tech/tags/calculus.md>), [confidence-bounds](<https://devfeed.tech/tags/confidence-bounds.md>), [exploitation](<https://devfeed.tech/tags/exploitation.md>), [exploration](<https://devfeed.tech/tags/exploration.md>), [machine-learning](<https://devfeed.tech/tags/machine-learning.md>), [mathematics](<https://devfeed.tech/tags/mathematics.md>), [programming](<https://devfeed.tech/tags/programming.md>), [python](<https://devfeed.tech/tags/python.md>), [random-variables](<https://devfeed.tech/tags/random-variables.md>), [randomized-algorithm](<https://devfeed.tech/tags/randomized-algorithm.md>), [science](<https://devfeed.tech/tags/science.md>)

### AI overview

This tutorial introduces the multi-armed bandit problem as a model of the exploration-exploitation tradeoff and presents the UCB1 algorithm, which the article describes as performing close to optimally.

### Source excerpt

startups The software world is always atwitter with predictions on the next big piece of technology. And a lot of chatter focuses on what venture capitalists express interest in. As an investor, how do you pick a good company to invest in? Do you notice quirky names like "Kaggle" and "Meebo," require deep technical abilities, or value a charismatic sales pitch? When it comes to innovation in software engineering and computer science, and that as a society we should value big pushes forward much more than we do.

## Seam Carving for Content-Aware Image Scaling

DevFeed: [Seam Carving for Content-Aware Image Scaling](<https://devfeed.tech/articles/seam-carving-for-content-aware-image-scaling-40306.md>)

Original publisher: [Read original article](<https://www.jeremykun.com/2013/03/04/seam-carving-for-content-aware-image-scaling/>)

Published: 2013-03-04T22:19:19Z

Content type: tutorial

Language: en

Sources: [Jeremy Kun](<https://devfeed.tech/sources/jeremy-kun.md>)

Topics: [scaling](<https://devfeed.tech/topics/scaling.md>), [Mathematics](<https://devfeed.tech/topics/mathematics.md>), [pixel](<https://devfeed.tech/topics/pixel.md>), [implementation](<https://devfeed.tech/topics/implementation.md>), [Web Development](<https://devfeed.tech/topics/web-development.md>)

Tags: [calculus](<https://devfeed.tech/tags/calculus.md>), [graphics](<https://devfeed.tech/tags/graphics.md>), [image](<https://devfeed.tech/tags/image.md>), [implementation](<https://devfeed.tech/tags/implementation.md>), [javascript](<https://devfeed.tech/tags/javascript.md>), [mathematics](<https://devfeed.tech/tags/mathematics.md>), [photoshop](<https://devfeed.tech/tags/photoshop.md>), [processing](<https://devfeed.tech/tags/processing.md>), [programming](<https://devfeed.tech/tags/programming.md>), [scaling](<https://devfeed.tech/tags/scaling.md>), [seam-carving](<https://devfeed.tech/tags/seam-carving.md>), [web-development](<https://devfeed.tech/tags/web-development.md>)

### AI overview

This tutorial explains seam carving, a content-aware image-rescaling method that removes or adds pixels the viewer is least likely to notice. It introduces the motivation, mathematical background, and a working implementation for reducing and enlarging images.

### Source excerpt

The Problem with Cropping Every programmer or graphic designer with some web development experience can attest to the fact that finding good images that have an exactly specified size is a pain. Since the dimensions of the sought picture are usually inflexible, an uncomfortable compromise can come in the form of cropping a large image down to size or scaling the image to have appropriate dimensions. Both of these solutions are undesirable.

## A critique of introductory programming education and the loss of exploratory problem-solving

DevFeed: [A critique of introductory programming education and the loss of exploratory problem-solving](<https://devfeed.tech/articles/learning-programming-finger-painting-and-killing-zombies-40265.md>)

Original publisher: [Read original article](<https://www.jeremykun.com/2012/03/15/learning-programming-zombies/>)

Published: 2012-03-15T01:01:07Z

Content type: opinion

Language: en

Sources: [Jeremy Kun](<https://devfeed.tech/sources/jeremy-kun.md>)

Topics: [Programming](<https://devfeed.tech/topics/programming.md>), [Python](<https://devfeed.tech/topics/python.md>), [Learning](<https://devfeed.tech/topics/learning.md>)

Tags: [calculus](<https://devfeed.tech/tags/calculus.md>), [education](<https://devfeed.tech/tags/education.md>), [java](<https://devfeed.tech/tags/java.md>), [learning](<https://devfeed.tech/tags/learning.md>), [mathematics](<https://devfeed.tech/tags/mathematics.md>), [programming](<https://devfeed.tech/tags/programming.md>), [python](<https://devfeed.tech/tags/python.md>), [students](<https://devfeed.tech/tags/students.md>), [teaching](<https://devfeed.tech/tags/teaching.md>)

### AI overview

The author contrasts their exploratory early programming experiences with an introductory Python course focused on following directions, manipulating data, and implementing routine exercises. They argue that students are not given enough opportunities to solve meaningful problems or experience the satisfaction of programming.

### Source excerpt

By the end, the breadth and depth of our collective knowledge was far beyond what anyone could expect from any high school course in any subject. Education Versus Exploration I'm a lab TA for an introductory Python programming course this semester, and it's been...depressing. I remember my early days of programming, when the possibilities seemed endless and adding new features to my programs was exciting and gratifying, and I brimmed with pride at every detail, and I boasted to my friends of the amazing things I did, and I felt powerful.

## Numerical Integration

DevFeed: [Numerical Integration](<https://devfeed.tech/articles/numerical-integration-40253.md>)

Original publisher: [Read original article](<https://www.jeremykun.com/2012/01/08/numerical-integration/>)

Published: 2012-01-08T18:08:42Z

Content type: tutorial

Language: en

Sources: [Jeremy Kun](<https://devfeed.tech/sources/jeremy-kun.md>)

Topics: [function](<https://devfeed.tech/topics/function.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [article](<https://devfeed.tech/tags/article.md>), [calculus](<https://devfeed.tech/tags/calculus.md>), [function](<https://devfeed.tech/tags/function.md>), [mathematica](<https://devfeed.tech/tags/mathematica.md>), [mathematics](<https://devfeed.tech/tags/mathematics.md>), [numerical-analysis](<https://devfeed.tech/tags/numerical-analysis.md>), [programming](<https://devfeed.tech/tags/programming.md>), [simpson-s-rule](<https://devfeed.tech/tags/simpson-s-rule.md>), [trapezoidal-rule](<https://devfeed.tech/tags/trapezoidal-rule.md>)

### AI overview

This article explains numerical integration by revisiting definite integrals, Riemann sums, and partition-based approximations. It introduces the problem of approximating a function's definite integral and begins with the left Riemann sum.

### Source excerpt

Rectangles, Trapezoids, and Simpson's I just wrapped up a semester of calculus TA duties, and I thought it would be fun to revisit the problem of integration from a numerical standpoint. In other words, the goal of this article is to figure out how fast we can approximate the definite integral of a function $ f:\mathbb{R} \to \mathbb{R}$. Intuitively, a definite integral is a segment of the area between a curve $ f$ and the $ x$-axis, where we allow area to be negative when $ f(x) < 0$.

## False Proof: 1 = 2 (with Calculus)

DevFeed: [False Proof: 1 = 2 (with Calculus)](<https://devfeed.tech/articles/false-proof-1-2-with-calculus-40245.md>)

Original publisher: [Read original article](<https://www.jeremykun.com/2011/10/25/false-proof-1-2-with-calculus/>)

Published: 2011-10-25T14:46:12Z

Content type: tutorial

Language: en

Sources: [Jeremy Kun](<https://devfeed.tech/sources/jeremy-kun.md>)

Topics: [Math and Logic](<https://devfeed.tech/topics/math-and-logic.md>), [function](<https://devfeed.tech/topics/function.md>), [Variable](<https://devfeed.tech/topics/variable.md>)

Tags: [calculus](<https://devfeed.tech/tags/calculus.md>), [false-proof](<https://devfeed.tech/tags/false-proof.md>), [function](<https://devfeed.tech/tags/function.md>), [logic](<https://devfeed.tech/tags/logic.md>), [variable](<https://devfeed.tech/tags/variable.md>)

### AI overview

This article presents a false calculus proof that 1 equals 2 and explains that the error comes from differentiating a variable-length sum with respect to only one of its variables.

### Source excerpt

Problem: Show 1 = 2 (with calculus) "Solution": Consider the following: $ 1^2 = 1$ $ 2^2 = 2 + 2$ $ 3^2 = 3 + 3 + 3$ $ \vdots$ $ x^2 = x + x + \dots + x$ ($ x$ times) And since this is true for all values of $ x$, we may take the derivative of both sides, and the equality remains true. In other words: