1. Not finding help here? Sign up for a free 30min tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Derivatives involving the Absolute Value of Functions

  1. Jun 10, 2014 #1
    Problem:

    y = ln|sec(x) + tan(x)|

    Attempted Solution: See Attachment

    I was hoping someone could identify my error and possibly write it out for me. At first I thought my steps were correct and everything was in order. However, when I checked my answer on WolframAlpha it gave me a slightly different result (actual answer is shown at the bottom of the attachment).

    Thanks!

    P.S: This was the source I consulted before attempting this:
    It could be possible that there's another technique I'm not aware of to solve such questions.
     

    Attached Files:

    Last edited by a moderator: Sep 25, 2014
  2. jcsd
  3. Jun 10, 2014 #2

    jbunniii

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    You made an error when canceling ##\sec(x) + \tan(x)## in the numerator with ##((\sec(x) + \tan(x))^2)^{1/2} = |\sec(x) + \tan(x)|## in the denominator. Since ##\sec(x) + \tan(x)## is negative for some values of ##x##, the two expressions are not the same.

    Also note that ##\sec(x)\tan(x) + \sec^2(x)## can be simplified.
     
  4. Jun 10, 2014 #3
    I see my error! The numerator is now correct.
    But I have two of these ((sec(x)+tan(x))2)1/2=|sec(x)+tan(x)| expressions in the denominator, and the answer has only one.
    How would I go about handling this?
     
    Last edited: Jun 10, 2014
  5. Jun 10, 2014 #4

    jbunniii

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    The answer you wrote at the bottom of the page is incorrect, and it also doesn't match what I get if I use Wolfram Alpha, so I'm not sure where you got that expression. Ignoring that answer for now, I assume you currently have:
    $$\frac{(\sec x \tan x + \sec^2 x)(\sec x + \tan x)}{|\sec x + \tan x|^2}$$
    Do you see how this can be simplified?
     
  6. Jun 10, 2014 #5
    Yes I have that answer exactly! (I simplified by factoring out the secx to get (secx)((secx + tanx)^2) in the numerator)
    Sorry, I realized my input into WolframAlpha was incorrect. Thanks for your help!
     
  7. Jun 10, 2014 #6

    jbunniii

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    Here is the output that Wolfram Alpha gives:
    $$\frac{\sec x(\sec x + \tan x)^2}{|\sec x + \tan x|^2}$$
    But this is a case of WA being obtuse: clearly this can be reduced to a much simpler expression! Do you see why?
     
  8. Jun 10, 2014 #7
    Not sure, but I have two guesses:
    a). What catches my eye first are the (secx + tanx)^2 in the numerator and denominator. But, I don't know anyway to simplify the expression further.
    b). A possible trigonometric identity I don't see?

    Haha, give me a hint! :P
     
  9. Jun 11, 2014 #8

    ehild

    User Avatar
    Homework Helper
    Gold Member

    Is not a2=|a|2 for any a?

    You overcomplicated the solution. Better to use the other definition of the absolute value: |a|=a if a≥0, |a|=-a if a<0.

    ehild
     
  10. Jun 11, 2014 #9

    Ray Vickson

    User Avatar
    Science Advisor
    Homework Helper

    Recall that
    [tex] \frac{d \ln|w|}{dw} = \frac{1}{w}[/tex]
    holds whether ##w## is positive or negative.
     
    Last edited by a moderator: Sep 25, 2014
  11. Jun 11, 2014 #10
    So would I have two separate solutions? i.e: One for when the denominator is positive and the other for when it is negative, and then simplify from there?

    Or is it something else?

    Thanks! I have the absolute value in the denominator so far, I guess it serves as a general answer.
    If what ehild said applies and I can have two separate answers (one for when the denominator is positive and the other for when it is negative), I should be able to simplify further!
     
  12. Jun 11, 2014 #11

    jbunniii

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    You don't have to go back and redo the problem another way unless you want to. The answer you have is fine, but you should simplify it:
    $$\frac{\sec x(\sec x + \tan x)^2}{|\sec x + \tan x|^2}$$
    Look at those two similar-looking expressions in the numerator and denominator. If ##y## is a real number, then what is the difference between ##(y)^2## and ##|y|^2##?
     
  13. Jun 11, 2014 #12

    Ray Vickson

    User Avatar
    Science Advisor
    Homework Helper

    Sure, but that is exactly where the formula ##d \ln|w| / dw = 1/w## comes from; in other words, it has already been done, automatically.
     
  14. Jun 11, 2014 #13

    ehild

    User Avatar
    Homework Helper
    Gold Member

    You have to get the derivative of the logarithm of the absolute value of a function y(x).

    ln(|y|)= ln(y) if y>0, and the derivative is ##\frac{d\ln(y)}{dx}= \frac{y'}{y}##
    In case y<0, ln(|y|) = ln(-y), and the derivative is ##\frac{d\ln(-y)}{dx}= -\frac{y'}{-y}=\frac{y'}{y}##

    The derivative is the same both for y<0 and for y>0, as Ray told you...

    The function y is ##y=\sec(x)+\tan(x)=\frac{1+\sin(x)}{\cos(x)}##, and its derivative is ## y'=\frac{1+\sin(x)}{\cos^2(x)} ## so y'/y=?

    It is that simple.


    ehild
     
  15. Jun 11, 2014 #14
    Ahh, I see it! Thank you...makes my method seem very tedious

    So y'/y = 1/cos or sec :tongue:
     
  16. Jun 11, 2014 #15

    ehild

    User Avatar
    Homework Helper
    Gold Member

    Yes, it is sec(x).

    ehild:smile:
     
  17. Jun 12, 2014 #16

    jbunniii

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    Now that you have the answer, I'll elaborate on what I said in post #11:
    $$\frac{\sec x(\sec x + \tan x)^2}{|\sec x + \tan x|^2}$$
    Note that for any real ##y##, we have ##(y)^2 = |y|^2## (the absolute values make no difference), so we can cancel the numerator and denominator to get ##\sec(x)##.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted