# Tag Archives: logarithm

## Exponentials Don’t Stretch

OK, this post’s title is only half true, but transforming exponentials can lead to counter-intuitive results.  This post shares a cool transformations activity using dynamic graphing software–a perfect set-up for a mind-bending algebra or precalculus student lesson in the coming year.  I use Desmos in this post, but this can be reproduced on any graphing software with sliders.

THE SCENARIO

You can vertically stretch any exponential function as much as you want, and the shape of the curve will never change!

But that doesn’t make any sense.  Doesn’t stretching a curve by definition change its curvature?

The answer is no.  Not when exponentials are vertically stretched.  It is an inevitable result from the multiplication of common bases implies add exponents property:

$b^a * b^c = b^{a+c}$

I set up a Desmos page to explore this property dynamically (shown below).  The base of the exponential doesn’t matter; I pre-set the base of the parent function (line 1) to 2 (in line 2), but feel free to change it.

From its form, the line 3 orange graph is a vertical stretch of the parent function; you can vary the stretch factor with the line 4 slider.  Likewise, the line 5 black graph is a horizontal translation of the parent, and the translation is controlled by the line 6 slider.  That’s all you need!

Let’s say I wanted to quadruple the height of my function, so I move the a slider to 4.  Now play with the h slider in line 6 to see if you can achieve the same results with a horizontal translation.  By the time you change h to -2, the horizontal translation aligns perfectly with the vertical stretch.  That’s a pretty strange result if you think about it.

Of course it has to be true because $y = 2^{x-(-2)} = 2^x*2^2 = 4*2^x$.  Try any positive stretch you like, and you will always be able to find some horizontal translation that gives you the exact same result.

Likewise, you can horizontally slide any exponential function (growth or decay) as much as you like, and there is a single vertical stretch that will produce the same results.

The implications of this are pretty deep.  Because the result of any horizontal translation of any function is a graph congruent to the initial function, AND because every vertical stretch is equivalent to a horizontal translation, then vertically stretching any exponential function produces a graph congruent to the unstretched parent curve.  That is, any vertical stretch of any exponential will never change its curvature!  Graphs make it easier to see and explore this, but it takes algebra to (hopefully) understand this cool exponential property.

NOT AN EXTENSION

My students inevitably ask if the same is true for horizontal stretches and vertical slides of exponentials.  I encourage them to play with the algebra or create another graph to investigate.  Eventually, they discover that horizontal stretches do bend exponentials (actually changing base, i.e., the growth rate), making it impossible for any translation of the parent to be congruent with the result.

ABSOLUTELY AN EXTENSION

But if a property is true for a function, then the inverse of the property generally should be true for the inverse of the function.  In this case, that means the transformation property that did not work for exponentials does work for logarithms!  That is,

Any horizontal stretch of any logarithmic function is congruent to some vertical translation of the original function.  But for logarithms, vertical stretches do morph the curve into a different shape.  Here’s a Desmos page demonstrating the log property.

The sum property of logarithms proves the existence of this equally strange property:

$log(A) + log(x) = log(A*x)$

CONCLUSION

Hopefully the unexpected transformational congruences will spark some nice discussions, while the graphical/algebraic equivalences will reinforce the importance of understanding mathematics more than one way.

Enjoy the strange transformational world of exponential and log functions!

## Old school integral

This isn’t going to be one of my typical posts, but I just cracked a challenging indefinite integral and wanted to share.

I made a mistake solving a calculus problem a few weeks ago and ended up at an integral that looked pretty simple.  I tried several approaches and found many dead ends before finally getting a breakthrough.  Rather than just giving a proof, I thought I’d share my thought process in hopes that some students just learning integration techniques might see some different ways to attack a problem and learn to persevere through difficult times.

In my opinion, most students taking a calculus class would never encounter this problem.  The work that follows is clear evidence why everyone doing math should have access to CAS (or tables of integrals when CAS aren’t available).

Here’s the problem:

Integrate $\int \left( x^2 \cdot \sqrt{1+x^2} \right) dx$.

For convenience, I’m going to ignore in this post the random constant that appears with indefinite integrals.

While there’s no single algebraic technique that will work for all integrals, sometimes there are clues to suggest productive approaches.  In this case, the square root of a binomial involving a constant and a squared variable term suggests a trig substitution.

From trig identities, I knew $tan^2 \theta + 1 = sec^2 \theta$, so my first attempt was to let $x=tan \theta$, which gives $dx=sec^2 \theta d\theta$.  Substituting these leads to

$(tan \theta)'=sec^2 \theta$, claiming two secants for the differential in a reversed chain rule, but left a single secant in the expression, so I couldn’t make the trig identities work because odd numbers of trigs don’t convert easily using Pythagorean identities.  Then I tried using $(sec \theta)'=sec \theta \cdot tan \theta$, leaving a single tangent after accounting for the potential differential–the same problem as before.  A straightforward trig identity wasn’t going to do the trick.

