Wednesday, August 29

Derivatives of inverse trigonometric functions


Like many functions, the trigonometric functions also have inverse.  Just like how we can find the derivative of trigonometric functions, we can also find the derivatives of inverse trigonometric functions. In this article we shall take a quick look at inverse trig functions derivatives. To be able to find the standard formulae for derivatives of inverse trig functions, we would need the formula for derivative of any general inverse function.

That would be like this:
f’(x) = 1/g’(f(x)), where f and g are the inverse functions of each other.
Let us first try finding the inverse trig function derivatives of the sine function. The sine function inverse is written as arc sin (x). Therefore the function would look like this: y = arcsin(x),
Therefore, x= sin (y) for –pi/2 ≤ y ≤ pi/2. We fix this domain for the sine function to ensure that our inverse exists. If we don’t restrict the domain, then y could have multiple values for same value of x. For example, sin (pi/4) = 1/sqrt(2) and sin (3pi/4) is also 1/sqrt(2). With that in mind, we can write the relationship between sin and arc sin as follows:
Sin(arc sin (x)) = x and arc sin(sin(x))  = x
Thus here our f(x) = arc sin(x) and g(x) = sin (x), then using the derivative of inverse formula that we stated above we have:
f’(x) = 1/f’(g(x)) = 1/cos (arc sin (x))
This formula may to be applicable in practice. So let us make a few changes in there. We had earlier x = sin y so y = arc sin (x). Using that, the denominator of our derivative would become
Cos(arc sin (x)) = cos y
Next we use our primary trigonometric identity which was:
Cos^2 (x) + sin^2 (x) = 1
Thus, Cos^2 (y) + sin^2 (y) = 1 from this we have
Cos (y) =√( 1- sin^2 (y)) = √(1 – (sin y)^2). But we have already established that sin y = x. So replacing that we get,
Cos (y) = √(1 – x^2). So now plugging all that back to our equation of derivative of inverse trig functions for sine f’(x), we have:
f’(x) = 1/cos(arc sin(x)) = 1/cos y = 1/√(1-x^2)
Therefore we see that derivative of arc sin (x) = 1/√(1-x^2).
The derivatives of other trigonometric inverse functions of arc cos, arc tan etc can be derived in a similar way. They are:
d/dx arc cos (x) = -1/√(1-x^2) and d/dx arc tan (x) = 1/(1+x^2)

Monday, August 27

All about the hypotenuse of a right triangle


Like every triangle, a right angled triangle would also have three sides. However, in a right triangle one of the angles is a right angle. That means one of the angle measures 90 degrees (or 𝛑/2 radians). Since the sum of angles in any triangle has to be 180 degrees, in a right triangle as one angle is already 90 degrees, the sum of the other two angles have to be 90 degrees. That means that the other two angles are compliments of each other. It also means that the other two angles have to be acute angles. A typical right triangle would look as follows:

The longest side is called the hypotenuse. The side that is adjacent to the know angle is called the adjacent side and the side opposite to the known angle is called the opposite side. By default the hypotenuse will always be the side opposite the right angle.

The adjacent and opposite sides together are also called the legs of the right triangle. The length of the hypotenuse of a right angled triangle can be found using different methods, depending on what part of the triangle is given to us.

To find the hypotenuse of a right triangle given the length of the legs:
If the hypotenuse = c and the legs are ‘a’ and b. If a’ and b’ are known, then we can calculate the length of the hypotenuse using the Pythagorean rule as follows:
C^2 = a^2 + b^2
Finding hypotenuse of a right triangle given one of the angles and the adjacent side:
In the picture below,

Suppose the angle marked in red is x and the adjacent side = a, then the length of the hypotenuse H can be given by the formula:
H = a/Cos (x)
Formula for the hypotenuse of a right triangle given one of the angles and its opposite side:
Again from the picture above, if we are given the opposite = b instead of the adjacent side. Then the formula for the hypotenuse can be written as follows:
H = b/sin (x), where x is again the angle marked in red.
Thus as we saw above there are more than one ways to find the length of the hypotenuse of a right triangle.

Wednesday, August 22

Trapezoidal Numerical Integration


Introduction to numerical integration:  As we have seen, the ideal way to evaluate a definite integral a to b f(x) dx is to find a formula F(x) for one of the antiderivatives of f(x) and calculate the number F(b) – F(a). But some anti derivatives are hard to find, and still others, like the antiderivatives of (sin x)/x and sqrt(1 + x^4), have no elementary formulas. We do not mean merely that no one has yet succeeded in finding elementary formulas for the anti-derivatives of (sin x)/x and sqrt(1 + x^4). We mean it has been proved that no such formulas exist. Whatever, the reason, when we cannot evaluate a definite integral with an anti-derivative, we turn to numerical methods such as the trapezoidal rule and Simpson’s rule.
Numerical Integration Methods are Trapezoidal rule and Simpson’s rule. Let us now describe Trapezoidal numerical integration.

Trapezoidal Numerical Integration: When we cannot find a workable anti-derivative for a function f that we have to integrate, we partition the interval of integration, replace f by a closely fitting polynomial on each sub interval  integrate the polynomials and add the result to approximate the integral of f. The higher the degrees of the polynomials for a given partition, the better the results are.  For a given degree, the finer the partition, the better the results, until we reach the limits imposed by round-off and truncation errors.

The polynomials do not need to be of high degree to be effective. Even line segments (graphs of polynomials of degree 1) give good approximations if we use enough of them  .To see why, suppose we partition the domain [a, b] of f into n subintervals of length delta x = h = (b – a)/n and join the corresponding points on the curve with line segments.

The vertical lines from the ends of the segments to the partition points create a collection of trapezoids that approximate the region between the curve and the x-axis. We add the areas of the trapezoids, counting area above the x-axis as positive and area below the axis as negative.
T = ½ (y0 + y1) h + ½ (y1 + y2)h + ….. + ½ (yn-2 + yn-1) h + ½ (yn-1 + yn)h= h (1/2y0 + y1 + y2 + ….. + yn-1 + ½ yn) = h/2 (y0 + 2y1 + 2y2 + …. + 2yn-1 + yn).Where, Y0 = f (a), y1 = f(x1), Yn-1 = f(x n-1), yn = f(b).

The trapezoidal rule says: use T to estimate the integral of f from a to b. Numerical Integration in R As we have seen , the definition of the Riemann integral is not very efficient way to prove that a function is Riemann integral . However once it is known that a function f is Riemann integral on some interval [a, b] a modification of the definition makes it possible to evaluate the integral of simple limit.