1. Limited time only! Sign up for a free 30min personal 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!

Find max/min values of f(x)=cos(x)-sin(x)

  1. Mar 3, 2009 #1
    Find max/min values of f(x)=cos(x)-sin(x) in the interval of -pi (smaller or equals)x(smaller or equals)pi

    I took the derivative and ended up with f`(x)=-sin(x)-cos(x). By setting it equals to zero, i get sin(x)=-cos(x). This is where I'm stuck. Don't know where to go from here.

    thx!
     
  2. jcsd
  3. Mar 3, 2009 #2

    Dick

    User Avatar
    Science Advisor
    Homework Helper

    Divide both sides by cos(x). Remember the definition of tan.
     
  4. Mar 3, 2009 #3
    Hi ugeous. Good work so far.

    From the equation, sin (x) = - cos (x)... you have to interpret the answer from a "unit circle" stand point.

    Ignore the signs. Pretend the equation reads sin(x) = cos(x). When is sin equal to cos? That's simple... whenever they have the same coordinates (found in Q1 and Q3 at pi/4 and 7pi/4).

    Your equation sin (x) = - cos (x) dictates that the sin(x) and cos(x) differ by a difference in sign. For what values will sin (x) and cos(x) have the same numerical value but different sign? (ie: when is it -sqrt(2)/2 for one and sqrt(2)/2 for the other).
     
  5. Mar 3, 2009 #4

    lurflurf

    User Avatar
    Homework Helper

    I would have started with
    f(x)=cos(x)-sin(x)=2sin(pi/4)cos(x+pi/4)
    from your approach
    sin(x)=-cos(x)
    sin(x)^2=cos(x)^2
    sin(x)^2+cos(x)^2=1
    sin(x)^2=1/2
    |sin(x)|=1/sqrt(2)
    cos(x)^2=1/2
    |cos(x)|=1/sqrt(2)
     
    Last edited: Mar 3, 2009
  6. Mar 3, 2009 #5

    lurflurf

    User Avatar
    Homework Helper

    cute
    Which one?
     
  7. Mar 3, 2009 #6

    Dick

    User Avatar
    Science Advisor
    Homework Helper

    The one that defines tan in terms of sin and cos, I think. Or maybe it's a theorem depending on how you define things.
     
  8. Mar 3, 2009 #7
    Can you explain this line:

    sin(x)^2+cos(x)^2=1
    sin(x)^2=1/2 --> How did you jump from the former to this line?

    and by squaring both sides of the equation, are you not adding "false roots?"

    he's talking about tan x = sin x / cos x
     
  9. Mar 3, 2009 #8

    lurflurf

    User Avatar
    Homework Helper

    false roots will be added, but we will just discard them.
    (1) sin(x)^2+cos(x)^2=1
    Is true for all x
    (2) sin(x)^2=cos(x)^2
    is true for the unknown x
    thus
    sin(x)^2+sin(x)^2=1
    (replace cos(x)^2 in (1) by sin(x)^2 as allowed by (2))
    2sin(x)^2=1
    sin(x)^2=1/2
    |sin(x)|=1/sqrt(2)
    find all such x (hint obvious)
    then exclude those that do not satisfy
    sin(x)=-cos(x)
     
  10. Mar 3, 2009 #9
    Thanks sir. that makes sense
     
  11. Mar 4, 2009 #10
    OK, I see. I used Dick's method (seems to be the fastest), and got the correct answer for maximum value(check with calculator), but how would I find the minimum value here? Equation that gave me max value was tan (x) = -1. Do I just need to use a different method for min value?
     
  12. Mar 4, 2009 #11

    Dick

    User Avatar
    Science Advisor
    Homework Helper

    You should have found two critical points where f'(x)=0 on the interval [-pi,pi]. Check the values at both of them and don't forget to check the values at the endpoints as well. Draw a rough graph of the function to keep it clear in your head.
     
  13. Mar 4, 2009 #12
    This question is driving me crazy.......

    I did find critical point, but I can't seem to find the second one. I know that usually you have more than one critical point when x can be more then one value, and still satisfy the equation. In this case, I had sin(x)=-cos(x). By dividing both sides by cos(x) i got sin(x)/cos(x)=-cos(x)/cos(x) which gives me tan(x)=-1. That's how I found the first x value. I found the second x value by using graphing calculator, and even when i plug it into tan(x)=-1, the equation is still valid. I'm just missing a step where I need to get to that x value algebraically. I'm not sure how I can do that.
     
  14. Mar 4, 2009 #13

    Dick

    User Avatar
    Science Advisor
    Homework Helper

    You know exact values for trig functions at certain angles because you know the relations between the sides of a 45-45-90 triangle and a 30-60-90 triangle. A graphing calculator not telling you this. Look at a graph of sin and cos. sin(-pi/4)=(-sqrt(2)/2), cos(-pi/4)=sqrt(2)/2. So tan(-pi/4)=-1. What are the values at 3*pi/4?
     
  15. Mar 4, 2009 #14
    -sqrt2/2, sqrt2/2 i believe.
     
  16. Mar 4, 2009 #15

    Dick

    User Avatar
    Science Advisor
    Homework Helper

    Sure. And -pi/4 and 3*pi/4 are your critical points, right?
     
  17. Mar 4, 2009 #16
    Right!
     
  18. Mar 4, 2009 #17
    Finally got it! Thank You!!!
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Find max/min values of f(x)=cos(x)-sin(x)
  1. F(x) = x^p cos(1/x) (Replies: 3)

Loading...