Convert metres to centimetres, and then centimetres to millimetres: two functions, one after the other. Can the two steps be one? Can we go back? In this course we add, multiply and compose functions, we find when a function can be reversed, and we use functions to model real data with Python.
3 lessons, about 1 h 20 min3 simulations14 problems6 practice questionsPython in every lesson
We add, subtract, multiply and divide functions point by point, on the part of the domain that both share (and with a nonzero denominator for the quotient). The composite function (g∘f)(x) = g(f(x)) applies f first and then g. The order matters, and its domain is the set of x in the domain of f for which f(x) is in the domain of g.
A function is one-one if different inputs always give different outputs, and onto if every element of the codomain is an output. A function that is both has an inverse f⁻¹, which undoes f. We find the inverse by swapping x and y and solving. The graphs of f and f⁻¹ are mirror images in the line y = x.
A function can describe real data. We plot the data and choose a family: a line, a parabola or a reciprocal. Then the computer finds the best numbers with numpy's polyfit, which minimises the sum of the squares of the errors. We judge the model by its typical error, and we trust it only inside the range of the data.
Log in to join the discussion.
Loading…
With Standard, you also open 4 more problems and 1 Python lab. Everything you have used here stays free, always.