Showing posts with label Trigonometry. Show all posts
Showing posts with label Trigonometry. Show all posts

Thursday, July 19, 2012

Some common functions in Maxima - trig, logarithms, the exponential, and square root

http://maxima.sourceforge.net/docs/manual/en/maxima_10.html#SEC47

exp(x)
log(x)
sqrt(x)
acos(x)
acosh(x)
acot(x)
acoth(x)
asin(x)
asinh(x)
asec(x)
asech(x)
acsc(x)
acsch(x)
atan(x)
atanh(x)
cos(x)
cosh(x)
cot(x)
coth(x)
sin(x)
sinh(x)
sec(x)
sech(x)
csc(x)
csch(x)
tan(x)
tanh(x)
Maxima does not have a built-in function for the base 10 logarithm or other bases. log10(x) := log(x) / log(10) is a useful definition.

Friday, February 3, 2012

Natural log and trig relation: -ln(tan(phi/2)) = ln(csc(phi) + cot(phi)) and the integrals of csc^3(phi) and csc(phi)

\[

- \ln \left( \tan \dfrac{\phi}{2} \right) = - \ln \left( \dfrac{\sin \phi}{1 + \cos \phi} \right) = \ln \left( \dfrac{1 + \cos \phi}{\sin \phi} \right) = \ln \left( \dfrac{1}{\sin \phi} + \dfrac{\cos \phi}{\sin \phi} \right)

\]
\[

= \ln \left( \csc \phi + \cot \phi \right)

\]

However, I recently was using this in an analysis, was checking some work, and noticed that:


\[

\ln \left( \tan \dfrac{\phi}{2} \right) = \ln \left( \dfrac{1 - \cos \phi}{\sin \phi} \right) =  \ln \left( \csc \phi - \cot \phi \right)

\]

I looked up the formulas again and became quite confused.


The tangent half angle relations are:

\[ \tan \dfrac{\phi}{2} = \dfrac{1 - \cos \phi}{\sin \phi}\]

and

\[ \tan \dfrac{\phi}{2} = \dfrac{\sin \phi}{1 + \cos \phi}\]

So, I guess the relation is:

\[ \ln \left( \csc \phi - \cot \phi \right) = -\ln \left( \csc \phi + \cot \phi \right) \]

Yup, it is confirmed:



Links to the tangent half angle:

http://en.wikipedia.org/wiki/Tangent_half-angle_formula

http://planetmath.org/encyclopedia/DerivationOfHalfAngleFormulaeForTangent.html


However, my problem originates to the integral of \( \csc^3 \phi \).  This integral can be solved by (at least how I did it)

\[ \int \csc^3 \phi \mathrm{d} \phi \]

First, utilize integration by parts

\[ \mathrm{d}v = \csc^2 \phi \mathrm{d} \phi \]

\[ u = \csc \phi \]

\[ v = -\cot \phi \]

\[ \mathrm{d}u = - \csc \phi \cot \phi \mathrm{d} \phi \]

The formula for integration by parts is

\[ uv - \int v \mathrm{d}u \]

Substituting in the correct values gives

\[ -\csc \phi \cot \phi - \int \csc \phi \cot^2 \phi \mathrm{d} \phi \]

Using the trigonometric identity \( \cot^2 \phi = \csc^2 \phi - 1 \) transforms the relation to

\[ -\csc \phi \cot \phi - \int \csc \phi \left( \csc^2 \phi - 1 \right) \mathrm{d} \phi \]

Multiplying through we obtain

\[ -\csc \phi \cot \phi - \int \csc^3 \phi - \csc \phi \mathrm{d} \phi \]

Separating the RHS integrals produces

\[ -\csc \phi \cot \phi - \int \csc^3 \phi \mathrm{d} \phi +  \int \csc \phi \mathrm{d} \phi \]

Recall that this whole relation is equal to \(  \int \csc^3 \phi \mathrm{d} \phi \) which yields

\[  \int \csc^3 \phi \mathrm{d} \phi = -\csc \phi \cot \phi - \int \csc^3 \phi \mathrm{d} \phi +  \int \csc \phi \mathrm{d} \phi \]

At first this seems counter-intuitive and does not seem to help.  However, if you collect the integrals of \( \csc^3 \phi \) the equation becomes clearer as where to go next.  So collecting the \( \csc^3 \phi \) integrals to the LHS, we obtain

