How to find an argument of this complex number?   $$ z=1-e^{i\varphi}=1-\cos\varphi-i\sin\varphi $$   I know I should try to make $z$ equal to $r(\cos\psi+i\sin\psi)$. And then $Arg(z)=\psi$. But I don't really understand how to do that. I tried something like that: $$ z=2\sin^2\frac{\varphi}{2}-2i\sin\frac{\varphi}{2}\cos\frac{\varphi}{2}=2\sin\frac{\varphi}{2}\left(\sin\frac{\varphi}{2}-i\cos\frac{\varphi}{2}\right) $$ But obviously it didn't help much.
So the complex number z is given as   $z=1-cos(2\theta)-isin(2\theta)$  And the question is to find the argument of z in terms of $\theta$.   So, I used the formula for calculating the argument of a complex number:  $arg(z)=arctan (\frac{sin(2\theta)}{1-cos(2\theta)})$  $=arctan (\frac{2sin\theta cos\theta}{1-(1-2sin^2\theta)})$  $=arctan (\frac{2sin\theta cos\theta}{2sin^2\theta})$  $=arctan (\frac{cos\theta}{sin\theta})$  $=arctan (cot\theta)$  $=arctan (tan(\frac{\pi}{2}-\theta))$  $=\frac{\pi}{2}-\theta$  But apparently the answer is $\theta-\frac{\pi}{2}$.  Where might have I gone wrong?  Edit: the domain given in the question for $\theta$ was $0≤\theta≤\pi$
Under which assumptions a regression can be interpreted causally? First, don't panic. Yes, there are many similar question on this site. But I believe none gives a conclusive answer to the question below. Please bear with me.  Consider a data generation process $\text{D}_X(x_1, ... , x_n|\theta)$, where $\text{D}_X(\cdot)$ is a joint density function, with $n$ variables and parameter set $\theta$. It is well known that a regression of the form $x_n = f(x_1, ... , x_{n-1}|\theta)$ is estimating a conditional mean of the joint distribution, namely, $\text{E}(x_n|x_1,...,x_{n-1})$. In the specific case of a linear regression, we have something like $$ x_n = \theta_0 + \theta_1 x_1 + ... + \theta_{n-1}x_{n-1} + \epsilon $$ The question is: under which assumptions of the DGP $\text{D}_X(\cdot)$ can we infer the regression (linear or not) represents a causal relationship? It is well known that experimental data does allow for such interpretation. For what I can read elsewhere, it seems the condition required on the DGP is exogeneity: $$ \text{E}(x_1, ... x_{n-1}|\epsilon) = 0$$ The nature of randomisation involved in experimental data ensures the above is the case. The story goes then to argue why observational data normally fails in achieving such condition, reasons including omitted variable bias, reverse causality, self-selection, measurement errors, and so on. I am however uncertain about this condition. It seems too weak to encompass all potential arguments against regression implying causality. Hence my question above. UPDATE: I am not assuming any causal structure within my DGP. I am assuming that the DGP is complete, in the sense that there must be some causality (an ontological position it could well be debated), and all relevant variables are included. The key is to identify the set of assumptions which ensure me causality goes from certain variables to the other, without assuming from the outset such direction of causality.  Many similar posts on the site spend time mentioning why correlation does not imply causation, without providing hard arguments about when it does. That is the case, for instance, of  very popular post. Additionally, in the  on the site about the topic, the accepted answer gives the very vague answer:  Expose all hidden variables and you have causation.  I do not know how to translate that to my question above. Neither is the second most upvoted answer. And so on. That is why I believe this post does not have an answer elsewhere. Motion Tracking objects that go out of frame and re-enter later If $A + A^t = 2I$ then $\det(A) \geq 1$ Is it possible to detect if client supports SNI? su options - running command as another user I was wondering how to run a command as another user from a script.  I have the script's owner set as root. I also have the following command being run within the script to run the command as the hudson user:  su -c command hudson   Is this the correct syntax? I often find  syntax very helpful, e.g. process substitution like in diff &lt;(sort file1) &lt;(sort file2).  Is it possible to use such Bash commands in a Makefile? I'm thinking of something like this:  file-differences:     diff &lt;(sort file1) &lt;(sort file2) &gt; $@   In my GNU Make 3.80 this will give an error since it uses the shell instead of bash to execute the commands. Does there exist a continuous function $\: f : \mathbf{R} \to \mathbf{R} \:$ such that for   all  functions $\: g : \mathbf{R} \to \mathbf{R} \:$, for all real numbers $x$,  there exists a real number $y$ such that $\: x &lt; y \:$ and $\: g(y) &lt; f(y) \:$? I'm trying to set up a way for me to just type newjournal, and a new journal entry named year-month-date-time.txt is created in a year subdirectory in ~/documents/journals.   I've got it set up as an alias using the following:  alias newjournal='nano /home/username/documents/journals/'$(date +%Y)'/'$(date +%F-%k%M).txt''   So the year subfolder resolves correctly, and seemingly so does the first half of the date command. Tried appending the alias with sudo, didn't help.  Issue: For some reason, when I do this command the time value (%k) resolves to a few minutes ago... or maybe the last time nano ran this filename, maybe it's called an old buffer?   When I logoff it makes the correct file, then I save, wait a few minutes and try again, and it edits the old file instead of making a new one. Even if I remove the old file, it creates a new file with the old filename (incorrect time).  Here's a screenshot of what I'm trying to explain. Here I create a newjournal, save in nano within a second or two of executing the command, print the correct date/time, list the file that was created. Note the incorrect filename time (1249, as apposed to 13:11):    Anyways, it might be something simple, but I've tried different methods in the alias, such as putting double quotes around the whole thing and escaping properly, single quoting, escaping and spacing, etc.  Thanks for the read/help. Ubuntu 16.04 server.  EDIT: Here's the final alias that worked:  alias newjournal='nano /home/user/journals/"$(date +%Y)"/"$(date +%F-%H%M).txt"'   Needed to double quote the date commands inside the overall single-quoted alias. Did Daenerys mess up regarding caravans? How to install clang++? I'm having trouble getting clang++ to work as I compile my code. Specifically, I'm getting a make: clang++: Command not found error.  I've run sudo apt-get install llvm, and also sudo apt-get install build-essential and sudo apt-get update. What do I have to do to get clang++ installed? How to blacklist kernel modules? So, for example, when I type man ls I see LS(1). But if I type man apachectl I see APACHECTL(8) and if I type man cd I end up with cd(n).  I'm wondering what the significance of the numbers in the parentheses are, if they have any. I own a Nikon D40X and just the kit lens and I'm considering buying either a macro lens or some extension tubes.  I don't necessarily want to do true 1:1 macro, just some close ups of bugs, fungi and flowers. We're having a problem with the core poll module on drupal 7. We have a poll that we want anonymous users to be able to vote on. There is currently one anonymous vote, and now anonymous viewers only see the result (we've tried looking at it from outside our network).   We've checked the perms, and anonymous can vote and view results ( but not change vote). We've cleared the cache.   How does Poll work on D7 with regards to the anonymous user? Why is the prospective new kilogram standard a sphere? I can understand the choice of material, silicon 28, but why is it a sphere rather than (say) a cube? Article   I would have thought that a sphere would have been the hardest shape to machine accurately. Finding $\int x^xdx$ I'm trying to find $\int x^x \, dx$, but the only thing I know how to do is this:  Let $u=x^x$.  $$\begin{align} \int x^x \, dx&amp;=\int u \, du\\[6pt] &amp;=\frac{u^2}{2}\\[6pt] &amp;=\dfrac{\left(x^x\right)^2}{2}\\[6pt] &amp;=\frac{x^{2x}}{2} \end{align}$$  But it's certain that this isn't the correct way to evaluate that, and the answer must be wrong. Rules for the usage of "me" VS. "myself"? What are general guidelines for the use of "me" and "myself"?     Did I describe me or did I describe Maria?   OR     Did I describe myself or did I describe Maria? Ubuntu 14.04, problem when install gstreamer1.0-libav, unmet dependencies Suddenly my Ubuntu stopped playing video. When I open a video, the player suggests that I install  gstreamer1.0-libav. However, it fails to install.  I tried installing it manually, here is the error message:  $ sudo apt-get install gstreamer1.0-libav Reading package lists... Done Building dependency tree        Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:  The following packages have unmet dependencies:  gstreamer1.0-libav : Depends: libavcodec54 (&gt;= 6:9.1-1) but it is not going to be installed or                                libavcodec-extra-54 (&gt;= 6:9.13) but it is not going to be installed                       Depends: libavformat54 (&gt;= 6:9.1-1) but it is not going to be installed E: Unable to correct problems, you have held broken packages. CString to char* We are using the CString class throughout most of our code. However sometimes we need to convert to a char *. at the moment we have been doing this using variable.GetBuffer(0) and this seems to work ( this mainly happens when passing the Csting into a function where the function requires a char *). The function accepts this and we keep going.  However we have lately become worried about how this works, and whether there is a better way to do it.  The way i understand it to work is it passes a char pointer into the function that points at the first character in the CString and all works well.  I Guess we are just worried about memory leaks or any unforseen circumstances where this might not be a good idea. Prefix or adjective meaning "one and a half" Is there a prefix or adjective that means "one and a half", as "tri-" or "triple" is for "three"?  The exact usage I have is to describe "18" in terms of a dozen. Where I live they've started making 18-egg cartons, and the local grocer was wondering what name to give them in his computerised cash register, hoping for a single word.  Even slang, informal or invented term would do if there isn't such a term already.