Then I recognized that the derivative of the root’s interior is $2x$.  It was not the exterior $x^2$, but perhaps integration by parts would work.  I tried $u=x \longrightarrow u'=dx$ and $v'=x\sqrt{1+x^2} dx \longrightarrow v=\frac{1}{2} \left( 1+x^2 \right)^{3/2} \cdot \frac{2}{3}$.  Rewriting the original integral gave

The remaining integral still suggested a trig substitution, so I again tried $x =tan \theta$ to get

but the odd number of secants led me to the same dead end from trigonometric identities that stopped my original attempt.  I tried a few other variations on these themes, but nothing seemed to work.  That’s when I wondered if the integral even had a closed form solution.  Lots of simple looking integrals don’t work out nicely; perhaps this was one of them.  Plugging the integral into my Nspire CAS gave the following.

OK, now I was frustrated.  The solution wasn’t particularly pretty, but a closed form definitely existed.  The logarithm was curious, but I was heartened by the middle term I had seen with a different coefficient in my integration by parts approach.  I had other things to do, so I employed another good problem solving strategy:  I quit working on it for a while.  Sometimes you need to allow your sub-conscious to chew on an idea for a spell.  I made a note about the integral on my To Do list and walked away.

As often happens to me on more challenging problems, I woke this morning with a new idea.  I was still convinced that trig substitutions should work in some way, but my years of teaching AP Calculus and its curricular restrictions had blinded me to other possibilities.  Why not try a hyperbolic trig substitution? In many ways, hyperbolic trig is easier to manipulate than circular trig.  I knew

$\frac{d}{dt}cosh(t)=sinh(t)$ and $\frac{d}{dt}sinh(t)=cosh(t)$,

and the hyperbolic identity

$cosh^2t - sinh^2t=1 \longrightarrow cosh^2t=1+sinh^2t$.

(In case you haven’t worked with hyperbolic trig functions before, you can prove these for yourself using the definitions of hyperbolic sine and cosine:  $cosh(x)=\frac{1}{2}\left( e^x + e^{-x} \right)$ and $sinh(x)=\frac{1}{2}\left( e^x - e^{-x} \right)$.)

So, $x=sinh(A) \longrightarrow dx=cosh(A) dA$, and substitution gives

Jackpot!  I was down to an even number of (hyperbolic) trig functions, so Pythagorean identities should help me revise my latest expression into some workable form.

To accomplish this, I employed a few more hyperbolic trig identities:

1. $sinh(2A)=2sinh(A)cosh(A)$
2. $cosh(2A)=cosh^2(A)+sinh^2(A)$
3. $cosh^2(A) = \frac{1}{2}(cosh(2A)+1)$
4. $sinh^2(A) = \frac{1}{2}(cosh(2A)-1)$

(All of these can be proven using the definitions of sinh and cosh above.  I encourage you to do so if you haven’t worked much with hyperbolic trig before.  I’ve always liked the close parallels between the forms of circular and hyperbolic trig relationships and identities.)

If you want to evaluate $\int x^2 \sqrt{x^2+1} dx$ yourself, do so before reading any further.

Using equations 3 & 4, expanding, and then equation 3 again turns the integral into something that can be integrated directly.

The integral was finally solved!  I then used equations 1 & 2 to rewrite the expression back into hyperbolic functions of A only.

The integral was solved using the substitution $x=sinhA \longrightarrow A=sinh^{-1}x$ and (using $cosh^2A-sinh^2A=1$), $coshA=\sqrt{x^2+1}$.  Substituting back gave:

but that didn’t match what my CAS had given.  I could have walked away, but I had to know if I had made an error someplace or just had found a different expression for the same quantity.  I knew the inverse sinh could be replaced with a logarithm via a quadratic expression in $e^x$.

Well, that explained the presence of the logarithm in the CAS solution, but I was still worried by the cubic in my second term and the fact that my first two terms were a sum whereas the CAS’s solution’s comparable terms were a difference.  But as a former student once said, “If you take care of the math, the math will take care of you.”  These expressions had to be the same, so I needed to complete one more identity–algebraic this time.  Factoring, rewriting, and re-expanding did the trick.

What a fun problem (for me) this turned out to be.  It’s absolutely not worth the effort to do this every time when a CAS or integral table can drop the solution so much more quickly, but it’s also deeply satisfying to me to know why the form of the solution is what it is.  It’s also nice to know that I found not one, but three different forms of the solution.

Morals:  Never give up.  Trust your instincts. Never give up. Try lots of variations on your instincts. And never give up!

## CAS Derivatives

