# Consumer Surplus and Producer Surplus

You can think of demand and supply (of a product) as quantities that are functions of price. However, it can be convenient to also think of them as prices as functions of quantity, that is $$p = D(x)$$ and $$p = S(x)$$. Consumer surplus and producer surplus are such quantities. A consumer’s demand curve is the graph of $$p = D(X)$$, which shows the price per unit that the consumer is willing to pay for $$x$$ units of a product. …

Posted on

# Properties of Definite Integrals

We’ve seen that the definite integral $\int_a^c f(x)dx$ can be regarded as the area under the graph of $$y = f(x)$$ over the interval [a, c]. If you have a point $$b$$ such that $$a < b < c$$, the above integral can be expressed as the sum of the integral from $$a$$ to $$b$$, and the integral from $$b$$ to $$c$$. This is the additive property of definite integrals. …

Posted on

# Sane Development Practices

Some thoughts on programming from a non-programmer (at least by trade). Beware of tools that are too recent. Sometimes change is good. Oftentimes it isn’t. Developers like shiny new gadgets. These tend to be of lesser quality than older, more robust ones. Whenever someone calls their library “simple” or “easy”, skip it. It’s likely to be a poorly documented, inconsistent, and wasteful solution to whatever problem you might have. …

Posted on

# Applications of Definite Integrals

Total Profit A company finds that the marginal profit, in dollars, from drilling a well that is $$x$$ feet deep is given by $P^\prime(x) = \sqrt[5]{x}$ Find the profit when a well 250 ft deep is drilled. import sympy as sp from sympy.abc import x import matplotlib.pyplot as plt import numpy as np marginal_profit = sp.root(x, 5) marginal_profit ## x**(1/5) profit = sp.integrate(marginal_profit, x) profit ## 5*x**(6/5)/6 p = sp. …

Posted on

# Area and Definite Integrals

The process of integration is about making the logical connection that the antiderivative of a function $$f$$ does in fact lead to the exact area under the graph of $$f$$. That’s what’s called the fundamental theorem of calculus The Fundamental Theorem of Calculus The area under the graph of a nonnegative continuous function $$f$$ over an interval $$[a, b]$$ is determined as an area function $$A$$, which is an antiderivative of $$f$$; that is, $$\frac{d}{dx}A(x) = f(x)$$. …

Posted on