\[  2 \int \csc^3 \phi \mathrm{d} \phi = -\csc \phi \cot \phi +  \int \csc \phi \mathrm{d} \phi \]

Then we can divide by two and evaluate the left hand side which gives us

\[  \int \csc^3 \phi \mathrm{d} \phi = \dfrac{1}{2} \left[ -\csc \phi \cot \phi +  \int \csc \phi \mathrm{d} \phi \right] \]

Okay, so this is where my problem began.  I've found two answers for this integral of \( \csc \phi \).  The first is the same as the one I got by evaluating the integral of \( \csc \phi \)

\[  \int \csc^3 \phi \mathrm{d} \phi = \dfrac{1}{2} \left[ -\csc \phi \cot \phi - \ln | \csc \phi - \cot \phi | \right] \]

where

\[ \int \csc \phi \mathrm{d} \phi = - \ln | \csc \phi - \cot \phi | \]

according to: http://www.math.com/tables/integrals/more/csc.htm

However, here: http://answers.yahoo.com/question/index?qid=20080225213623AAUQMz6, the answer is

\[ \int \csc \phi \mathrm{d} \phi = - \ln | \csc \phi + \cot \phi | \]

?? (I'll have to check these to make sure there isn't a mistake.

To make matters worse here: http://answers.yahoo.com/question/index?qid=20080623173220AAyRTys we get an answer for \( \int \csc^3 \phi \mathrm{d} \phi \) equal to

\[  \dfrac{1}{2} \left[ -\csc \phi \cot \phi + \ln | \csc \phi - \cot \phi | \right] \]

??? What the heck is going on?! (Again, when I get the time I will check these answers since the formulation is given.  However, this does give the final answer I am looking for which is

\[  \dfrac{1}{2} \left \lbrace -\csc \phi \cot \phi + \ln \left[ \tan \left( \dfrac{\phi}{2} \right) \right] \right \rbrace \]

However again, the relation I first displayed above shows that

\[  \dfrac{1}{2} \left[ -\csc \phi \cot \phi - \ln | \csc \phi + \cot \phi | \right] \]

\[ = -\dfrac{1}{2} \left[ \csc \phi \cot \phi + \ln | \csc \phi + \cot \phi | \right] \]


\[ = -\dfrac{1}{2} \left[ \csc \phi \cot \phi - \ln | \csc \phi - \cot \phi | \right] \]



\[ = \dfrac{1}{2} \left[ -\csc \phi \cot \phi + \ln | \csc \phi - \cot \phi | \right] \]

So this tells me that the second link should be correct!  The reason for this post originates to me trying to change the angle \( \phi \) from spherical polar coordinates to cylindrical polar coordinates \( \left( r, z \right) \) through the relation \( \phi = \tan \left( r/z \right) \)and \( R^2 = r^2 + z^2 \).  Thus, I am posting this to keep myself from become confused!

Saturday, November 26, 2011

sin(x) + cos(x)


\( \sin x + \cos x \)

Code for Maxima:

f(x) := sin(x) + cos(x)
plot2d(f(x), [x, 0, 7], [y, -2, 2]);


sin(x) - cos(x)


\( \sin x - \cos x \)

Code for Maxima:

f(x) := sin(x) - cos(x)
plot2d(f(x), [x, 0, 7], [y, -2, 2]);


Friday, November 25, 2011

tan(x)


\( \tan x \)

Code for Maxima:

plot2d(tan(x), [x, 0, 7], [y, -2, 2]);


sin(x) + cos(x)


\( \sin x + \cos x \)

Code for Maxima:

plot2d(sin(x)+cos(x), [x, 0, 7]);


Thursday, November 24, 2011

sin^2(x)*cos^2(x)

I'm going to make some post about some functions for reference.  This one is on the function combo

\( \sin^2 x \; \cos^2 x \)


Tuesday, November 22, 2011

Table of Trigonometric Identities

A website I frequent when looking for trigonometric identities and properties

Table of Trigonometric Identities

Some of the ones I often use:

\[ \sin^2 \phi + \cos^2 \phi = 1 \]

\[1 + \tan^2 \phi = \sec^2 \phi \]

\[ 1 + \cot^2 \phi = \csc^2 \phi \]