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!

Squaring equations

  1. May 22, 2009 #1

    Mentallic

    User Avatar
    Homework Helper

    Note: This problem is no longer a homework question.

    1. The problem statement, all variables and given/known data
    I'm asked to find the max value of [itex]\sqrt{3}cosx+sinx[/itex]

    2. Relevant equations
    [itex]y=sinx,y'=cosx[/itex]
    [itex]y=cosx, y'=-sinx[/itex]
    [itex]cos^2x=1-sin^2x[/itex]

    3. The attempt at a solution
    I let [itex]y=\sqrt{3}cosx+sinx[/itex]

    Hence, [tex]\frac{dy}{dx}=-\sqrt{3}sinx+cosx=0[/tex]

    Attempting to solve this for x: [tex]\sqrt{3}sinx=cosx \Rightarrow 3sin^2x=1-sin^2x[/tex]

    Finally, [tex]sinx=\pm\frac{1}{2} \Rightarrow x=\pi n\pm \frac{\pi}{6}[/tex] , n integral

    I tested these values on a graphing calculator for [itex]0\leq x\leq 2\pi[/itex] because I didn't believe that there should be 4 max/min values, but only 2-3. I found that [itex]\pi/6[/itex] and [itex]7\pi/6[/itex] were max/min values but [itex]5\pi/6[/itex] and [itex]11\pi/6[/itex] were rather just random points on the function and its derivative.

    So I'm guessing that I found extra wrong values when I squared both sides of the derivative? Is it possible to square the equation, but quickly find which values in the results aren't valid and need to be scrapped? After solving the equation this way, I realized that the values that are valid are located in the first and third quadrants which are both positive for the tangent function and thus I could've divided the derivative through by [itex]cosx[/itex].
     
  2. jcsd
  3. May 23, 2009 #2
    This doesn't answer your question, but I find it to be another nice way of solving the problem.

    Notice that [tex]\sqrt{3}^2+1^2=2^2[/tex].

    So If you divide both sides of the equation by 2, you get:

    [tex]\frac{y}{2}=\frac{\sqrt{3}}{2}}\cos(x)+\frac{1}{2}\sin(x)=\sin(\pi/3)\cos(x)+\cos(\pi/3)\sin(x)=\sin(x+\pi/3).[/tex]

    So [tex]y=2\sin(x+\pi/3)[/tex], whose maximum value is 2.

    It can be shown similarly that if [tex]y=A\cos(x)+B\sin(y)[/tex], then the maximum is just [tex]\sqrt{A^2+B^2}.[/tex]
     
  4. May 23, 2009 #3

    HallsofIvy

    User Avatar
    Staff Emeritus
    Science Advisor

    When you square both sides of an equation, as you do here, you may introduce new solution that do not satisfy your original equation. For an obvious example, x= 2 has the single solution 2 but x2= 4 has both 2 and -2 as solutions.

    The simplest way to distinguish "extraneous solutions" is to try them in the original equations.

    But I don't see any reason to square both sides: there is no square root of the unknown and [itex]\sqrt{3}[/itex] is just a number. From [itex]-\sqrt{3}sin(x)+ cos(x)= 0[/itex], [itex]\sqrt{3}sin(x)= cos(x)[/itex] so
    [tex]\frac{sin(x)}{cos(x)}= \frac{1}{\sqrt{3}}[/tex]
    which leads to [itex]\pi/6[/itex], as a "fundamental solution" and, since tan(x) is periodic with period [itex]\pi[/itex], [itex]x= \pi/6+ n\pi[/itex] as general solution, no "-".
     
  5. May 23, 2009 #4

    Mentallic

    User Avatar
    Homework Helper

    I cannot figure out what the significance of [itex]\sqrt{3}^2+1^2=2^2[/itex]

    Also, I already deduced before posting that [itex]\sqrt{3}cosx+sinx=2cos(x-\frac{\pi}{6}[/itex] but you have showed me another way of finding that. thanks :smile:

    I'll test in the original function in future then. I didn't realize this, thanks! It's way simpler to solve this way.
     
  6. May 23, 2009 #5

    arildno

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member
    Dearly Missed

    Furthermore, knowing where the critical points lie, we may use the second derivative to find out which of those x's are maxima:
    [tex]f''(x)=-\sqrt{3}\cos(x)-\sin(x)=-\cos(x)(\sqrt{3}+\frac{\sin(x)}{\cos(x)})[/tex]
    At the critical points, we get here the value:
    [tex]-\cos(x)(\sqrt{3}+\frac{1}{\sqrt{3}})[/tex], which shows that the maxima will occur for critical x's lying in the first quadrant, never in the fourth.
     
  7. May 23, 2009 #6
    You want to divide both sides of the equation by some C such that [tex]\sin(\alpha)=\sqrt{3}/C[/tex] and [tex]\cos(\alpha)=1/C.[/tex] (So that we can use the trig summation identity)

    Then it must be true that [tex](\sqrt{3}/C)^2+(1/C)^2=1[/tex]. It follows that [tex]C^2=3+1.[/tex]

    So in general, for [tex]y=A\cos(x)+B\sin(y)[/tex], you want to divide by [tex]\sqrt{A^2+B^2}[/tex]. Then you can write [tex]y=\sqrt{A^2+B^2} \cdot \sin(\alpha+x).[/tex]

    Sorry for hijacking the thread. Just wanted to share a neat trick that could come in handy in other places. :tongue2:
     
  8. May 23, 2009 #7

    HallsofIvy

    User Avatar
    Staff Emeritus
    Science Advisor

    The signicance is that its positive square root, 2, is the answer to your original question!
    Your problem did not ask for the value of x that gives that.

    Alligatorman's point is that, sin(x+ y)= cos(x)sin(y)+ sin(x)cos(y) so if you have something of the form Acos(x)+ Bsin(x), you can look for a "y" such that sin(y)= A, cos(y)= B. Of course, because [itex]sin^2(y)+ cos^2(y)= 1[/itex], that is only possible if [itex]A^2+ B^2= 1[/itex]. If not, as in this case where [itex]A= \sqrt{3}[/itex] and B= 1, we must multiply and divide by [itex]\sqrt{A^2+ B^2}[/itex]. Here, of course, [itex]A^2+ B^2= 3+1= 4[/itex] so [itex]\sqrt{A^2+ B^2}= 2[/itex]. If we multiply and divide by 2, we have
    [tex]2\left(\frac{\sqrt{3}}{2}cos(x)+ \frac{1}{2}sin(x)\right)[/tex].
    There does exist y such that [itex]sin(x)= \sqrt{y}/2[/itex] and [itex]cos(y)= 1/2[/itex]. It easy to see that [itex]y= \pi/6[/itex] satisfies that but we don't need to: this is of the form 2 sin(x+y) which we know has a maximum value of 2 because sine itself has a maximum value of 1.
     
  9. May 23, 2009 #8

    Mentallic

    User Avatar
    Homework Helper

    Ahh thanks for all your help everyone!
    Alligatorman, I appreciate your attempts but without Hallsofivy's response I still wouldn't have understood it clearly. But don't worry, thats just due to my feable abilities to understand simple math :smile:
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook