# Differentiating Bananas and Co-bananas

# Differentiating Bananas and Co-bananas

Join the DZone community and get the full member experience.

Join For FreeThe open source HPCC Systems platform is a proven, easy to use solution for managing data at scale. Visit our Easy Guide to learn more about this completely free platform, test drive some code in the online Playground, and get started today.

I saw a tweet this morning from Patrick Honner pointing to a blog post asking how you might teach derivatives of sines and cosines differently.

One thing I think deserves more emphasis is that “co” in cosine etc. stands for “complement” as in complementary angles. The cosine of an angle is the sine of the complementary angle. For any function *f*(*x*), its complement is the function *f*(π/2 – *x*).

When memorizing a table of trig functions and their derivatives, students notice a pattern. You can turn one formula into another by replacing every function with its co-function and adding a negative sign on one side. For example,

(*d*/*dx*) tan(*x*) = sec^{2}(*x*)

and so

(*d*/*dx*) cot(*x*) = – csc^{2}(*x*)

In words, the derivative of tangent is secant squared, and the derivative of cotangent is negative cosecant squared.

The explanation of this pattern has nothing to do with trig functions *per se*. It’s just the chain rule applied to f(π/2 – x).

(*d*/*dx*) *f*(π/2 – *x*) = – *f*‘(π/2 – *x*).

Suppose you have some function banana(*x*) and its derivative is kiwi(*x*). Then the cobanana function is banana(π/2 – *x*), the cokiwi function is kiwi((π/2 – *x*), and the derivative of cobanana(*x*) is –cokiwi(*x*). In trig-like notation

(*d*/*dx*) ban(*x*) = kiw(*x*)

implies

(*d*/*dx*) cob(*x*) = – cok(*x*).

Now what *is* unique to sines and cosines is that the second derivative gives you the negative of what you started with. That is, the sine and cosine functions satisfy the differential equation *y*” = –*y*. That doesn’t necessarily happen with bananas and kiwis. If the derivative of banana is kiwi, that doesn’t imply that the derivative of kiwi is negative banana. If the derivative of kiwi is negative banana, then kiwis and bananas must be linear combinations of sines and cosines because all solutions to *y*” = –*y* have the form *a*sin(*x*) + *b* cos(*x*).

**Footnote**: Authors are divided over whether the cokiwi function should be abbreviated cok or ckw.

Managing data at scale doesn’t have to be hard. Find out how the completely free, open source HPCC Systems platform makes it easier to update, easier to program, easier to integrate data, and easier to manage clusters. Download and get started today.

Published at DZone with permission of John Cook , DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

## {{ parent.title || parent.header.title}}

## {{ parent.tldr }}

## {{ parent.linkDescription }}

{{ parent.urlSource.name }}