DEV Community

Cover image for Calculus for ML: Derivatives. Part - 2
Fatima Jannet
Fatima Jannet

Posted on

Calculus for ML: Derivatives. Part - 2

Today I'll be talking about the Inverse function, derivative of trigonometric function, exponential and logarithms.

Inverse function
The inverse function's job is to basically undo another function. The general definition is - if you get y out of f(x), then if you put y into the inverse of f, then you will get x.
Image description
If you put x through f function and you get x^2, then you put x^2 into g function, then you get x. That's why inverse function is also known as anti-function.

Now, let's have a look at their graphs.
Image description

As we saw, they are a reflection of each other (check the axis if you have any confusion). So. the slope is inverse of one another.
Slope : ∆f/∆x = ∆y/ ∆g and, g'(y) = 1/f'(x)

Derivative of trigonometric function
Derivatives of the trigonometric functions can be found on sin(x) and cos(x). The tangent, tan(x) = sin(x)/cos(x)

f(x) = sinx
=> f'(x) = cosx

Image description

Image description

Exponentials
Do you know Euler's number? To understand exponential function we need to first understand euler's number. Euler's Number 'e' is a numerical constant used in mathematical calculations. The value of e is 2.718281828459045…so on. As it's an irrational number, e can't be expressed through ration between two integers. So, we will define it is by using the expression (1 + 1/n)^n. Let's look at this expression for several values of n.

Image description

Look here, the more we increase the number o n, the more it goes to a certain value and if we keep doing this, it gets more closer to 2.7182818284...

Image description

the function and it's derivative both are the same. Why it is the same? I'll explain it to another blog!!

Exponential function is related to many real life situations such as any kind of growth, investment, bank deposits, loans and profit, et cetera.

*Logarithms *
The logarithmic function is the inverse function of exponentiation.
Image description

The right graph was calculated by using the result for inverses.
Therefore, the derivative of logarithm is 1 over y.

Top comments (0)