Prove   \begin{align} &amp; \int_0^{\pi/2}\sin^mx \cos^nx\,dx \\[12pt] = {} &amp; \begin{cases}\dfrac{[(m-1)(m-3)\cdots][(n-1)(n-3)\cdots]}{(m+n)(m+n-2)\cdots}\cdot\dfrac{\pi}{2} &amp; m,n\text{ even integers}\\[10pt] \dfrac{[(m-1)(m-3)\cdots][(n-1)(n-3)\cdots]}{(m+n)(m+n-2)\cdots} &amp; \text{elsewhere} \end{cases} \end{align}   My Attempt $$ I_{m,n}=\int_0^{\pi/2}\sin^mx\cdot\cos^n x\,dx=\int_0^{\pi/2}\sin^{m-1}x \cos^nx \sin x \, dx\\ \int\cos^nx\cdot \sin x\,dx=\dfrac{-\cos^{n+1}x}{n+1}+K\\ I_{m,n}=\bigg[\sin^{m-1}x\cdot \dfrac{-\cos^{n+1}x}{n+1}\bigg]_0^{\pi/2}-(m-1)\int_0^{\pi/2}\sin^{m-2}x\cdot \cos x\cdot \dfrac{-\cos^{n+1}x}{n+1}\,dx\\ =0+\frac{m-1}{n+1}\int_0^{\pi/2}\cos^nx\cdot\sin^{m-2}x(1-\sin^2x)\cdot dx\\ =\frac{m-1}{n+1}\int_0^{\pi/2}\cos^nx\cdot\sin^{m-2}x\,dx-\frac{m-1}{n+1}\int_0^{\pi/2}\cos^nx\cdot\sin^{m}x\,dx\\ I_{m,n}=\frac{m-1}{n+1}\cdot I_{m-2,n}-\frac{m-1}{n+1}\cdot I_{m,n}\implies \color{blue}{\boxed{I_{m,n}=\frac{m-1}{m+n}\cdot I_{m-2,n}}} $$ case 1: $m,n$ even: $$ I_{m,n}=\frac{(m-1)(m-3)\cdots 1}{(m+n)(m+n-2)\cdots 2}\cdot I_{0,n}\\ I_{0,n}=\int_0^{\pi/2}\cos^nx.dx=\frac{(n-1)(n-3)...1}{n(n-2)...2}.\frac{\pi}{2}\quad;\text{ since $n$ is even}\\ I_{m,n}=\frac{(m-1)(m-3)\cdots 1}{(m+n)(m+n-2)\cdots 2} \cdot \frac{(n-1)(n-3)...2}{n(n-2)...2}.\frac{\pi}{2}\\ =\frac{[(m-1)(m-3)\cdots 1][(n-1)(n-3)...2]}{[(m+n)(m+n-2)\cdots 2]\color{red}{[n(n-2)...2]}}.\frac{\pi}{2} $$    Why am I not getting the solution given in my reference, more precisely, why do I get the additional term, marked in red, in the final solution ?  How do I reach the final solution from the recurrence relation ?  Similar question is asked before in , but it does not seem to get the same recurrence relation as in my attempt.  Note: I am having trouble proceeding from the recurrence relation, post mentioned below are attempts to derive the recurrence relation, which does not address the problem, that i have already derived it in my attempt.
$$\displaystyle\int \:\sin^n\left(x\right)\cos^m\left(x\right)\mathrm  dx=\frac{\sin^{n+1}x\cos^{m-1}x}{m+n}+\frac{m-1}{m+n}\int \:\sin^nx\cos^{m-2}x\,\mathrm dx$$  I have been trying to solve for over a week now can someone please help me.
Variables in batch file not being set when inside IF? I have two examples of very simple batch files:  Assigning a value to a variable:  @echo off set FOO=1 echo FOO: %FOO% pause echo on   Which, as expected, results in:  FOO: 1  Press any key to continue . . .   However, if I place the same two lines inside an IF NOT DEFINED block:  @echo off IF NOT DEFINED BAR (     set FOO=1     echo FOO: %FOO% ) pause echo on   This unexpectedly results in:  FOO:  Press any key to continue . . .   This shouldn't have anything to do with the IF, clearly the block is being executed.  If I define BAR above the if, only the text from the PAUSE command is displayed, as expected.    What gives?    Follow up question: Is there any way to enable delayed expansion without setlocal?   If I were to call this simple example batch file from inside another, the example sets FOO, but only LOCALLY.   For example:   testcaller.bat   @call test.bat  @echo FOO: %FOO%  @pause    test.bat   @setlocal EnableDelayedExpansion  @IF NOT DEFINED BAR (      @set FOO=1      @echo FOO: !FOO!  )    This displays:   FOO: 1  FOO:  Press any key to continue . . .    In this case, it appears that I have to enable delayed expansion in the CALLER, which may be a hassle. I want to do a survey of textbooks in set theory. Amazon returns 3582 books for the keywords "set theory". A small somewhat random selection with number of references in Google scholar is the following.   Two questions:    What textbooks in set-theory are considered standard?  What is a good place to aggregate standard references (of textbooks)?    (I'm only interested in text-books, which as a format already provide a kind of standardization)  Textbooks on set theory (author: title (year) #Google Scholar citations )   Thomas J. Jech: Set Theory 3rd Edition (1978) #2441  Kenneth Kunen: Set Theory (1980) #1881  P. R. Halmos: Naive Set Theory (1974) #1079 AA Fraenkel, Y Bar-Hillel, A Levy: Foundations of set theory (1973) #696 K Kuratowski, A Mostowski, M Mączyński: Set theory (1976) #609 Suppes: Axiomatic set theory  (1972) #589 Quine: Set theory and its logic (1969) #442 A Levy: Basic set theory (1979) #442 Herbert B. Enderton: Elements of Set Theory (1977) #349 Karel Hrbacek, Thomas J. Jech: Introduction to set theory (1999) #284 RR Stoll: Set theory and logic (1979) #281  N. Bourbaki: theory of sets (1970) #211 K Devlin: The joy of sets: fundamentals of contemporary set theory (1994) #182 Ciesielski: Set theory for the working mathematician (1997) #156 YN Moschovakis: Notes on set theory (1994) #138 FW Lawvere: Sets for mathematics (2003) #118 G Takeuti, WM Zaring: Introduction to axiomatic set theory (1982) #106 Kaplansky: Set Theory and Metric Spaces (2001) #103 Potter: Set Theory and Its Philosophy: A Critical Introduction (2004) #91 PT Johnstone: Notes on logic and set theory (1987) #87 Judith Roitman: Introduction to Modern Set Theory (1990) #47 Derek Goldrei: Set Theory: For Guided Independent Study (1996) #31 Basic set theory: A Shen, NK Vereshchagin (2002) #14 Ralf Schindler: Set Theory (2014) #13 Foreman, Kanamori: Handbook of Set Theory (2009) #38   Note:  Please feel free to add textbooks to the list, as long as they are not just on a smaller subset of set theory. (Some of the dates might not be the first published edition.) Apache answer both HTTP and HTTPS on the same port How to correctly add a path to PATH? I'm wondering where a new path has to be added to the PATH environment variable. I know this can be accomplished by editing .bashrc (for example), but it's not clear how to do this.  This way:  export PATH=~/opt/bin:$PATH   or this?    export PATH=$PATH:~/opt/bin Why don't they use the transporter in the final fight in Star Trek Into Darkness? When Spock was chasing, and beating, Khan over a transport in San Francisco, Uhura orders them beamed both back  to the Enterprise, while Chekov says something like:     Its impossible, they are moving!                                   But in the first movie, it was Chekov that transported back to Kirk and Sulu, avoiding hitting the Vulcan planet when trying to disable the Romulan drilling platform. If a function $f$ is continuous $\implies$ $|f|$ is continuous.(Answered by Myself) $(i)$ Given a function $f:E \rightarrow \mathbb{R}$ define $|f|:E \rightarrow \mathbb{R}$ by $|f|(x)=|f(x)|$ for $x \in E$ show if $f$ is continuous at $c \in E$ then so is $|f|$.        $(ii)$ Now the converse is not true, find $f$ such that $|f|$ is continuous but $f$ is not. If $X,Y$ are independent $\chi ^2$ with $m$ and $n$ degrees of freedom, then $\frac{X}{X+Y} \sim\beta(m/2, n/2)$ I was reading  and I find the following problem: Let $X$ and $Y$ be independent $\chi ^2 $ with $m$ and $n$ degrees of freedom then $\dfrac{X}{X+Y} = \beta(m/2, n/2)$. Where $\chi^2(k)$ has density function $$f_{\chi^2(k)}(x)=\begin{cases}\displaystyle \frac{1}{2^{k/2}\Gamma(k/2)}\,x^{(k/2) - 1} e^{-x/2}&amp;\text{if }x&gt;0,\\ 0&amp;\text{if }x\le0 \end{cases} $$  I proved that $X+Y$ is $\chi ^2$ with $n + m$ degrees of freedom using the moment-generating function. If $Z=X+Y$ and $U=\dfrac{X}{X+Y}=\dfrac{X}{Z}$ using the formula for the density of the ratio of two independent random variables: $$f_U(u)= \int_{-\infty}^{\infty}f_X(uv)f_Z(v)|v|dv $$  then  $$\dfrac{u^{m/2-1}}{2^{(m+n/2)} \Gamma(m/2) \Gamma((m+n)/2)} \int_0^{\infty} v^{m+\dfrac{n}{2}-1} e^{-(v/2)(u+1)}dv $$  and using some algebra:  $$f_U(u)=\dfrac{u^{m/2-1} \Gamma(m+n/2)}{\Gamma(m+n/2) \Gamma(m/2) (u+1)^{m+n/2}}$$  and this is not $\beta(m/2, n/2)$, it looks more like $\beta(m/2, m/2+n/2)$ but $(u+1)^{m+n/2}$ is causing troubles.  I need help if something is false or any hint. Solvability and reducibility of a polynomial in a "chain" of finite fields Enumerate non-isomorphic graphs on n vertices In the following the graphs are assumed to be undirected and simple.  1.Enumerate the number of non-isomorphic graphs on $n$ vetrices where $n$ is fixed.  Here are some ideas I had:  The number of labeled graphs is $ 2^{\frac{n(n-1)}{2}} $.  So it is enough to find the number unlabeled graphs on $n$ vertices.I have no idea for this.  2.Enumerate the number of non-isomorphic graphs on $n$ vertices and $m$ edges where $n,m$ are fixed.   Can we find a closed formula for each of this?  Any help?   Thank you! How do you make Ubuntu accept files sent over bluetooth I have a problem when I send my files from phone to ubuntu 12.04 via bluetooth as the phone prompts with the message "the file not sent"! I can send any files from ubuntu 12.04 to my android phone. How to create csv files in controller method from list I want to create csv files from lists and send an email attaching them, how to do that in a controller method? Seemingly random reputation gain of 1 Light "diode" and 2nd law of thermodynamics If I had a light "diode" - an object that only allowed light (at least for a range of frequencies) to travel through it in one direction, would this necessarily allow violations of the 2nd Law of Thermodynamics?  Or would it be possible to restrict other properties of the device such that it could be okay.  Why I think it should violate 2nd law:   I can place such devices at temperature T in a bath of thermal radiation at temperature T, such that it forms a box which only lets the light in or out.  This would appear to always allow one to create a thermal gradient.  Once a thermal gradient is formed, useful energy can be extracted.  This seems to allow useful energy to always be extracted from a thermal bath and thus give perpetual motion. Release one such device at temperature T in a bath of thermal radiation at temperature T.  Since the photons are absorbed or reflected in one direction, and undisturbed in the other, the device will start moving.  It can use a thermal bath to directly generate useful motion.   Why I think I'm missing something and such a device could potentially co-exist with the 2nd Law:   The above arguments seem valid if the diode was only 'partially' rectifying as well.  However there exist sunglasses which largely reflect on one side, but not from the other side. Researchers have succeeded in using meta-materials to create a "blackhole" for microwaves.   Can anyone help sort this out? I'm cooking two different dishes in the oven at the same time that each require different temperatures. One is a roasted vegetable dish that says to cook at 475 for 35-40 minutes and the other is parmesan crusted pork chops at 350 for 40-45 minutes. What do you suggest I do? How does the clean Installation of Windows 10 after the free upgrade work? I have not found any information from MS - only speculations from people like me, so I hope someone here has had better findings.  When I upgrade a qualified version of Windows to Windows 10 and then want to do a clean install, I've heard that the installer won't ask for a key. But what if my HDD is formatted before I attempt the clean install? How does Windows 10 try to detect the valid "upgraded" status? It seems that it doesn't in such a case, at least as far as I've tested.  So my question is: In that (or a similar) scenario: How do you clean install Windows 10?  In my case it's actually even more complicated. I'm from Germany so I can re-use OEM-licenses due to law. I have two qualified Windows OEM licenses which I both installed in a VM on my Linux installation and upgraded both to Windows 10.  Now I want to install one of them onto my bare physical machine - how would that be possible? Is there an official way of doing this or do I need to wait for those unofficial "backup license"-tools being updated to work with Windows 10? Square root of Positive Definite Matrix How to detect if a function is called as constructor? Given a function:  function x(arg) { return 30; }   You can call it two ways:  result = x(4); result = new x(4);   The first returns 30, the second returns an object.  How can you detect which way the function was called inside the function itself?  Whatever your solution is, it must work with the following invocation as well:  var Z = new x();  Z.lolol = x;  Z.lolol();   All the solutions currently think the Z.lolol() is calling it as a constructor. Lower case "k" in Cocoa I know this is a common convention, but what does the "k" in variable names signify? (i.e. kMaxImageViewSize)  I looked in the Apple documentation on Variable names and found no mention of it.  Thanks for answering The other day I was looking at Stack Overflow on my Android phone. All is made very nice and all, but I could not find the Review button/link. Is it being implemented, did I miss it, or it is not available? I am going to start a phd at the US with an F1 visa. University told me that I could enter the US only 30 days before the date on I-20. Since English is not my first language (and this would be a big change in my life) I would like to go there by June.  The thing is that I have an European passport with a valid ESTA. My plan would be to arrive with this passport, stay 4-6 weeks , go to Canada for a short vacation (maybe flight maybe by land) and come back to the USA with F1 visa.  I have two questions about this:  1) is this possible?   2) If yes, how could I justify knowing I will lose my come-back flight during my first entry? (I would purchase round trip because one-way are too expensive, probably with less than 90 days difference)