Here’s a fun problem from my calculus class today, enhanced by CAS. As a set-up, our last unit focused on interpreting the meaning of derivatives with multiple interpretations of the definition of the derivative as the only algebraic work they’ve done.  In that unit, the students discovered that vertical translations on functions didn’t change their derivatives, and horizontal translations on functions changed the corresponding derivatives by the same horizontal translation.  From their work with derivatives of power functions using a definition of the derivative, they hypothesized and proved $\frac{d}{dx}(x^n)=n*x^{n-1}$ for natural (and a few other) values of n.  Knowing nothing else, I posed this.

Use your CAS, determine the derivatives of $y=ln(x)$, $y=ln(2x)$, $y=ln(3x)$, and $y=ln(4x)$.  Use your results to hypothesize the derivative of $y=ln(n*x)$.  Justify your claim.

The following image from the first part shows that the pattern is easy to spot.

Unfortunately, I posed the problem with only 10 minutes remaining in class, but the students clearly knew $\frac{d}{dx}(ln(n*x))=\frac{1}{x}$, but the looming question wasWHY.  With a couple minutes to spare, one guessed rules of logarithms might apply, but not having used them since their first semester exam, he didn’t recall the property.  Some colleagues may argue that I should have insisted on my students having those rules memorized in advance, but I firmly believe that this particular problem actually gave a reason for my students to relearn their logarithm properties.

I let the awkward moment hang there until another called out with glee,
$ln(n*x)=ln(n)+ln(x)$“, to which a third exclaimed, “and $ln(n)$ is a constant, making the derivative of $ln(n*x)$ the same as the derivative of
$ln(x)$,” clearly using her understanding of the effect of translations on functions and their derivatives that she learned in the last unit.

Two other nice ideas emerged:

1. They thought it convenient that $\frac{d}{dx}(ln(n*x))=\frac{1}{x}$, but now really want to know why.
2. A few observant ones noticed that $ln(x)$ and $\frac{1}{x}$ have different domains.  To these, I pointed out the warning at the bottom of the CAS screen above that most had completely overlooked when getting their initial answers.

These questions still linger for the class, but I argue that the use of CAS in my calculus class this afternoon

• emphasized the importance of logarithm properties in a more meaningful way than any pleas from me could have done,
• left a need in many to discover why $\frac{d}{dx}(ln(n*x))=\frac{1}{x}$, and
• raised domain issues that ultimately will lead to a deeper understanding for the existence of the absolute value in $\int{\frac{1}{x}dx}=ln(|x|)$.

It was a good end to our first day back after Spring Break and left my students wanting to know more.  What a great place to leave a group of students, thanks to CAS.

## Room to think …

This post describes what happens when students are allowed to develop their own problem-solving approaches.  Admittedly, this particular situation involves nothing deeper than different forms of symbol manipulation, but I still find it interesting to see how students tackle even simple problems when they aren’t given mandatory methods of solving.

I’m particularly fond of multiple solutions like these.  They encourage students to take approaches that match their thinking and provide spectacular opportunities for classes to compare and contrast different approaches.  Some are elegant, some always work (but require additional algebra), some are just painful–but each offers a different way to think about the problem.  Through my work with CAS, I have always emphasized the importance of recognizing that just because answers look different does not necessarily mean they are different.

Some of our precalculus classes were given the following problem.

$5^{x+4}=3^{2x-1}$

Following are 4 different approaches our students used to solve for x, the first three from my classes, and the last from a colleague’s.  (Thanks, Heather!!)

Method I:  One of the most common approaches recognized that logarithm properties can be used to pull down exponents.  These students applied a common logarithm to both sides.

$log(5^{x+4}) = log(3^{2x-1})$
$(x+4)log(5) = (2x-1)log(3)$
$x log(5)-2x log(3) = -log(3)-4log(5)$
$x = \frac{-log(3)-4log(5)}{log(5)-2log(3)}$

Method II:  A slightly more sophisticated approach applied a logarithm with a base matching one of the given exponentials.  Of course, a base-3 logarithm would work the same way.

$log_5(5^{x+4}) = log_5(3^{2x-1})$
$(x+4) = (2x-1)log_5(3)$
$x-2x log_5(3) = -log_5(3)-4$
$x = \frac{-log_5(3)-4}{1-2log_5(3)}$

Method III:  Two students decided to employ inverses to change the base of one exponential before equating exponents.

$5^{x+4} = (3^{log_3(5)})^{x+4} = 3^{2x-1}$
$log_3(5)(x+4) = 2x-1$
$x log_3(5)-2x = -1-4 log_3(5)$
$x = \frac{-1-4 log_3(5)}{log_3(5)-2}$

Method IV:  Yesterday, Heather showed me another approach one of her students used.

$5^{x+4} = 3^{2x-1}$
$5^x 5^4 = 3^{2x} 3^{-1}$
$5^x (625) = 9^x (\frac{1}{3})$
$1875 = \frac{9^x}{5^x}$
$x = log_{\frac{9}{5}}(1875)$

This means four very different looking answers were found.  Which were “correct”?  Of course, the question of equality of student responses motivated proof investigations far better than any prompts I could have planned.  It was a good day.