Recently, I came across a beautiful question. I tried several ways of solving it, but I could not reach anywhere. The question goes like:  Prove that:  $$a\sin x+b\cos x=\sqrt{a^2+b^2} \sin\left(x+\tan^{-1}\left(\frac{b}{a}\right)\right)$$  Please give me a hint. Thanks in advance.
I don't understand this. These identities are given in the online notes for MIT's 18.01 calculus class. It's related to taking the sum of two trig functions and transforming them into a single trig function. I can use the formulas to do this, but I am having trouble finding anything on the internet to use a proof for my understanding.  Thanks for any responses!  EDITED (added after the first answer):  Sorry, the identity goes like this:  $A\sin{k(x-c)}=a\sin{kx}+b\cos{kx}$ ,  with the relationships  $a=A\cos{kc}$ , $b=-A\sin{kc}$ , $A=\sqrt{a^2+b^2}$ , and $\tan{kc}=-b/a$
enclosing a lstlisting environment inside my own environment using matlab-prettifier I've just started using matlab-prettifier.    Since the line \begin{lstlisting}[style=Matlab-editor] is a lot to type, I created my own environment:  \newenvironment{myMP}      {\begin{samepage}\begin{lstlisting}[style=Matlab-editor]}      {\end{lstlisting}\end{samepage}}   I've used this syntax many times before, but in this case it doesn't work.  Is there any reason why I can't enclose the lstlisting inside my own one?  Here's sample code, illustrating the problem.  \documentclass{minimal} \usepackage[framed]{matlab-prettifier}%For matlab code \newenvironment{myMP}      {\begin{samepage} \begin{lstlisting}[style=Matlab-editor]}      {\end{lstlisting} \end{samepage}} \begin{document} \begin{myMP} matlab word \end{myMP} \end{document}   When I run this with pdflatex it returns a *, indicating that the environment wasn't closed properly.  Thanks! How do you compile OpenSSL for x64? After following the instructions in INSTALL.W64 I have two problems:   The code is still written to the "out32" folder. I need to be able to link to both 32-bit and 64-bit versions of the library on my workstation, so I don't want the 64-bit versions to clobber the 32-bit libs. The output is still 32-bit! This means that I get "unresolved external symbol" errors when trying to link to the libraries from an x64 app. Recursive matching with regular expressions in Javascript How do I properly clean up Excel interop objects? I'm using the Excel interop in C# (ApplicationClass) and have placed the following code in my finally clause:  while (System.Runtime.InteropServices.Marshal.ReleaseComObject(excelSheet) != 0) { } excelSheet = null; GC.Collect(); GC.WaitForPendingFinalizers();   Although this kind of works, the Excel.exe process is still in the background even after I close Excel. It is only released once my application is manually closed.  What am I doing wrong, or is there an alternative to ensure interop objects are properly disposed of? My players have been scheming with rapid entry tactics for the megadungeon I've recently started running. Unfortunately, the monsters are aware of the adventurers, and this has lead to a weird question of priority. Given the following situation (which I'm pretty sure is going to happen next session in some form or another) what happens?     Alice the adventurer readies an action; if her teammate Carlos opens   the door, she's going to throw the alchemists fire through the door,   which should do enough damage to kill any goblins hiding there.      Meanwhile, on the other side of the door, Bob the goblin is lying in   wait. He readies an action; if the door opens, he's going to hit the   switch to open the trapdoor in the next room, which should drop any    pesky adventurers into a pit with spikes at the bottom.      Carlos opens the door.   I know what happens when , but what happens when multiple readied actions get triggered at the same time? My guess would be an opposed reflex save or initiative check of some kind to see who goes first, but that's entirely just intuition speaking. The rulebook doesn't seem to speak to the issue. I was wondering if it is possible for you to make a command block spawn hostile mobs in random places in a specified area?   I need the mobs spawned on different Y coordinates too because you need to fight your way up a tower to the top and I want the mobs to vary on each level to have specialty to each floor every time you play the mini game. Why didn't James' love and sacrifice for Lily protect her? We know that Harry survived Voldemort's killing curse because Lily loved him so much that she sacrificed herself in an attempt to protect him. This resulted in a very powerful charm that pretty much rendered Harry immune to Voldemort (until Voldemort figured out the work-around). Then there's this passage describing that night:  [Voldemort] was over the threshold as James came sprinting down the hall. It was easy, too easy, he had not even picked up his wand ... &quot;Lily, take Harry and go! It's him! Go! Run! I'll hold him off -&quot; Hold him off, without a wand in his hand! ... He laughed before casting the curse ... &quot;Avada Kedavra!&quot; Harry Potter and the Deathly Hallows Chapter 17: Bathilda's Secret  So James Potter, fully aware that he was sacrificing himself (he said &quot;I'll hold him off,&quot; not &quot;I'll get rid of him&quot;) ran to face Voldemort because of his love for Lily and Harry. This seems to be very similar to how Lily tried to protect Harry from Voldemort even though she knew she would die. It seems to me that the same charm should have been cast upon Lily when James died, but just moments later Voldemort killed her too. Apparently James' sacrifice did not result in a charm that protected Lily, even though he did it from love for her and Harry. Why is this? Was something different in the circumstances? New Zealand pronunciation of "women" vs "woman" I have read in a number of places that the NZ pronunciation of "women" must be rather peculiar. Quoting from :     For some years I've noted the tendency of Kiwis to pronounce "woman" and "women" identically (as "woman").   To which an Australian replies:     It appears there is a vowel shift going on in New Zealand (NZ) English [...] [T]he vowel in "women" which in Australian English is the same as the vowel in "hit", is often, in NZ, reduced to a schwa [...]. It makes the plural sound like our singular. I don't think the NZ pronunciation of the singular is the same as the NZ plural   A New Zealander begs to differ:     I've noticed this trend over the last few years also. To me as a kiwi it doesn't sound anything like a mispronounced plural -- it just sounds as if the speaker is using the one word for both singular and plural. [...] I see it as part of a much larger tendency to confuse singular and plurals. [Several examples follow.]   Who's right? Who's wrong? Wikipedia has :     In New Zealand English the short i of KIT is a central vowel not phonologically distinct from schwa /ə/, the vowel in unstressed "the". It thus contrasts sharply with the [i] vowel heard in Australia. Recent acoustic studies featuring both Australian and New Zealand voices show that the accents were more similar before the Second World War and that the KIT vowel has undergone rapid centralisation in New Zealand English. Because of this difference in pronunciation, some New Zealanders claim that Australians say "feesh and cheeps" for fish and chips while some Australians counter that New Zealanders say "fush and chups".   So, there appears to be a vowel shift going on; but I'm not sure if there might be some truth to the people-just-stop-caring-about-certain-plurals argument as well.  I hope we have enough New Zealanders on board to shed some light on this.   Can you provide a guide to how to pronounce "women" and "woman" in NZ English? (I've done some searching for audio files or YouTube videos, but haven't found anything yet.)  Would you say that it's just the vowel shift, "a much larger tendency to confuse singular and plurals", or both?  How recent is this trend? (E.g., if you are a native speaker of NZ English, is your pronunciation of "women" different from that of your parents/grandparents?) I have two complete sentences; the second is in parentheses, essentially a comment on the first.  Where do I place the periods?  I would use this:     They played opera. (I covered my ears.)   Is this punctuation correct? How to check if this limit exists: $$\lim_{(x,y)\rightarrow (0,0)}{ \frac{x^4y^4}{(x^2 + y^4)^3}}$$  Can I convert it to polar form ? $$\frac{r^8 (\cos^4 (\theta)\sin^4(\theta)}{r^6 (\cos^6 (\theta) + r^6 \sin^{12} (\theta))} = \frac{r^2}{\cos^6(\theta) + 0} = 0$$ What are good books/other readings for elementary set theory? I am looking to expand my knowledge on set theory (which is pretty poor right now -- basic understanding of sets, power sets, and different (infinite) cardinalities). Are there any books that come to your mind that would be useful for an undergrad math student who hasn't taken a set theory course yet?   Thanks a lot for your suggestions! With regard to the theory that each time a wave function collapses the universe  so that each possible outcome really exists - where does all the energy required to create all the new universes come from? In iPhone, you can easily change the default ringtone (Settings → Sounds → Ringtone) and set a custom ringtone for individual people (Contacts → [some person] → Edit → Ringtone).   But can you set a custom tone for a group of contacts? (E.g. "family" or "workmates".)  I think that would be handy—and quite basic functionality, so to speak—but I couldn't find a way to do this through the iPhone UI. Is it possible at all (without jailbreaking)? Improving Review Queues - Design overview II: Changing review bans and other new features Stack Exchange sites need a universal clock that is visible! Since the Stack Exchange sites run on one clock, and a clock that is not common to most of us (such as those of us in the US), can we display a clock with the site time (UTC) displayed somewhere on every page, such as at the bottom with the other text?  That way we are more aware of when the days turn over, and ecetera...  close votes, delete votes, flags, and normal votes would also benefit from this as well (thanks @Grace Note!)...    What do you guys think? yea or nay? thoughts? Generate random numbers uniformly over an entire range The title word filter is one of the worst ideas ever implemented on SO When and how did "pretty" enter English as an intensifying adverb? Today I saw an idiomatic road sign: "Pretty Muddy". I found this lack of strict English on a road sign unusual (on par with my "Dead Slow" official speed limit sign in Leeds, pic below), but as it turned out it's a charity race and the signs were merely directions.  This got me thinking however, how do words like "pretty" and "dead" as   end up in English? Taking "pretty" as an example, when did this first appear?     I wonder how fast you have to be going before they stop you. How would this hold up in court? Is there a way to configure pdflatex to make all but the .tex and .pdf files hidden files? I have asked a  about how to manage all the files generated when my LaTeX files are compiled but the approach in the answer I accepted is still unsatisfactory for the many small documents I generate.    I realize the LaTeX  all the files it generates so I can't prevent their creation.    However is there a way to configure pdflatex to make all but the .tex and .pdf files hidden files (i.e., preceded by .)?   (Edit: The two main systems that I use are tex live on Ubuntu Linux and BasicTeX on OS X) I have been hit with a homework problem that I just have no idea how to approach. Any help from you all is very much appreciated. Here is the problem  Prove the equation: $a^{\log_b c} = c^{\log_b a}$  Any ideas?