qid int64 1 4.65M | metadata listlengths 3 3 | prompt stringlengths 31 25.8k | chosen stringlengths 17 28.2k | rejected stringlengths 19 40.5k | domain stringclasses 28
values |
|---|---|---|---|---|---|
631,442 | [
"https://math.stackexchange.com/questions/631442",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/119875/"
] | How can I integrate $\displaystyle\int{\dfrac{\sin x}{1+\sin x}}dx$? I have already tried by applying different trigonometric results.
| If we write the expression in the following way:
$$\frac{\sin x}{1+ \sin x} = \frac{\sin x(1 - \sin x)}{(1+\sin x)(1 - \sin x)} = \frac{\sin x - (\sin x)^2}{1 - (\sin x)^2} = \frac{\sin x - (\sin x)^2}{(\cos x)^2}
\\= \frac{\sin x}{(\cos x)^2} - (\tan x)^2$$
Do you see how we can integrate these two terms?
| <strong>Hint:</strong>
Write $\frac{\sin{x}}{1+\sin{x}}$ as
$$\frac{\sin{x}}{1+\sin{x}}= \frac{1+\sin{x}-1}{1+\sin{x}} =1 -\frac{1}{1+\sin{x}} $$
Now subsitute $u=\tan{\frac{x}{2}}$
With this substitution the integral will simplify to
$$\int dx - \int\frac{2}{u^2+2u+1}\,du $$
| https://math.stackexchange.com |
16,467 | [
"https://cs.stackexchange.com/questions/16467",
"https://cs.stackexchange.com",
"https://cs.stackexchange.com/users/10572/"
] | How to reverse the order of elements in an array between indices <span class="math-container">$i$</span> and <span class="math-container">$j$</span>.
Ex: For the array <code>[A,B,C,D,E,F]</code>, calling the function <code>reverse(array, 1,4)</code> will modify the array to be <code>[A,E,D,C,B,F]</code>.
I want to opti... | Let me restate the problem. We're given an array $A_0$ and a sequence $(\ell_1,r_1),\dots,(\ell_m,r_m)$. Set $A_{i+1}=\text{reverse}(A_i,\ell_i,r_i)$. The goal is to compute the array $A_m$.
The naive way to solve this is to just incrementally apply the reverse operations, i.e., incrementally invoke Yuval's <code>r... | Here is the classical algorithm used to solve the problem:
<pre><code>def reverse(array, i, j):
if i > j: # ensure i <= j
i, j = j, i
while i < j:
array[i], array[j] = array[j], array[i]
i += 1
j -= 1
</code></pre>
For example, <code>reverse(array, 1, 4)</code> will swap array[1] and arra... | https://cs.stackexchange.com |
281,905 | [
"https://physics.stackexchange.com/questions/281905",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/130986/"
] | Let it be $f=f(r,t)$ any function representing the "shape" or "outline" of an object. In classical physics $f$ obeys the "classic" wave equation.
\begin{equation}
\frac{∂^2f}{∂t^2}-v^2\nabla^2 f=0
\end{equation}
If one imagines the object to be a pool ball then $f$ would <em>precisely</em> describe the translational... | The premise that $\frac{\partial^2f}{\partial t^2}-v^2 \frac{\partial^2f}{\partial x^2}=0$ implies anything about what transformation to use is false.
If these were surface waves on water in a Newtonian world, then the correct transformation to use would in fact be a Galilean transformation, and you'd get a wave equat... | <blockquote>
However, the <strong>relativistic</strong> form of this <em>exact</em> equation (with $0\leqslant v \leqslant c$) do not exists, since:
<ol>
<li>If a phenomenon obeys classic wave equation then $v$ must be equal in all reference frames, which obvious is not the case of a pool ball.</li>
<li>Cons... | https://physics.stackexchange.com |
397,713 | [
"https://physics.stackexchange.com/questions/397713",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/191456/"
] | In special relativity Einstein used Pythagorean theorem for proving Lorenz transformations. But in general relativity we discovered that space-time has curvature near massive objects, so the geometry near them isn't euclidean. The question is, how can we use Pythagorean theorem in special relativity, if general relativ... | The reason that Special Relativity is called "special" is that it only deals with the special case where there are no large masses nearby--and therefore no gravity. With no gravity, spacetime is flat and the Pythagorean theorem holds.
| General relativity reduces to special relativity in the limit of short distances. Likewise, the error in the Pythagorean theorem is negligible on sufficiently short distance scales.
| https://physics.stackexchange.com |
378,010 | [
"https://mathoverflow.net/questions/378010",
"https://mathoverflow.net",
"https://mathoverflow.net/users/168668/"
] | Deligne, Goncharov and Levine have constructed a Tannakian category of mixed Tate motives, MTM(<span class="math-container">$\mathcal{O}_{K,S}$</span>), over the ring of integers of a number field <span class="math-container">$K$</span> unramified outside a finite set of places <span class="math-container">$S$</span>.
... | This answer is a slight addition to Joel's and David's.
In the theory of Galois representations, there is a general philosophy that <span class="math-container">$p$</span>-adic phenomena (say in Hida families or eigenvarieties) reflect corresponding mod <span class="math-container">$p$</span> phenomena. So before ask... | You seem to be starting with the answer and trying to deduce the question.
<blockquote>
By Langlands philosophy every motive should correspond to an automorphic form. [...] What makes <span class="math-container">$M^1_n$</span> automorphic?
</blockquote>
I think it's a very interesting philosophical question: if (simpl... | https://mathoverflow.net |
71,593 | [
"https://stats.stackexchange.com/questions/71593",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/4048/"
] | I have conducted a repeated measures ANOVA using a Linear mixed-effects model fit with REML in R. When I report the results I include the ANOVA table output by <code>anova(model_object)</code>
<pre><code>anova(O2.rmtest)
numDF denDF F-value p-value
(Intercept) 1 131 168.08616 <.0001
mmolO2... | You solve a "classical ANOVA" (linear model) by means of least squares, this is, partitioning the sums of squares (among explicative factors) and minimizing the residual sum of squares (unexplained variation). An ANOVA table resumes that partition into all components in the model.
In a linear mixed model you are solvi... | ANOVA is a strange word, because it means many different things. When people fit a general linear model with categorical predictors, they often call it ANOVA, and they get sums of squares (including error sums of squares).
From ?anova
<pre><code>When given a single argument it produces a table which tests whether th... | https://stats.stackexchange.com |
3,711,673 | [
"https://math.stackexchange.com/questions/3711673",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/-1/"
] | <blockquote>
Let <span class="math-container">$n \geqslant 0$</span> be an integer. Show that <span class="math-container">$2^n | \lceil (3+\sqrt5)^n \rceil.$</span>
</blockquote>
This turned out to be relatively hard. The idea that our lecturer gave was that one should work towards an linear recurrence relation he... | Let <span class="math-container">$a_n=(3+\sqrt5)^n+(3-\sqrt5)^n$</span>.
Then can you show <span class="math-container">$a_0=2$</span>, <span class="math-container">$a_1=6$</span>, and <span class="math-container">$a_{n+2}=6a_{n+1}-4a_{n}$</span>?
[<span class="math-container">$3+\sqrt5$</span> and <span class="math... | As hinted in comment, first solve the following recurrent relation:
<span class="math-container">$$
F_n = 3F_{n-1} - F_{n-2}, F_0 = 1, F_1 = 3
$$</span>
If you can solve the recurrence, you will know the closed form of the above recurrent relation is <span class="math-container">$F_n = (\frac{3+\sqrt{5}}{2})^n + (\fr... | https://math.stackexchange.com |
429,841 | [
"https://electronics.stackexchange.com/questions/429841",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/180335/"
] | 6ea 1k resistors connected in series to +3.3v and Gnd.
Q how can arduino UNO A to D be programmed to measure the analog voltages of 6 resistor ladder network without using switches ?
| I use TP4056 charger boards a lot, both on their own and embedded in some devices. In addition to existing answers, I'd like to mention this - it's OK for TP4056 to heat up, it's a linear charger and it heating up doesn't impact its performance/reliability all that much. As long as the board has proper heatsinking, you... | Yes it is OK to reduce the charging current and that is what the TP4056's charging current setting resistor is for. If you halve the charging current, charging will of course take longer. Charging slower (but not too slow) should actually increase battery lifetime. But for an 18650 cell, 1 A charging current is reasona... | https://electronics.stackexchange.com |
43,743 | [
"https://math.stackexchange.com/questions/43743",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/-1/"
] | Consider the following problem:
<blockquote>
Which of the following sets has the
<em>greatest cardinality</em>?
A. ${\mathbb R}$
B. The set of all functions from
${\mathbb Z}$ to ${\mathbb Z}$
C. The set of all functions from
${\mathbb R}$ to $\{0,1\}$
D. The set of all finite subsets of
... | You are correct to think that the cardinality of the functions from $\mathbb{Z}$ to $\mathbb{Z}$ is $\aleph_0^{\aleph_0}$. To calculate this observe that $2^{\aleph_0}\leq\aleph_0^{\aleph_0}\leq (2^{\aleph_0})^{\aleph_0}=2^{\aleph_0\cdot\aleph_0}=2^{\aleph_0}$. Now using the Cantor-Bernstein theorem you get that $\ale... | The correct answer is the functions from $\mathbb R$ to $\{0,1\}$, the calculations and comparisons are given here:
<ol>
<li>$\mathbb R=2^{\aleph_0}$.</li>
<li>All the functions from $\mathbb Z$ to $\mathbb Z$ is the same as $\mathbb N$ to $\mathbb N$, which is $2^{\aleph_0}\le\aleph_0^{\aleph_0}\le 2^{\aleph_0\times\... | https://math.stackexchange.com |
436,044 | [
"https://softwareengineering.stackexchange.com/questions/436044",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/404883/"
] | I work with a specific engineer (let's call them X) that, even though they have many years of experience in the industry, has a lot of trouble to manage the scope of code changes. For example, say that we as a team have estimated that a task will take '5' story points, X will claim that all existing code is 'bad' - and... | Big and especially non-local refactorings should be a job on their own, with all that implies about planning and being clear upfront what the plan is and how long it will take.
And as you've observed, refactoring without adequate test coverage is performing without a safety net.
Some of this depends what language you'r... | The general recommended approach to refactoring is to first write sufficient tests so you have good understanding how the current system works. Then you can start moving functionality to to new, better designed, modules, rewriting it in the processes. Eventually all the important code should be in well designed modules... | https://softwareengineering.stackexchange.com |
225,163 | [
"https://stats.stackexchange.com/questions/225163",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/60672/"
] | It seems that most people favor using $$t_{stat} = \frac{\hat{p}-p_0}{\sqrt{p_0(1-p_0)/n}}$$ instead of $$t_{stat} = \frac{\hat{p}-p_0}{\sqrt{\hat{p}(1-\hat{p})/n}}$$
when doing Hypothesis Testing with sample proportions (at least so were we told in class).
This doesn't make sense to me, since we use $s$ for sample m... | People use $p_0$ instead of $\hat{p}$ because in hypothesis testing we want to know how likely it is to observe the current sample <strong>assuming that the null hypothesis is true</strong>. If the null hypothesis is true, we <strong>know</strong> the standard deviation in case of a Binomial experiment, and we should u... | In the second formula, you are using the normal approximation which can be used when the number of trials is large. For normally distributed variables, the mean and variance are independent of each other, so you have to use the estimated variance below since you do not know it. This is also why the normal distribution ... | https://stats.stackexchange.com |
137,930 | [
"https://softwareengineering.stackexchange.com/questions/137930",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/48590/"
] | I find very troubling amount of spelling mistakes I see everyday in our codebase, from which I will reproduce a very short but representative example:
<pre><code>ArgumnetCount
Timeount
Gor message from queue
</code></pre>
Unfortunately this is in no way limited to one person. There is a lot of non-native English spe... | Spelling errors can mean one of two things:
<ul>
<li>The person who makes them is not proficient in English, and doesn't take the time to compensate by using appropriate tools (dictionaries, spell checkers, etc.)</li>
<li>The person who makes them is proficient in English, but doesn't care about spelling at all.</li>
... | I actually doubt whether "Timeount" is a matter of not being a native speaker. People make tons of typos in their first language. I wouldn't qualify these particular examples as "Engrish".
Having said that, I understand that it's not about these particular examples. I agree with you in principle. I've come across act... | https://softwareengineering.stackexchange.com |
867,572 | [
"https://math.stackexchange.com/questions/867572",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/16595/"
] | I am trying to prove the following result.
<blockquote>
Let $G$ and $G'$ be two finite abelian groups. Besides, they have the same number of elements of any given order. Prove that $G\cong G'$.
</blockquote>
My attempt is by induction on $|G|\geq1$. The base step is obviously true. Now, let $a\in G$ have maximal or... | I'd suggest leveraging the structure theory of finite abelian groups, which tells us any finite abelian group is determined by the number of primary factors it has of each order (which are invariants of the group). One can "work backwards" and read off the number of elements of a given prime power order in $G$, <em>giv... | I agree, with a previous comment, that restricting to $p$-groups first is a good idea. In fact note that knowing the orders of each element is equivalent to knowing, for all $n$, the size of kernel of multiplication by $n$. (why? The kernel of multiplication by $n$ is the disjoint union (over the divisors $d$ of $n$) o... | https://math.stackexchange.com |
237,678 | [
"https://softwareengineering.stackexchange.com/questions/237678",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/99674/"
] | For example I have this code:
<pre><code>$route = 'product/category';
//variable overload
$type = explode('/',$route);
$type = $type[1];
</code></pre>
My thinking behind this is that I actually don't need unique variable name for exploded variable, so why not to overwrite?
Is this really bad concept? Or is there ... | No, it's absolutely not bad. All you're doing here is assigning a new value to a variable. It has no special name.
As for more elegantly writing it, you could write the following as of PHP 5.4:
<code>$type = explode("/", $route)[0];</code>
| Other elegant solution:
<pre><code>list($type, ) = explode("/", $route);
</code></pre>
I think it's the best one.
| https://softwareengineering.stackexchange.com |
49,638 | [
"https://mathoverflow.net/questions/49638",
"https://mathoverflow.net",
"https://mathoverflow.net/users/11395/"
] | Let $X$ be a regular integral projective scheme of dimension 1 over a field $k$ (not algebraically closed). Further, assume $X$ satisfies $dim_kH^0(X,\mathscr{O}_X)=1$. Let $\bar{X}$ denote the fibered product $X\times_k\bar{k}$. Then is it true that $\bar{X}$ is integral?
| This is an answer to the updated question, and it is positive in far more general situations. By EGA, IV.9.7.7, for any morphism of finite presentation $X\to Y$, the set $E$ of $y\in Y$ such that $X_y$ is geometrically integral is locally constructible. In your situation, $Y$ is noetherian and the set of the closed poi... | No, there are many counterexamples. Suppose that $a \in k$ is not a square; then the conic in $\mathbb P^2_k$ with equation $x^2 - ay^2$ is integral, while after base changing to $\overline k$ it splits into two components (these are switched by the Galois group).
| https://mathoverflow.net |
1,825,720 | [
"https://math.stackexchange.com/questions/1825720",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/347297/"
] | $\tan \theta$ = $n\tan \phi$ <br/>
then the maximum value of $\tan ^ 2 (\theta - \phi )$ is?
<br/><br/>
The answer is $\frac{(n-1)^2}{4n}$.
<br/> How do I solve to get the required answer?
| Let $$k=\tan^2(\theta-\phi)$$ and write $$t=\tan\phi$$ so that $$k=(n-1)^2\frac{t^2}{(1+nt^2)^2}$$
Differentiating using the Quotient Rule gives $$\frac{dk}{dt}=(n-1)^2\frac{2t-2nt^3}{(1+nt^2)^3}=0$$
So the stationary value is given by $$t=\frac{1}{\sqrt{n}}\Rightarrow k=\frac{(n-1)^2}{4n}$$
You can check that this i... | Here is an approach which will leads to success.
Set $\theta=\arctan(n\tan \phi)$ Find $\frac{d\theta}{d\phi}$
then differentiate $\tan^2(\theta-\phi)$ with respect to $\phi$ set the result equal to zero, you should be able to get the condition $$\frac{n\sec^2 \phi}{n^2\tan^2\phi+1}=1$$ then algebra and the sum formu... | https://math.stackexchange.com |
2,873,902 | [
"https://math.stackexchange.com/questions/2873902",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/570638/"
] | <blockquote>
If the roots of the equation $x^2 + 3x -1 = 0$ also satisfy the equation $x^4 + ax^2 + bx + c = 0$ find the value of $a + b + 4c + 100$
</blockquote>
I tried really hard but the most I could get is the sum of the roots of the second equation is $3$
Please could someone solve this please !
It would mean... | Alternatively, the Vieta's formula's for $x^2 + 3x -1 = 0$:
$$x_1+x_2=-3, x_1x_2=-1 \Rightarrow x_1^2+x_2^2=(x_1+x_2)^2-2x_1x_2=9+2=11.$$
Plugging $x_1,x_2$ to $x^4 + ax^2 + bx + c = 0$ and subtracting:
$$\begin{cases}x_1^4 + ax_1^2 + bx_1 + c = 0\\ x_2^4 + ax_2^2 + bx_2 + c = 0\end{cases} \Rightarrow \\
(x_1-x_2)(x_1+... | We can find the equation must satisfy$x^4+ax^2+bx+c=(x^2+3x-1)(x^2+mx+n)$ and$m=-3,n=-c$. So when$x=1,1+a+b+c=3(1-3-c)\rightarrow a+b+4c+7=0$.
| https://math.stackexchange.com |
534,452 | [
"https://stats.stackexchange.com/questions/534452",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/143283/"
] | I pick a random number between 0 and 1. (My pick is uniformly distributed.) This number determines how weighted a coin is towards heads. If it's 1, there's a 100% chance that the coin will land on heads. If it's a 0, there's a 0% chance that the coin will land on heads. If it's 0.75, there's a 75% chance the coin will ... | Carrying on where you left off,
<span class="math-container">$$
P(W = 1 | T > 0.5)
$$</span>
As <span class="math-container">$T \sim Unif(0,1)$</span>, the conditional distribution of <span class="math-container">$T|T>a$</span> is <span class="math-container">$Unif(a,1), a \in (0,1)$</span>. Therefore, integratin... | How I would do this:
<ul>
<li>The prior density for <span class="math-container">$T$</span> is <span class="math-container">$f(t)=1$</span> for <span class="math-container">$t \in [0,1]$</span>
</li>
<li>The likelihood is proportional to <span class="math-container">$\mathbb P(W=1\mid T=t)=t$</span>
</li>
<li>So the po... | https://stats.stackexchange.com |
4,228,847 | [
"https://math.stackexchange.com/questions/4228847",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/833904/"
] | <blockquote>
<span class="math-container">$$ \lim _{x\to 0+} \frac{\int _0^x\sqrt{x-t}e^tdt}{\sqrt{x^3}} $$</span>
</blockquote>
I tried to use mean value theorem
<blockquote>
<span class="math-container">$$ \int _0^x\sqrt{x-t}e^tdt = \sqrt{x-\xi}e^\xi \cdot x, \xi \in (0,x)$$</span>
</blockquote>
but i don't know how ... | We have
<span class="math-container">\begin{align*}
\int_0^x \sqrt{x-t} e^t \ \mathrm{d}t &= \int_0^x \sqrt{t}e^{x-t} \ \mathrm{d}t && \text{by Border Flip}\\
&= e^x \int_0^x \sqrt{t}e^{-t} \ \mathrm{d}t\\
\implies \lim_{x \to 0^+} \frac{\int_0^x \sqrt{x-t} e^t \ \mathrm{d}t}{x^{\frac{3}{2}}} &= \li... | Here's an answer using Leibniz's and L'Hopital's rule:
<span class="math-container">$$L= \lim _{x\to 0+} \frac{\bigg(\int _0^x\sqrt{t}e^{x-t}dt\bigg)'}{\bigg(\sqrt{x^3}\bigg)'}= \lim _{x\to 0+} \frac{\sqrt x+\int _0^x\frac{\partial e^{x-t}}{\partial x}\sqrt tdt}{\frac32\sqrt{x}}=\lim _{x\to 0+} \frac{\sqrt x+\int _0^xe... | https://math.stackexchange.com |
248,387 | [
"https://mathoverflow.net/questions/248387",
"https://mathoverflow.net",
"https://mathoverflow.net/users/56571/"
] | I have encountered the following linear algebra/number theory question in my work (low-dimensional topology), so I thought I should ask the experts.
Let $A \in SL(n,\mathbb{Z})$ be a matrix , $n \geq 3$. One can easily show that there is some $j \in \mathbb{N}$ such that $Tr(A^j) \geq 3$ (proof given at the end). My ... | Yes: for every $d\ge 3$ and all $A\in\mathrm{GL}_d(\mathbf{Z})$, there exists $n\in\{1,\dots,12^d\}$ such that the trace of $A^n$ is $\ge 3$. (This is probably far from sharp, and I don't know if we can do better than exponential.)
First part: I claim that if $t=(t_1,\dots,t_d)$ is a $d$-tuple in the unit circle, then... | Thue's lemma allows to get an exponential bound for $k(n)$, though it seems to be not sharp. More specifically, idea is the following. We partition the unit circle onto three equal arcs $A,B,C$ and for each $k$ encode a sequence $(\lambda_1^k,\dots,\lambda_n^k)$ by a sequence of $n$ letters A,B,C which correspond to ar... | https://mathoverflow.net |
1,730 | [
"https://mechanics.stackexchange.com/questions/1730",
"https://mechanics.stackexchange.com",
"https://mechanics.stackexchange.com/users/281/"
] | Which motorcycles are well known for being easy to maintain and repair, and would be suited for a beginner to cut his teeth on? What are some features of motorcycles that I should look for, when trying to decide if a motorcycle would be best suited for me to learn maintenance and repair on?
I'm looking for a cruiser o... | Some things to consider when looking at bikes if learning to do maintenance is a consideration:
<ul>
<li><strong>Age.</strong> Older bikes tend to be much simpler, but they're not as well-engineered and well-manufactured as newer ones. Some will need more wrench time because of it.</li>
<li><strong>Availability of P... | I've had a succession of Honda NTV's over the years and been very happy with them. They are pretty bulletproof, being shaft drive, yet still a nice commuter ride.
I bumped into a previous owner of one of my NTV's who told me he'd taken it touring around Norway and Sweden, while my father had a Deauville for a year doi... | https://mechanics.stackexchange.com |
10,396 | [
"https://dba.stackexchange.com/questions/10396",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/3351/"
] | Say I have a table clustered on <em>PrimaryKey</em>, and in all cases I want my results to be ordered by <em>PrimaryKey</em>, so I additionally always <code>ORDER BY PrimaryKey</code> in all queries.
Does this <code>ORDER BY</code> affect performance in any way or is it ignored by the profiler as the rows are already i... | <strong>It almost certainly will affect performance.</strong>
If you just do a query like
<pre><code>Select *
From Table
Order by PrimaryKey
</code></pre>
It likely won't affect anything at all.
Bear in mind, though, that this only determines the order of the rows at the leaf level of the clustered index. If you d... | Look at the query plan for both queries, you will see that the "order by" clause will result in a sort of the data that is returned by the remainder of the query (which should be in memory, but could be paged if memory insufficient). The time that sort takes is related to the amount of data (it has to walk it at least ... | https://dba.stackexchange.com |
21,858 | [
"https://cs.stackexchange.com/questions/21858",
"https://cs.stackexchange.com",
"https://cs.stackexchange.com/users/14724/"
] | I have thought about the most useful way of checking an array for 2 elements that sum to X.
The trivial solution is to check the sum of every element with every element, and the complexity of this solution is $O(n^2)$.
My solution is:
Say the array is A.
It's length is N.
Elements are from A[0] to A[N-1]
Pseudo-Code ... | Sort the array say ascending order- Takes O(nlogn)
Keep two pointers in the array say fingers. Finger f1 at the first element and finger f2 at the last element.
Sum the elements to get f1+f2:
if f1+f2 == X you have found your solution
else if f1+f2 > X decrease f2 to point to the element to its left
else increase f... | You probably meant <code>if (A[left]+A[right]=X)</code>. Otherwise you would be comparing the same two elements over and over.
Even with this change your algorithm does not solve the problem. If e.g. $A[1]+A[N-2]=X$, it will never detect this.
Regarding complexity, your algorithm satisfies the recurrence
$$T(N) = 2\c... | https://cs.stackexchange.com |
118,366 | [
"https://electronics.stackexchange.com/questions/118366",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/39643/"
] | I found the following diagram in data sheet for M74HC595 8 bit shift register
<img src="https://i.stack.imgur.com/SkQ9Q.png" alt="M74HC595 Logic Diagram">
I have three questions.
<ol>
<li>Do I understand correctly that all blocks inside red ellipses are NOT gates?</li>
<li>What is the difference between (circle-trian... | Answers:
<ol>
<li>Yes</li>
<li>They want to emphasize that the input signal is active high or active low</li>
<li>There is probably that circuit inside (or certainly something very close to two CMOS inverters), to buffer the input, so the input does not have to drive all the flip-flops directly and has no more capaci... | I would add to Sphero's very good answer that you should not take these IC internal diagrams literally. They are intended to show essential internal functionality, but not necessarily detailed internal structure.
For example, do the D-Flops on the silicon actually have a low-going RESET input as indicated by the diag... | https://electronics.stackexchange.com |
690,858 | [
"https://physics.stackexchange.com/questions/690858",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/321540/"
] | In the case of AC, electrons don't go anywhere. So what exactly are amperes in the case of AC current? It is supposed to be the measure of AC current, But obviously, I would argue that since electrons don't really go anywhere in an AC circuit, current as such cannot be measured.
So how do instruments measure amperes in... | It is easier to measure the intensity and direction of a continuous current by the deflection of a magnet needle like the Oersted experiment.
In the case of AC, we know that something similar is happening in the wire, because of the joule effect and other energy productions. But if we place a compass nearby, the needle... | No, it's still very straightforward to measure current. Current is the amount of charge flowing through a point at any instant, which is well defined as <span class="math-container">$I(t) = I_o \cos(\omega t)$</span> for AC. Conventionally, when we give current we take the RMS current for AC (i.e. <span class="math-con... | https://physics.stackexchange.com |
83,712 | [
"https://electronics.stackexchange.com/questions/83712",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/27975/"
] | How is the Gate capacitance and the Miller capacitance modeled for a MOSFET. What is the behavior for both when a Gate Voltage is applied?
| There is always capacitance between drain and gate which can be a real problem. A common MOSFET is the FQP30N06L (60V LOGIC N-Channel MOSFET). it has the following capacitance figures: -
<ul>
<li>Input Capacitance 1040 pF (gate to source)</li>
<li>Output Capacitance 350 pF (drain to source)</li>
<li>Reverse Transfer C... | I am afraid that the term "Miller" capacitance has not yet been properly explained. It was said that the Miller capacitance would be identical to the drain-to-gate capacitance. I think, this neeeds clarification.
The problem is that the Miller effect (caused by negative feedback) increases the input conductance at th... | https://electronics.stackexchange.com |
13,142 | [
"https://dba.stackexchange.com/questions/13142",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/3313/"
] | I have an Oracle sequence defined like so:
<pre><code>CREATE SEQUENCE "DALLAS"."X_SEQ"
MINVALUE 0
MAXVALUE 999999999999999999999999999
INCREMENT BY 1 START WITH 0 NOCACHE NOORDER NOCYCLE ;
</code></pre>
It is used in a stored procedure to insert a record:
<pre><code>PROCEDURE Insert_Record
... | I'm pretty certain this will end up being an artifact of your code, or the .net driver you are using. I've knocked up a quick demo for you using pure SQL - PL/SQL and never get a lost sequence value. Incidentally the ref cursor you are using is probably unnecessary and likely impacts performance and readability of the ... | Try doing a test case. Make a dummy table and insert 100,000 records using your sequence from the database. I'm betting you will have no problems. Next try inserting the same thing from your application.
Could this be caused by other issues such as an Oracle client mismatch?
Another solution that would fix the i... | https://dba.stackexchange.com |
315,858 | [
"https://mathoverflow.net/questions/315858",
"https://mathoverflow.net",
"https://mathoverflow.net/users/40297/"
] | I would like a proof or a reference (or a counter-example...) for the following fact. Let <span class="math-container">$P\in \mathbb{C}[x_1,\ldots ,x_n]$</span> and <span class="math-container">$D\in \mathbb{C}[\frac{\partial }{\partial x_1} ,\ldots ,\frac{\partial }{\partial x_n}]$</span> be nonzero homogeneous pol... | Here is another approach. Let <span class="math-container">$R$</span> be a non-zero homogeneous polynomial of degree <span class="math-container">$n$</span>. We want to show that the mapping <span class="math-container">$Q\mapsto R(\partial)Q$</span> is surgective from <span class="math-container">$V_{m+n}$</span> to <... | Too long for a comment. I want to use a version of the Lojaciewicz theorem of division of distributions by an analytic function (in fact Hörmander's result of division by a polynomial). We may assume that <span class="math-container">$P(x) =x^\alpha=x_1^{\alpha_1}\dots x_n^{\alpha_n}$</span> a monomial homogeneous wit... | https://mathoverflow.net |
1,237,145 | [
"https://math.stackexchange.com/questions/1237145",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/201024/"
] | So, this question is more like two mini-questions that are subsets of a single regular-sized question. Say I have two planes: $x-z=1$ and $y+2z=3$. I'm trying to find their line of intersection.
a. Would it be okay to just take the lazy way out and add them, and end up with $2x+y=5$, which is the same as $y=-2x+5$? (... | For the first part of your question, adding the two planes does <em>not</em> yield their line of intersection. In fact, it does not even yield a line, it is the equation of a plane passing through their line of intersection.
In general, given two planes $P_1,P_2$,
$$P_1+\lambda P_2=0, \lambda\in\mathbb{R}$$
represents... | Hint:
You can obtain the intersection line as:
$$
\begin{cases}
x-z=1\\
y+2z=3
\end{cases}
$$
that has solution:
$$
\begin{cases}
z=x-1\\
y=-2x+5
\end{cases}
$$
so your line is:
$$
(x,y,z)=(0,5,-1)+t(1,-2,1)
$$
From this equation you can easely find a point on the line and his versor.
| https://math.stackexchange.com |
191,389 | [
"https://physics.stackexchange.com/questions/191389",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/45835/"
] | My colleagues and I were having a layman conversation about fuel consumption of boats vs planes etc. I was pointing out that according to the formula
$$
E_k = \frac{1}{2}mv^2
$$
if you double the speed of an object, you quadruple its energy (which is why transport agencies do campaigns to reduce drivers speeding).
... | Yes, doubling the mass doubles the energy, while doubling the velocity quadruples it. Your question is basically about order of operations; the exponent only applies to the variable it's immediately on. As you note, you'd have to put parentheses to make it cover the $m$ as well. We say that energy is <em>linear</em> in... | Zeldredge's answer is great, answering the question from a mathematical point of view. Since you asked this question in a physics forum, I'll just add to that by answering from a physical point of view, clarifying <em>why</em> the energy is linear in mass and not quadratic:
Suppose you have two objects of equal mass m... | https://physics.stackexchange.com |
24,342 | [
"https://softwareengineering.stackexchange.com/questions/24342",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/2638/"
] | I really enjoy programming games and puzzle creators/games. I find myself engineering a lot of these problems the same way and ultimately using similar technique to program them that I'm really comfortable with.
To give you brief insight, I like to create graphs where nodes are represented with objects. These object h... | No, it's fine.
The point of practical programming is to find solutions that will possibly be useful in many similar developments. You just found one.
You can't and shouldn't be creating different solutions just for the sake of them being different. But you definitely should have a critical look at your solutions each... | If it works well, call it a design pattern. If it doesn't, but you don't know better, it's the golden hammer antipattern.
| https://softwareengineering.stackexchange.com |
53,454 | [
"https://mathoverflow.net/questions/53454",
"https://mathoverflow.net",
"https://mathoverflow.net/users/5873/"
] | Consider some probability distribution $D$ over non-negative reals with finite expectation $\mu$. Now for any positive $T$ consider sums of $T$ iid random variables drawn from $D$. A single sum of this sort would be $S(T) = \sum_{i = 1}^T x_i$ where each $x_i$ is a iid random sample from $D$.
We will consider $n$ such... | It is always true. Split $x_i=y_i+z_i$ where $y_i$ are bounded and $Ez_i\le \frac \mu{10n}$. You have no problems with $y_i$ because if they were alone,$ES_j$ would be concentrated in a very strong sense around $\nu T$ for large $T$ where $\nu=Ey_i\le\mu$ (see Didier's argument for details or recall the Bernstein inequ... | Let
$M_n(T)=\max\{S_1(T),\ldots,S_n(T)\}$
where the $S_j(T)$ are i.i.d. and distributed like $S(T)$. A partial answer to your question is that $E(M_n(T))/T\to\mu$ when $T\to+\infty$ as soon as the function $K$ is integrable on $(0,+\infty)$, where
$$
K(z)=\sup_TP(S(T)\ge zT).
$$
Hence, if $E(x_1^{1+\varepsilon})$ is ... | https://mathoverflow.net |
38,372 | [
"https://mechanics.stackexchange.com/questions/38372",
"https://mechanics.stackexchange.com",
"https://mechanics.stackexchange.com/users/6493/"
] | On Halloween, the check engine light on my 2007 Honda Odyssey EX started flashing. Read the codes which were a random misfire and misfires on 2,4,5, and 6 (P0300, P0302, P0304, P0305, and P0306 respectively). Symptoms were rough idle, no loss to power. The car is at 117k miles, we had just bought it a month earlier, so... | The issue was that another coil pack had gone out, probably because of the oil in the well.
After getting all the oil out of the well, the engine was still misfiring. I then proceeded to unplug the coil packs one by one while the car was running. The only pack that didn't have an effect on the engine when it was unplu... | if you just bought it return it immediately and don't bother. Only reason to keep it is if you got a heck of a good deal. Else go back and complain and get some money back for the issues or have them fix it.
If it was a really awesome deal as in literally $1500 or less then ok you have an oil leak and that is shorting... | https://mechanics.stackexchange.com |
411,106 | [
"https://softwareengineering.stackexchange.com/questions/411106",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/357939/"
] | I'm a junior engineer, but I've worked at two companies now. In both cases I've found that my colleagues and I are assigned tasks with no thought put into the design before being told to do it.
Typically I spend about 90% of my time writing down on paper how I'm going to do the task, then the code sort of writes itsel... | If you are assigned a task that has no design done for you then doing the design is part of your task.
This is not unusual. Design may have been done at some level but now the task needs it's own design.
Now please don’t take this as license to spend weeks alone doodling UML. You should create enough design so that ... | There are parts of a design that are important to settle on early, like which library or service the change should go in, whether to create a new component or add onto an existing one, what is the interface between your code and code others will write, etc.
The deeper you get into the details, the more important it is... | https://softwareengineering.stackexchange.com |
98,516 | [
"https://cs.stackexchange.com/questions/98516",
"https://cs.stackexchange.com",
"https://cs.stackexchange.com/users/93100/"
] | Consider algorithms to find shortest paths in a graph. The grassfire algorithm has a complexity of <code>O(|V|)</code> where <code>V</code> is the number of nodes or vertices. The Dijkstra's algorithm has a complexity of <code>O((|V| + |E|) * log(|V|))</code> where <code>E</code> is the number of edges. Compared to A s... | In grassfire the distances are constant. All of your neighbors have equal length. In a weighted graph, grassfire will fail.
Graphfire is actually based on a small modification of BFS.
The Dijsktra works on weighted graphs, too.
<strong>Note:</strong> If all costs are equal, Dijkstra = BFS
Know the difference, and ... | The Grassfire algorithm only works on a particular kind of graph; Dijkstra's algorithm works on any graph.
| https://cs.stackexchange.com |
18,433 | [
"https://mathoverflow.net/questions/18433",
"https://mathoverflow.net",
"https://mathoverflow.net/users/4619/"
] | More specificaly, is there a haussdorf non-discrete topology on $\mathbb{Z}$ that makes it a topological group with the usual addition operation?
| Yes. Take, for example, the subgroups $p^k\mathbb{Z}$, for $k>0$ and a fixed prime $p$, as a basis of neighborhoods of the identity.
| There is a topology on $\mathbb Z$ which has the set of all arithmetic sequences as a basis. It shows up in the topological proof of the infinitude of primes, <em>cf.</em> [H. Fürstenberg, On the Infinitude of Primes, Amer. Math. Monthly 62 (1955), 353]
| https://mathoverflow.net |
2,581,710 | [
"https://math.stackexchange.com/questions/2581710",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/456203/"
] | Is this Notation correct?
For example:
<blockquote>
$$\sqrt[-100]{100}$$
</blockquote>
I think this is wrong, because
<blockquote>
$$100^{\frac{1}{-100}}=100^{\frac{-1}{100}}=\sqrt[100]{100^{-1}}=\sqrt[100]{\frac1{100}}$$
</blockquote>
Am I correct?
| <blockquote>
The notation $\sqrt[-100]{100}$ is correct, albeit not commonly used. In fact the whole equality chain
\begin{align*}
\color{blue}{\sqrt[-100]{100}}=100^{\frac{1}{-100}}=100^{\frac{-1}{100}}=\sqrt[100]{100^{-1}}=\sqrt[100]{\frac1{100}}\tag{1}
\end{align*}
is correct.
</blockquote>
Sometimes we can r... | it can be simplified to $$\frac{1}{(10^2)^{1/100}}=\frac{1}{10^{1/50}}$$
| https://math.stackexchange.com |
489,397 | [
"https://physics.stackexchange.com/questions/489397",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/235005/"
] | <blockquote>
There are two blocks <span class="math-container">${(m_1 ,m_2)}$</span> of different masses placed on a surface, connected with a spring of spring constant <span class="math-container">$k$</span>. The coefficient of friction between the blocks and surface is <span class="math-container">$\mu$</span>. Now... | @DivMits's answer is on the right track, but I think more detail is needed, and a final conclusion needs to be stated.
Before we get started, we should first address an issue raised in the comments around some confusion about what type of friction the coefficient <span class="math-container">$\mu$</span> is associated... | In the first case , when you start applying the force , the block <span class="math-container">$m_1$</span> is accelerated , till the equilibrium position, but it has gained some velocity in this process which pushes it forward even further and causes more elongation in the spring.
In the second case , the force that ... | https://physics.stackexchange.com |
599,668 | [
"https://physics.stackexchange.com/questions/599668",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/281277/"
] | I'm scratching my head a lot in trying to understand friction.
So far I understand that "without friction we would not be able to walk". But that sounds really vague and unclear, so much in fact that it doesn't make any sense to me unless I give it one more thought.
As far as I understood: the force of fricti... | <blockquote>
the force of friction appears when there are two contact surfaces that interact against each other
</blockquote>
If you by "interact against" mean "try to slide over", then correct.
<blockquote>
As long as the threshold of this friction is not surpassed the Force of friction will adjust... | What needs to be incorporated into this picture, is that a walking human in this context cannot be approximated by a point-like object - the approximation that we commonly make in introductory mechanics. Walking implies forces applied between different parts of the body, notable between the legs and the torso, as well ... | https://physics.stackexchange.com |
116,380 | [
"https://electronics.stackexchange.com/questions/116380",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/46141/"
] | I am studying for an exam in my course, and I will certainly have a question of the kind:
In what base is the equation written, for example:
<pre><code>42-3=36
</code></pre>
Another example:
<pre><code>(8*5+11)/4=12
</code></pre>
I am wondering how to approach this kind of exercises, and how to solve them. I know ... | Call the base "N". Then write the equation in base conversion form: The first one being:
4*N + 2 - 3 = 3*N + 6
Then solve for N
In general, digits in the second column (from the right) are multiplied by N, digits in the third column would be multiplied by \$N^2\$, digits in the fourth column would be multiplied by \... | Do note that the the base is going to at least be 1 integral number larger than the largest value seen in the expression. For example,
<code>42 - 3 = 36</code>
It <em>at least</em> of base >= 7.
<hr>
This slipped my mind. I was thinking about logs for some reason. Tut had it first.
(4*x) + (2) - (3) = (3*x) + (6... | https://electronics.stackexchange.com |
211,764 | [
"https://dba.stackexchange.com/questions/211764",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/134722/"
] | I have been using the REPLACE function to remove characters from a text value in a table. It has just grown over time and now the query is quite messy.
What can I do to make this more efficient? Is there a Regex example that I could implement?
<strong>Query:</strong>
<pre><code>SELECT
REPLACE(
REP... | If I were to implement the migration, I would ensure to have a good planned indexing.
First of all, move the historical data into history tables, having the same structure as the current working tables, then create indexes for big groups: For example, including a YEAR column and making sure this one is a mandatory filt... | If there's no duplicate data to worry about, adding another 50 GB of data to a 250 GB database is not going to matter much, especially since the business requirements need the archived data in the live database.
Make sure you have good covering indexes. Perhaps you can import the historic data into a separate filegrou... | https://dba.stackexchange.com |
23,171 | [
"https://electronics.stackexchange.com/questions/23171",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/6696/"
] | I am direly confused on this. I've used 220 Ohm resistors in the past for all of my LEDs (at least that I can remember), however nothing on my arduino+breadboard with a few leds on the 5V breadboard rail had worked.
I finally looked at the data sheet for the LEDs from the overseas place I ordered them from, and they s... | <ol>
<li><i>I've used 220 Ohm resistors in the past for all of my LEDs (at least that I can remember), however nothing on my arduino+breadboard with a few leds on the 5V breadboard rail had worked.</i><br> <br>
Blindly using a value based on lore or superstition instead of math is a bad idea.
<li><i>I finally l... | A dumb question, but could very well be the answer. Are you using a breadboard and placing the resistor and led accidentally in parallel? I have seen many times fellow class mates placing them on the same "column" to save space.
| https://electronics.stackexchange.com |
314,507 | [
"https://stats.stackexchange.com/questions/314507",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/185318/"
] | Let's say a colleague tells me they has a good ML model and show me some numbers that suggests that they are right. What are some good questions that I should ask given that I can't LOOK at the actual model or data. Basically I would want to understand that the model is not overfitted to historical data, that they´ve b... | A "good" ML model is context specific (e.g., high ROC score is not sufficient to declare a model is a great classifier for your particular use case). Some of this you can ask the person who developed the model, but others are things <em>you</em> need to ask before using the model.
Now, since they have already tested i... | Reading "historical" I assume that you are talking about time series. In this case it's important that out of sample test subset is never located earlier in time than training subset.
Dataset size is important and should be in proper relation with model's number of parameters.
I'd also ask if chosen features include... | https://stats.stackexchange.com |
2,537 | [
"https://cstheory.stackexchange.com/questions/2537",
"https://cstheory.stackexchange.com",
"https://cstheory.stackexchange.com/users/168/"
] | I cannot think of any such model, maybe some form of typed lambda calculus? some elementary cellular automaton?
This would <em>almost</em> disprove Wolfram's "Principle of Computational Equivalence":
<blockquote>
Almost all processes that are not obviously simple can be viewed as computations of equivalent sophisti... | You can easily build artificial models which are not Turing complete but the halting problem for them is undecidable. E.g. take all TMs that do not halt on anything but <span class="math-container">$0$</span>.
<h3>Regarding the statement:</h3>
You cannot disprove a statement that is not precise enough. Almost none of t... | I'm pretty sure the diagonalization argument applies to any model of computation which:
<ul>
<li>can represent itself as a string, and</li>
<li>can simulate another machine, given the above representation</li>
</ul>
If we had a model which violated one of the above conditions, its computational power would be extreme... | https://cstheory.stackexchange.com |
359,211 | [
"https://softwareengineering.stackexchange.com/questions/359211",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/281118/"
] | There is a website driven by Django where the user logs in and can answer thousands of questions. I want to persistently save whether a given user has answered a given question or not.
My approach so far is for the User table to have thousands of columns in the PostgreSQL database - a column for each question containi... | Using a column per question makes it difficult to add more questions later.
Instead, model the relation between users and questions in your table. I.e. the questions are encoded explicitly as data, not implicitly in the structure of your table.
The table would have user_id and question_id columns, likely both with fo... | You should normalise your database schema. This means that instead of just having a User table, you would also have a Questions table containing information about each question, then you would also have an Answers link table where each row represents a particular user answering a particular question.
| https://softwareengineering.stackexchange.com |
137,122 | [
"https://math.stackexchange.com/questions/137122",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/29661/"
] | Discuss how to evaluate
$\oint_{C} \frac{e^{z^{2}}}{z^{2}}\,dz$ where C is a simple closed curve enclosing the origin
Try using the fact that $e^{z}=\sum_{j=0}^\infty \frac{z_{j}}{j!}$
Could someone help me through this problem?
| <h3>Method 1: </h3>
We obtain the Laurent series for $\frac{e^{z^2}}{z^2}$:
$$\frac{1}{z^2}e^{z^2}=\frac{1}{z^2}(1+z^2+\frac{z^4}{2!}+...)=\frac{1}{z^2}+1+\frac{z^2}{2!}+...$$
This series shows that $\frac{e^{z^2}}{z^2}$ has a pole of second order at $z=0$ and the residue $Res_{z=0}=0$. Therefore:
$$\oint_C \frac{e... | Alternitively, you can use Cauchy's integral formula (the general form) since you've got one singularity and it's inside of your contour.
| https://math.stackexchange.com |
98,973 | [
"https://softwareengineering.stackexchange.com/questions/98973",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/28206/"
] | I've been working on a nightmare of a project for some months now. The product is a small Ruby on Rails app/website for internal use by a small group of people. I'm coming up to the finish line and I'd like the actual beta release to go smoothly. I still have a number of small bugs that affect functionality in a minor ... | Mac OS X can only contractually be run on Apple Hardware. iOS requires the Cocoa framework and to have access to a Mac to sign the keychain. While you can use Objective-C on Linux using the OpenStep libraries, you can't push the applications you develop to iOS due to the lack of the correct Cocoa API libraries and whil... | There's no particular technical reason, but the developer tools Apple provides only run on Macs, and I don't see them being in any hurry to change that.
With regards to third party developer tools, Apple very publicly dislikes them, and given Apple's absolute veto power over what gets in the App Store, it's not a grea... | https://softwareengineering.stackexchange.com |
18,904 | [
"https://security.stackexchange.com/questions/18904",
"https://security.stackexchange.com",
"https://security.stackexchange.com/users/11927/"
] | I've been reading in most hardening guides for Linux, that you should check for files and directories without valid user or valid group. What I can't find, is <em>how</em> this could be used for an attack, or how this could be a weakness, besides it being "improper".
| Every file should belong to a user or group, for the primary reason of enforcing file permissions.
A basic but very key concept of protecting a system is the <strong>principle of least privilege</strong>: allow users minimal access needed to get the job done.
For example, your web development team might need access t... | Files always have a owner-id and a group-id. But if the files are copied from another system (e. g. extracted from a tar archive), there may be no name assigned to those ids.
At a later time a new user or group may be created which gets the next available id. This id, however, may be the same id as the one used improp... | https://security.stackexchange.com |
133,091 | [
"https://stats.stackexchange.com/questions/133091",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/230/"
] | These two methods for calculating the p-value should be equivalent:
<pre><code>t.test(rats.drug,mu=1.2)$p.value
2*pt((mean(rats.drug)-1.2)*sqrt(n)/sd(rats.drug),df=n-1)
</code></pre>
The problem with the second method is that there is the risk of getting values bigger than $1$ (in fact up to $2$):
<pre><code>2*pt((1... | You can make use of <code>abs</code> in the numerator (so it's always >0) and keep the <code>lower.tail=FALSE</code>.
| Glen_b is absolutely right about the <code>abs</code>, however, I have found that in certain data sets the values would require <code>-abs</code> to have the desired effect. I'm not able to explain why, but I'll leave these line of code here, incase anyone who is having a similar problem finds this thread.
<pre><code... | https://stats.stackexchange.com |
662,083 | [
"https://physics.stackexchange.com/questions/662083",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/295994/"
] | Suppose you have a spin-1 system. Let us resonantly drive the transition between any 2 levels (say 0 1 transition). How would the the presence of the third level (-1) state affect this transition?
We know that there will be a certain amount of off resonant transition between 0 and -1 states. So can we write a spin ham... | The individual quantities in <span class="math-container">$\frac d {\epsilon A}$</span> can freely vary as long as the overall quantity stays the same. For instance, if you double both the distance and the area, then <span class="math-container">$\frac d {\epsilon A}$</span> remains constant, and thus <span class="mat... | You have the formula in the question: <span class="math-container">$Q=CV$</span> (which holds for any capacitor, not just one with a parallel plate). There is no way to include any additional dependence on the plates' area <span class="math-container">$A$</span>, because once you know <span class="math-container">$C$... | https://physics.stackexchange.com |
4,222,243 | [
"https://math.stackexchange.com/questions/4222243",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/878865/"
] | Consider <span class="math-container">$(a,b) \subseteq \mathbb{R}^{2}$</span> I want to show that this is NOT an open set. I have managed to show it is an open set in <span class="math-container">$\mathbb{R}$</span>.
Attempt:
I need to show that at least one point is not an interior point or alternatively its complemen... | Let <span class="math-container">$A = (a,b) \times \{0\}$</span> as you said. You need to show that some <span class="math-container">$c \in A$</span> is not an interior point, i.e. for some <span class="math-container">$c \in A$</span>, there does not exist <span class="math-container">$r > 0$</span> such that <spa... | Probably, what is confusing you is that strictly speaking <span class="math-container">$(a,b) \nsubseteq \Bbb R^2$</span>. One usually thinks <span class="math-container">$\Bbb R$</span> as a subset of <span class="math-container">$\Bbb R^2$</span> via the inclusion <span class="math-container">$x\mapsto (x,0)$</span>,... | https://math.stackexchange.com |
72,421 | [
"https://dsp.stackexchange.com/questions/72421",
"https://dsp.stackexchange.com",
"https://dsp.stackexchange.com/users/54935/"
] | Is it possible to define the ergodicity of the random signal in an intuitive sense without using any statistical reference?
| Your resulting <code>audioFile</code> in the line <code>audioFile= length(audioFile) / distortionPeriod;</code> is a single number and not a vector signal.
And for this reason your <code>audioFileFft</code> and <code>audioFileDftMat</code> are computed from the processing of that number and not your initial signal vect... | The command <code>fft</code> computes the FFT along each column of its input matrix. If I understand correctly, you want the FFT along the rows. One way to do that is
<code>audioFileFft = fft(audioFile');</code>
The same can be done using the DFT matrix (albeit much less efficient):
<code>audioFileDftMat = dftmtx(disto... | https://dsp.stackexchange.com |
310,279 | [
"https://physics.stackexchange.com/questions/310279",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/45225/"
] | I would like to calculate the integral of a data set defined for all angles (ie $\theta\in[0,\pi]$ and $\phi\in[0,2\pi)$). This data set is power in a given direction (power per unit solid angle) $P(\theta,\phi)$. The data set looks like (no, this question is not about parsing data files):
<pre><code>Theta Phi Power (... | You may wish to compare the squares of the coefficients at $\xi$ in the two lines.
| In the first equation for u(p), we substitute as follows
<blockquote>
<span class="math-container">$\sigma_3=\begin{pmatrix}1&0\\0&-1\end{pmatrix}$</span> and <span class="math-container">$1=\begin{pmatrix}1&0\\0&1\end{pmatrix}$</span>.
</blockquote>
When we substitute so we get the following
<blockquot... | https://physics.stackexchange.com |
8,281 | [
"https://astronomy.stackexchange.com/questions/8281",
"https://astronomy.stackexchange.com",
"https://astronomy.stackexchange.com/users/4041/"
] | Is there a stable polar solar orbit such that the Earth is always in view and not eclipsed by the Sun?
| As ganbustein says, this is not too difficult to imagine. The simplest case (approximating with circular orbits and only the Sun, Earth and Satellite) would have the satellite orbit orthogonally to the Earth with a 1 year orbit. The Satellite will pass the Earth orbit plane in two places, call these "down crossing" a... | I could imagine a polar orbit that is in a plane which rotates to stay orthogonal to the direction of the Earth. The rotation would be very slow and match the revolution rate of the Earth. The satellite path would be similar to how a ball of yarn is wound.
There's nothing too fancy about this (you could do the same ... | https://astronomy.stackexchange.com |
42,313 | [
"https://electronics.stackexchange.com/questions/42313",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/8769/"
] | Why are capacitors use in transistor cicuits? What does it do with biasing operations? I always see capacitors on transistors being used as amplifiers.
| A capacitor blocks DC, so it can be used to pass a signal (e.g. audio, etc) without it's DC level interfering with the DC bias of a transistor. This way the DC offset of the input signal can be at any level and the transistor amplifier will treat it the same way.
For example, if you have one transistor with it's col... | The input and the external capacitors are used to block the dc supply. The emitter bypass capacitor is used to increase the AC gain of the amplifier by shunting the emitter resistance for AC .
We should include the emitter resistance in the circuit because it gives better DC stability. ... | https://electronics.stackexchange.com |
68,275 | [
"https://quant.stackexchange.com/questions/68275",
"https://quant.stackexchange.com",
"https://quant.stackexchange.com/users/59455/"
] | I have just started studying finance and stochastic calculus so apologies if this question is too naive.
I was first introduced to stocks and bonds as risk and riskless investment assets. Then a new idea is introduced, that of a call option. At first sight, this seems like a new independent investment product, and that... | "But at the same time, it has left me confused. If I could achieve such a portfolio using stocks/bonds then why are call options studied separately?"
Good question! The short answer: because it turns out options cannot be synthesized using stocks and bonds only, except in the highly idealized case of Black-Sc... | Yes, conceptually, you can replicate options with stocks and bonds, but why would you when options are readily available?
Put another way, you can replicate a Coke with the right amount of sugar, water, flavorings, etc., but why would you do that when you can just buy a bottle. How easy are those ingredients to get ind... | https://quant.stackexchange.com |
3,413,660 | [
"https://math.stackexchange.com/questions/3413660",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/642063/"
] | I need some help me with a stochastic differential equation that I am stuck on, since my professor loves to not give us any suggested solution.
I got a hint first to calculate the dynamics of the process <span class="math-container">$Y_{}tF_{t}$</span> where <span class="math-container">$$F_t = exp(-\alpha B_t+0.5\al... | Since <span class="math-container">$F_t = \exp(-\alpha B_t + \alpha^2 t / 2)$</span>, we can write <span class="math-container">$F_t = f(t,B_t)$</span>, where <span class="math-container">$f(t,x) = \exp(-\alpha x + \alpha^2 t/2)$</span>. Thus, by Itô's Lemma, <span class="math-container">$$ \mathrm d F_t = \frac 12 \al... | You had done the solution, there isn't any thing left to solve. It seemed wierd since unlike ODE, solution to SDE seldom have explicit form, after integration, you've got an adapted representation for <span class="math-container">$Y_t$</span>, that's engouh.
| https://math.stackexchange.com |
53,415 | [
"https://electronics.stackexchange.com/questions/53415",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/17712/"
] | I'm looking for some advice as to the best way to achieve wireless
video streaming from an OSLess embedded system we are building.
I have never done any work with WiFi before so all the help I can get would
be appreciated.
Since we are looking to stream video we will need a high throughput connection
on both the WiFi... | Not to get it working, but it might be very useful if you care about electro(magnetic?) pollution <em>out of your device</em> into the wider world, especially if you need some sort of approval.
| The ferrite bead in general serves two purposes:
1) EMI filtering to ensure that the VCC coming to your circuit is more filtered, ande perhaps that nothing gets back to the USB port from your circuit
2) As a very simple fuse since the ferrite bead has a current spec. I am not sure whether ferrite beads blow like a no... | https://electronics.stackexchange.com |
177,336 | [
"https://security.stackexchange.com/questions/177336",
"https://security.stackexchange.com",
"https://security.stackexchange.com/users/167861/"
] | Say I have a server running some version of Linux and I give this server an IPv4 address of 10.1.1.1
Now using my network firewall I NAT this IP to some public IP address and I block all incoming traffic to that IP except ports 80 and 443.
Furthermore I have an iptables firewall on the server which also blocks all in... | I completely agree with the general concepts in schroeder's answer. However, I would like to answer with respect to IPv6 specifically.
IPv6 address, when delegated by an ISP, are globally routable. This means that any other host on the IPv6 internet can reach any other IPv6 address, unless there is a firewall in the ... | IPv6 aside, you have asked: "I have an unused protocol enabled and active on my system without any technical controls around it. Does the situation pose a security risk?" The answer is very short: yes.
Is it a "giant hole"? No, but a hole. Is it a risk? Maybe. But the fact that you cannot quantify the risk means that ... | https://security.stackexchange.com |
15,348 | [
"https://mechanics.stackexchange.com/questions/15348",
"https://mechanics.stackexchange.com",
"https://mechanics.stackexchange.com/users/9267/"
] | For instance, if you stop at the red light and you release clutch while still in gear in manual transmission, the car would wobble and die. Of course you can start it up again, but what is the actual damage caused by such mistake?
| While this isn't good for the car (obviously), it will not cause any irreparable damage. It's just a learning thing which you kick yourself in the butt for, but it's not going to cause the car any real harm.
| <blockquote>
what is the actual damage caused by such mistake?
</blockquote>
<strong>tl;dr: Very minor wear on the clutch.</strong>
Assumptions: you're motionless, the engine is idling, the clutch pedal is on the floor and the gear level is selecting the wrong gear (I do this most commonly with third gear rather th... | https://mechanics.stackexchange.com |
6,355 | [
"https://robotics.stackexchange.com/questions/6355",
"https://robotics.stackexchange.com",
"https://robotics.stackexchange.com/users/6818/"
] | Background:
I am new to PID, for my first PID project I am using a simple P-Loop and 300 degree linear potentiometers for position feedback. I am using the roboclaw 2x60A motor controller. The motor controller has 64 speeds between. Sometimes the potentiometers can vary as much as +-4 degrees when not in motion. I a... | Having only the proportional term of the PID regulator will most definitely leave you with oscillations. If you think about it, it's quite similar to a linear harmonic oscillator F=k*x (formula for spring motion). Adding a derivative term should damp out those oscillations. If after waiting for the system to stabilize ... | Update:
After more debugging I have traced the variance in the potentiometer to a shaky ground in the Roboclaw 2x60a motor controller. When I connect the ground to the Roboclaw the potentiometers vary by +-4 through +-6 degrees when the ground is not connected to the Roboclaw the pots vary by +- 1 sometimes rarely +- ... | https://robotics.stackexchange.com |
105,758 | [
"https://mathoverflow.net/questions/105758",
"https://mathoverflow.net",
"https://mathoverflow.net/users/7399/"
] | In working with the classification of stable vector bundles on $\mathbb{P}^2$, I've found that I need to answer a fairly basic question from analysis/point set topology. Here it is.
Suppose $f:\mathbb{Q}\to \mathbb{Q}$ is
<ol>
<li>strictly increasing,</li>
<li>not bounded above or below,</li>
<li>a local homeomorph... | First construct the Cantor set: An uncountable closed set whose complement is a dense open set containing all the rationals. There are a bunch of ways to do this.
Pull back the regular Cantor set along a homeomorphism $\mathbb R\to \mathbb R$ that sends all the rationals to the rationals not in the Cantor set, possibl... | I do not think that properties 1-4 guarantee that the function $f$ is even surjective.
It is well known that every countable dense linear order is isomorphic to $\mathbb{Q}$. Therefore there is an order isomorphism $f:\mathbb{Q}\rightarrow\mathbb{Q}\setminus\{0\}$. In particular, the mapping $f$ satisfies properties 1... | https://mathoverflow.net |
134,716 | [
"https://electronics.stackexchange.com/questions/134716",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/56380/"
] | I am fairly new to and interested in electronic engineering. I want to control a speaker I found in an Xbox 360 headset with my Arduino, but I dont know how. Other small speakers I own all have 2 pins, + and -. But this speaker has 4 pins which are all interconnected. Image of the speaker:
<img src="https://i.stack.im... | It looks like the left hand pair are connected together and ditto the right hand pair: -
<img src="https://i.stack.imgur.com/mQOXU.png" alt="enter image description here">
I've shown red lines where I believe copper exists joining pairs of connections. You should use a meter to confirm this or, with an amplifier outp... | Looks like just a junction PCB- two of the pads will be for your wires and two will have the thin wires going to the voice coil (probably the inner two are the ones you're not supposed to use).
You can see the copper connecting the pads together in pairs (kind of inverted u's).
| https://electronics.stackexchange.com |
111,957 | [
"https://chemistry.stackexchange.com/questions/111957",
"https://chemistry.stackexchange.com",
"https://chemistry.stackexchange.com/users/37364/"
] | I'm in high school chemistry and just learning about buffer solutions. For example, given a buffered solution of <span class="math-container">$\ce{CH3COOH}$</span> and <span class="math-container">$\ce{NaCH3COO}$</span> with <span class="math-container">$K_a = 1.8 \times 10^{-5}$</span>, we might want to find what the ... | <span class="math-container">$$\ce{CH3COOH + H2O <=> H3O+ + CH3COO-}$$</span>
<blockquote>
My question is, which acid (CH3COOH or the conjugate H3O+) will the base KOH react with?
</blockquote>
You have to satisfy two equilibria, the one you wrote and the auto-dissociation of water.
<span class="math-contain... | The hydroxide ion reacts with the hydronium ion (I hate that name; I prefer the simpler "hydrogen ion") to increase the concentration of water and decrease the concentration of hydrogen ion. To restore the equilibrium, now more acetic acid will ionize, shifting the equilibrium to the right as you have it written above.... | https://chemistry.stackexchange.com |
18,780 | [
"https://physics.stackexchange.com/questions/18780",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/5705/"
] | Say I have a planet and shoot something with a given velocity, which is a significant portion of the escape velocity, in a given angle into the sky. It has some initial velocity and there is the force of gravity acting on it.
I simulated something like this before by creating my own Java vector class, and applying the... | If you don't have access to Mathematica, you can use C++ or Java and directly integrate the solution based on Euler's method. Say you have $\frac{dy}{dx}=cos(x) x$ a quick and dirty C++ Euler loop would look like this:
<pre><code>for(int i=0;i<steps;++i){
y[i]=y[i-1] + step_size * (cos(x[i-1]) * x[i-1]);
}
</code>... | In Mathematica you can directly solve the differential equations:
<code>DSolve[{y''[t]==Fy/mass,x''[t]==Fx/mass,y'[0]==vy0,x'[0]==vx0,y[0]==y0,x[0]==x0},{x,y},t]</code>
This is the general format, and you can introduce whatever force you want, even forces which vary with time, or are functions of velocity (i.e. drag)... | https://physics.stackexchange.com |
552,022 | [
"https://electronics.stackexchange.com/questions/552022",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/278690/"
] | Getting hard fault when assigning this 32 bit value to the shown variable(val_32);
<pre><code> uint32_t val_32 = *((uint32_t *)( &buffer[0] + length - 4));
or
uint32_t val_32 = *((uint32_t *)( &buffer[length - 4] ));
</code></pre>
Same thing but tried:
<pre><code> uint32_t val_32 = *((uint32_t *)(buff... | This looks like an <strong>unaligned access</strong>, which causes hard faults on Cortex M0 cores. M3 & M4 cores can handle this with some performance penalties.
Basically, when you try to access a memory location using a uint32_t pointer, the compiler generates a 32 bit word access instruction. This word address m... | Uhmm this seems like a buffer overflow/uninitialized variable issue.
What is the value of length at the fault time? If you didn't initialize it and it's a local variable then it's a random value.
Also assuming length < 4 you would try to access <em>before</em> the buffer, which is illegal.
Another thing, but I don't... | https://electronics.stackexchange.com |
1,128,498 | [
"https://math.stackexchange.com/questions/1128498",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/209045/"
] | Let $S=\mathbb{Z}[\sqrt{2}]$ = {$a+b\sqrt2|a,b\in \mathbb{Z}$} and $R = \mathbb{Q}[\sqrt2]$ = {$\alpha + \beta\sqrt2 | \alpha, \beta \in \mathbb{Q}$}. Consider $x=3+2\sqrt2$ and $y = 3+4\sqrt2$
<ol>
<li>Determine whether x is an invertible element of S. If so, find its inverse.</li>
<li>Determine whether y is an inver... | Your work is right for the first part. For the second part, suppose you have that $(\alpha+\beta\sqrt{2})(3+4\sqrt{2}) = 1$, then
$$(3\alpha+8\beta)+(4\alpha+3\beta)\sqrt{2} = 1.$$
Since $\alpha,\beta\in\Bbb Q$, the only way to get a rational number is if $4\alpha+3\beta = 0$, i.e. $\alpha = -\frac{3}{4}\beta$. Can y... | Rationalize the denominator !.
$x^{-1} = \dfrac{1}{3+2\sqrt{2}} = \cdots=3-2\sqrt{2}$
$y^{-1} = \dfrac{1}{3+4\sqrt{2}} = -\dfrac{3}{23} + \dfrac{4}{23}\sqrt{2}$
| https://math.stackexchange.com |
121,238 | [
"https://security.stackexchange.com/questions/121238",
"https://security.stackexchange.com",
"https://security.stackexchange.com/users/108469/"
] | I’m writing a program. The input is a complex data structure in memory. The output is an HTML report that contains: (1) a representation of the structure; (2) textual annotations that refer to objects in the structure.
In order to link the annotations to parts of the structure, I use the objects’ memory addresses as a... | Purely from a programming point of view, instead of using an objects memory address to link these two pieces of data, you really should be generating an index number and using that to refer between the structure and your annotation.
I can't see any reason why it would be dangerous though to include the addresses in th... | It may be dangerous. If your program manipulates confidential data that doesn't end up in the report, then the memory addresses may reveal information about the confidential data. Exploiting this data is likely to be difficult; the attacker would have to have a good working knowledge of what the program does, and they'... | https://security.stackexchange.com |
2,254,027 | [
"https://math.stackexchange.com/questions/2254027",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/427809/"
] | <strong>If x and y are even then x + y is even.</strong>
<pre><code>Hypothesis : x and y is even
Conclusion : x + y is even
Proof: assume x = 2k
y = 2l
then x + y = 2k + 2l
= 4kl
= 2(2kl)
Therefore x + y is even.
</code></pre>
Just wanted to see if I'm on the right track
| Your solution looks correct to me. Another (somewhat simpler) example is the function
$$ f(x)=x^{-1}\log(x)^{-2}\chi_{(0,\frac{1}{2}]}(x) $$
| I think your example is correct, but way too complicated. There are two things that need to be balanced for integrability on $\mathbb{R}$, that is integrability of singularities and sufficiently fast decay at infinity.
Taking higher powers of your function (as is the case with $L^p$-norms) improves your decay at infi... | https://math.stackexchange.com |
598,250 | [
"https://physics.stackexchange.com/questions/598250",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/273727/"
] | A photon has no mass, but it does have momentum. So, let's say, we cause a photon to constantly reflect back and forth two perfectly reflecting walls.
Since momentum is a vector, it should become zero and hence, the photon would cease to exist (no momentum, no energy.) So... what happens to the photon?
ALSO, I had anot... | The photon reflecting between walls can be compared to any other particle bouncing to and fro between walls: such a particle has a non-zero momentum at any instant, but zero momentum when averaged over time. There is, let's acknowledge, something of a difference because we can regard the photon's state as a simultaneou... | I recommend avoiding "relativistic mass", it's not helpful. Worse: it seems to imply that there is an absolute rest frame so that moving near <span class="math-container">$c$</span> is somehow special because you have diverging mass. (You don't, you're moving near <span class="math-container">$c$</span> right... | https://physics.stackexchange.com |
120,182 | [
"https://security.stackexchange.com/questions/120182",
"https://security.stackexchange.com",
"https://security.stackexchange.com/users/67873/"
] | As I am working on a website that asks customers to enter data such as their name, address, phone number, obviously customer data that needs to be protected.
I do my best to not log such data (although I have two levels of logs: normal and secure, and would use the secure log area for such), I am wondering whether an ... | This is a great question! I'm also a developer on a c++ product that handles high sensitivity data, and we face this dilemma almost every day.
When a production system starts throwing alarms (especially performance or configuration-related ones, thought misbehaving software / bug ones also apply) we often need stack-t... | I've been working as a penetration tester since the late 90's and have seen a lot of applications. It is not uncommon that once in a while an application logs user-identifying data. Most developers declare people having access to the logs as trusted and therefore don't limit the logging.
If this might be an issue depe... | https://security.stackexchange.com |
60,796 | [
"https://mechanics.stackexchange.com/questions/60796",
"https://mechanics.stackexchange.com",
"https://mechanics.stackexchange.com/users/41005/"
] | I recently had a customer come back with the complaint that around 110km/hr the vehicle is very shaky after installing winter tires.
I retorqued all four tires and none of the lugs moved. Air pressure was fine and I examined the tires for balancing weights or marks where a balancing weight may have fallen off. All of... | Since this car is a diesel, there are only 3 things required to make it run - fuel, air, and compression. As the problem is intermittent, it's probably not the compression (though that should be checked anyway). That leaves fuel and air, which must mix at a certain ratio to detonate in the cylinders.
So, you either ha... | I doubt "intake" air is the problem - diesels will run on very wide air/fuel ratios.
Perhaps there was air getting into the fuel system, which can cause improper injection and failure to provide fuel to the cylinders.
Also, the health of the glowplugs should be checked.
I'd start with a fuel pressure gauge on the fu... | https://mechanics.stackexchange.com |
6,817 | [
"https://stats.stackexchange.com/questions/6817",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/3017/"
] | My intuition says that the third equation must be "the length of the gradient squared less than epsilon".
$x_{k+1} = x_k - f(x_k)$<br>
$x_{k+1} = x_k + 1$<br>
$|f(x_k)|^2 < \epsilon$
However, I am not sure whether it is the standard form.
<strong>How would you write the standard form of the gradient method, and... | Interpreting your function $f(x)$ as a (scaled) version of the gradient, your termination rule is equivalent to $|f(x)| < \sqrt{\epsilon}$, <em>i.e.</em> "terminate when you've taken a step that is too small." This seems perfectly reasonable.
| A simplified version of the gradient descent algorithm is as follows:
You begin with $k=0$, $x_k$, $\alpha_k$ and a backtracking parameter $c \in (0,1)$.
The descent direction is given by $p_k = - \nabla f(x_k)$.
Each iterate is computed as follows, $x_{k+1} = x_k + \alpha p_k$.
Remember that $\alpha$ is interprete... | https://stats.stackexchange.com |
56,624 | [
"https://physics.stackexchange.com/questions/56624",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/20263/"
] | $\angle I +\angle E=\angle A+\angle D$
Angle of incidence + angle of emergence = angle of prism (Normally $60^\circ$) + angle of deviation.
If their sum is not equal,we made personal error in doing an experiment with prism. Please make sense of this equation.
| The following diagram shows the prism with the incoming and outgoing light rays.
<img src="https://i.stack.imgur.com/E4rrg.gif" alt="Prism">
If you follow the incident light ray in, it gets bent by an angle $\theta_1 = i- r_1$. If you follow the light ray where it leaves the glass, it gets bent again by an angle $\th... | An<img src="https://i.stack.imgur.com/MrKep.jpg" alt="enter image description here">
Please check this answer it is simpler one and easy to understand
| https://physics.stackexchange.com |
148,614 | [
"https://physics.stackexchange.com/questions/148614",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/-1/"
] | Everytime, I read about blackbody, I always get confused at the point where it is written
<blockquote>
Under <strong>thermal equilibrium conditions</strong> , the blackbody radiation depends only on temperature. ..... . At <strong>equilibrium</strong> , electromagnetic waves bounce around with the walls of the cavit... | The equilibrium mentioned in that quotation is between the radiation field and the walls of the container. The walls of the container are imagined to be held at some fixed temperature by some (unspecified) means. Under those conditions, the spectrum of the radiation in the cavity is that of a blackbody at the temper... | Any physical body has many degrees of freedom, not only mechanical, but also the field degrees of freedom. The energy is distributed amongst these degrees of freedom, so the radiation (as field excitations) is always present in a body. The energy exchange is always <strong>on</strong> and in the equilibrium conditions ... | https://physics.stackexchange.com |
25,494 | [
"https://security.stackexchange.com/questions/25494",
"https://security.stackexchange.com",
"https://security.stackexchange.com/users/15505/"
] | We have many scripts in shared folders in our IT Department. Are malicious scripts in batch files detected by antiviruses?
| It depends what's in it. If it finds <code>del /F /S /Q C:\*</code> inside a Windows batch file, sure, some AVs might flag it up as suspicious. If it's a byte-for-byte copy of a known malicious script, sure, some AVs might catch it.
In general, batch scripts are too variable in order to write a working malicious scrip... | We can't say that it applies to every anti-virus, but for most of them, yes. Naming a specific anti-virus that you use would help us give you a better answer. Batch files shouldn't be the most significant risk on your list so keep a strong anti-virus and firewall up at all times on your network.
| https://security.stackexchange.com |
5,460 | [
"https://security.stackexchange.com/questions/5460",
"https://security.stackexchange.com",
"https://security.stackexchange.com/users/3494/"
] | I work for a virtual organization (we're all remote) that uses a lot of freelancers/subcontractors.
Very often I need to exchange SSH login information with developers working on projects for us. How do I do this securely?
Most of them know nothing about GPG / Public Key encryption, nor how to integrate GPG into thei... | Ask for their SSH public keys, and add those to the <code>authorized_keys</code> lists for the hosts they'll be logging in to. It's safe to disclose public keys so they can be distributed over non-confidential media such as email.
| Good answer by @Graham Lee about SSH public keys specifically. More generally, some observations that I've made in similar situations are that:
<ol>
<li>It starts with setting expectations properly <em>before</em> the work begins. Give people the message that you value following reasonable security best practices, and... | https://security.stackexchange.com |
46,787 | [
"https://mathoverflow.net/questions/46787",
"https://mathoverflow.net",
"https://mathoverflow.net/users/798/"
] | A well known theorem in algebraic topology relates the (co)homology of the Thom space $X^\mu$ of a orientable vector bundle $\mu$ of dimension $n$ over a space $X$ to the (co)homology of $X$ itself: $H_\ast(X^\mu) \cong H_{\ast-n}(X)$ and $H^\ast(X^\mu) \cong H^{\ast-n}(X)$.
This isomorphism can be proven in many ways... | There is a construction for both Thom isomorphisms, homological and cohomological, via classical stable homotopy theory. You find the details in Rudyaks book "On Thom spectra, orientability, and cobordism", chapter V, §1. The Thom class is a map $X^{\mu} \to\Sigma^{n} H \mathbb{Z}$. Moreover, there is a map of spectra ... | Johannes points out that it works quite generally, and perhaps it is useful to see that generality. Pardon me for going back to basics here. There are three ingredients:
<ol>
<li>Given an n-plane bundle $\xi \to B$ we have the Thom diagonal
$T(\xi) \to T(\xi) \wedge B_+ $
induced by the diagonal map $B_+ \to B_+ ... | https://mathoverflow.net |
574,778 | [
"https://electronics.stackexchange.com/questions/574778",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/290679/"
] | I have a small problem with charging my battery pack.
The first problem is that I do not even know if it really is a battery pack. It’s just eight 18650 cells connected in series in order to get +- 33,6V (one cell 4,2V on full charge.)
I’m used to charging one cell with some TP4056 Li-ion cell chargers, but I don’t thi... | Eight cells in series is an 8S battery pack (<strong>8 S</strong>eries) not 9S.
The problem with charging cells in series is balancing them. You need to effectively charge each cell separately to get it to its own individual full capacity, otherwise you end up with cells being over-discharged which kills the cell.
A ba... | Just open it up to see what kind wiring is going on there. Balancing is always required for Li-on / LiPo packs.
| https://electronics.stackexchange.com |
409,309 | [
"https://softwareengineering.stackexchange.com/questions/409309",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/364206/"
] | I am trying to understand processes and their use in software engineering.
Not processes in general but rather creating a process from within a program.<br>
It seems a really powerfull tool and i have a feeling that it is used in some very important areas of software engineering.
Why would someone create a child proce... | There are three broad reasons why we'd like to start another process:
<ul>
<li>for interacting with a different program</li>
<li>as an alternative to multithreading</li>
<li>as a security boundary</li>
</ul>
Programs do not exist in isolation and frequently have to interact with other programs. For example, your soft... | Amon's answer is spot on. To add to it and specifically answer your question about designs requiring multi-process architecture, look to MIMD (multiple instruction, multiple data) parallel processing or distributed memory multi-computers more generally. Because these systems (i.e., massively parallel processors, works... | https://softwareengineering.stackexchange.com |
824,212 | [
"https://math.stackexchange.com/questions/824212",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/65224/"
] | I have to show that $f(x)= x\sin(1/x)$ is continuous everywhere differentiable everywhere where $x\ne 0$.
I can show the continuous property, and how it is not differentiable when $x=0$, but how would I go to prove that it is differentiable for all $x$, such that $x\ne 0$.
Trying to put it into the definition of th... | Let $g(x) = x$, $h(x) = \sin(x)$ and $k(x) = \frac{1}{x}$ defined for all $x \neq 0$. Then what you have is that $f(x) = g(x) \cdot h(k(x))$. In other words, $f$ is created by the product and composition of "nice" functions. So, if you know that $g, h,$ and $k$ are differentiable (when $x \neq 0$) and if you know the p... | do you know that $\sin$, $x$ and $1/x$ are continuously differentiable everywhere (but $0$ in the last case)? if so just use the fact that a composition and a product of $C^1$ functions is $C^1$
edit: to be clear - $C^1$ means continuously differentiable
| https://math.stackexchange.com |
605,227 | [
"https://physics.stackexchange.com/questions/605227",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/204918/"
] | If we immerse a sealed cup of a liquid in a fluid, what density is taken in consideration when it comes to the buoyant force, the density of the cup itself (the substance in contact with the fluid) or the whole cup (with the liquid inside)?
Also, I was reading in a textbook about how buoyant force affects weighing usin... | The issue is that for a no slip condition, the static friction cannot be equal to the component of the weight parallel to the incline.
Setting up Newton's second law (for linear and rotational motion), we have<span class="math-container">$^*$</span>
<span class="math-container">$$mg\sin\theta-f=ma$$</span>
<span class=... | There is a condition for object to be rolling without slipping. As show above by BioPhysicst, the static firctional force <span class="math-container">$f$</span> equals to (adopts the inertial moment for a cylinder of mass <span class="math-container">$M$</span> and radius <span class="math-container">$R$</span> : <spa... | https://physics.stackexchange.com |
13,947 | [
"https://cs.stackexchange.com/questions/13947",
"https://cs.stackexchange.com",
"https://cs.stackexchange.com/users/9844/"
] | I get that R is a set of languages that are decidable by a Turing Machines
And that RE is a set of languages that a each language can be recognized by a TM, that is the machine will halt when given a word from that language and loop otherwise.
But I can't wrap my head around co-RE. Is there a good way to describe it... | The class ${\sf coRE}$ contains all languages whose complement is in ${\sf RE}$. Put differently:
<ul>
<li>A language $L$ is in ${\sf RE}$ if there exists a Turing machine that can check if a requested word $w$ is contained in $L$ for every word $w\in L$. The machine always tells the truth but it may cycle on inputs ... | The definitions are complementary, literally.
<ul>
<li>$\mathsf{RE}$ means that there is an algorithm that can (always) answer "Yes" (correctly) after finite time but maybe not "No".</li>
<li>$\mathsf{coRE}$ means that there is an algorithm that can (always) answer "No" (correctly) after finite time but maybe not "Yes... | https://cs.stackexchange.com |
220,443 | [
"https://dba.stackexchange.com/questions/220443",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/163144/"
] | I got a SQL request that takes more than 4s:
<pre><code>SELECT "Content"."contentId"
FROM "UserFeed"
JOIN "FeedRole" ON "FeedRole"."feedId" = "UserFeed"."feedId"
JOIN "Permission" ON "Permission"."roleId" = "FeedRole"."roleId"
JOIN "TagContent" ON "TagContent"."tagId" = "Permission"."tagId"
JOIN ... | One possible way that might force the plan you want is with this:
<pre><code>WITH T AS (SELECT "Permission"."tagId"
FROM "UserFeed"
JOIN "FeedRole" ON "FeedRole"."feedId" = "UserFeed"."feedId"
JOIN "Permission" ON "Permission"."roleId" = "FeedRole"."roleId"
WHERE "User... | Can you check if "FeedRole"."feedId" is already indexed? It seems that it takes long time to check this table on the first query.
Sometimes materialized views could be the solution to performance problems but it's preferible to solve them with indexes to not add more complexity (if possible).
| https://dba.stackexchange.com |
2,145,438 | [
"https://math.stackexchange.com/questions/2145438",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/406023/"
] | I want to show that $X^n-1 = \prod_{d|n}{\Phi_d}$, and I found this proof on internet:
$X^n-1=\prod_{k=1}^{n}{(X-e^{i\frac{2k\pi}{n}})}=\prod_{d|n}{\prod_{k=1,gcd(k;n)=d}^{n}{(X-e^{i\frac{2k\pi}{n}})}}=\prod_{d|n}{\Phi_{n/d}}=\prod_{d|n}{\Phi_d}$
What I don't understand :
1) How to split the product in a double one... | 1) We can write the set $\{1,\cdots,n\}$ as the disjoint union of the sets $\{k;\,1\le k\le n\,\mathrm{and}\,gcd(k,n)=d\}$ for all $d$ belonging to the set of (positive) divisors of $n$.
2) Yes, the bijection you mention is the main key (another reason lies in the fact that multiplication of integers is a commutative ... | Since the $n$-th roots of unity form a cyclic group,
$$
X^n-1=\prod_{ord(\omega) \mid n}{X-\omega}
=\prod_{d \mid n} \prod_{ord(\omega)=d}{X-\omega}
=\prod_{d \mid n} \Phi_d(X)
$$
where $ord(\omega)$ is the least positive exponent $k$ such that $\omega^k=1$.
| https://math.stackexchange.com |
193,384 | [
"https://softwareengineering.stackexchange.com/questions/193384",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/45618/"
] | I've got a simple authentication solution, where a user can log in with either email or username.
Since I want to show the little feature in the acceptance tests but don't want to pollute them, I thought I'll introduce some randomness. Do you think this is bad or good?
<pre><code>step "Fill in my credentials" do
... | I would avoid randomness in your automated tests. You want all of your automated tests to be predictable. Trying random inputs is certainly not predictable. That way if one of your tests fail, you will be able to more quickly determine why.
Instead, spend some time thinking about cases that might deserve testing and t... | Let's suppose that it works for email, but not name.
Now your acceptance test will fail half the time. Just re-running the test will potentially change the result. That'll make it harder to notice errors and track down the problem with it occurs. It'll be way easier if you just write two tests, one for each login meth... | https://softwareengineering.stackexchange.com |
388,938 | [
"https://electronics.stackexchange.com/questions/388938",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/169794/"
] | What is mean by differential daisy chain UART? And what is the difference between UART and differential daisy chain UART?
While reading datasheet I come across this concept if anybody knows then I would like to know it.
| It most likely means that the output (TX) of one UART is fed to the input (RX) on another one. The benefit is that from the host/microcontroller side you need just one UART to communicate with many slave devices in a chain. This is similar to a daisy chain SPI (for example: like chain of shift registers).
This of cour... | differential is where two wires carry the signal in opposite sense - one goes high when the other goes low and vice versa.
daisy-chain is several devices connect in a directed chain-like structure each connected to it neighbours, see figure 17 on page 32.
But the comm connectors seem to use a biphase code, not NRZ li... | https://electronics.stackexchange.com |
348,534 | [
"https://softwareengineering.stackexchange.com/questions/348534",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/271799/"
] | I recently joined a team of developers that has been working on a software project for several years. I have been asked to create a unit testing test process to improve their output and suggest new test cases and test strategies.
I have been working before as a black box tester with a programming backgrounds; I am not ... | Typically a build machine is meant for build, compile + unit tests. There should be no external dependencies.
Usually, UI automation happens as a post deployment step after the package has been built and deployed to an environment. So, the Selenium scripts should be executed after the code package has been deployed.... | I would deploy the application in a separate test environment that is production "similar" (take a look at Docker or other similar technology ) . Run Gui test, after everything is fine then deploy to QA server for real tester to take a look.
| https://softwareengineering.stackexchange.com |
145,957 | [
"https://mathoverflow.net/questions/145957",
"https://mathoverflow.net",
"https://mathoverflow.net/users/8106/"
] | In short: <strong>If $f$ is continuous on a measure one set, is there a function $g=f$ a.e. such that a.e. point is a point of continuity of $g$?</strong>
Now more carefully, with some notation: Suppose $(X, d_X)$ and $(Y, d_Y)$ are metric spaces, with Borel sets $\mathcal B_X$ and $\mathcal B_Y$, respectively. Let $... | As Jason and Gerald predicted, the answer is <em>yes</em> for Polish $X, Y$. (Indeed, it is sufficient for $X$ to be merely separable and metrizable and for $Y$ to be merely complete and metrizable.)
As Nate observed, we may assume that $D$ is $G_\delta$. Here is the key fact:
<strong>Lemma.</strong> <em>If $D \subse... | <strong>first answer.</strong><br>
As stated ($X, Y$ merely metric spaces), NO.<br>
(Remark: we may as well take $D=Y$ and $f$ the identity on $D$: if we can do that case, then we can apply it to get the general case.)
Let $X=\mathbb R$, let $Y=\mathbb Q$, define $\mu$ a probability measure with positive measure at ... | https://mathoverflow.net |
18,292 | [
"https://mechanics.stackexchange.com/questions/18292",
"https://mechanics.stackexchange.com",
"https://mechanics.stackexchange.com/users/11208/"
] | I* hit a curb and got a small tear in the front passenger side tire. The tear is about 1" long and goes mostly across the surface of the tire but also a little bit, maybe 1/4", toward the inside of the tire. If this is beyond cosmetic and not repairable, I'll of course replace the tire. But these tires only have about ... | The damage you are showing is minor cosmetic damage.
If the following occurs with sidewall damage, then get it replaced:
<ul>
<li>Tire deflation (cannot be legally repaired in most countries)</li>
<li>You pull the flap back and see damage to the side wall plies (corded area under the rubber which supports the tire) w... | If you decide to keep driving on this tire, don't use superglue on that rubber flap. When superglue sets it becomes rigid and brittle. The tire will flex a bit when you drive, and break the glue bond in a short time.
Instead, use the rubber glue from a bike tire puncture repair kit.
| https://mechanics.stackexchange.com |
269,763 | [
"https://math.stackexchange.com/questions/269763",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/45100/"
] | Well, I was not quite aware that addition of points is not defined in metric spaces but is defined only on linear spaces and others.
Could anyone elaborate why is this?
Is the addition of intervals (closed or open) defined?
I am confused as to how addition of points is undefined on metric space but is defined on li... | Simply put: a given metric space needn't have the structure necessary to perform addition.
A vector space (linear space) $V$ comes equipped with all sorts of structure: addition, scalar multiplication, distributivity laws, a distinguished 'zero' (i.e. the origin), etc. These are defined by functions which map back int... | In the definition of a vector space, there is the operation of vector addition where two vectors are added. In the definition of a metric space, there is no addition. Whether the addition of intervals is defined depends on whether we have defined such a thing.
The same set can become different metric spaces if we defi... | https://math.stackexchange.com |
409,191 | [
"https://stats.stackexchange.com/questions/409191",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/248471/"
] | I'm currently assigning a introductory stats class, and I just can't seem to find out when to use the different variance identities. I have provided an example of an assignment where I got it wrong, but I just can't figure out why its wrong.
<strong>Assignment:</strong>
Given two random variables: X ~ N(20,5^2) and Y... | I don't know if this is a lack of rigor in your teacher's wording, or you copied the problem incorrectly, but if it is indeed true that "The random variables X and Y describe the weigh[t] of rocks loaded from two different piles", then your calculation is correct. However, to say "The random variables X and Y describe... | There is a difference, between a sum of random variables, and multiplying a constant to a random variable.
In this case, each rock's weight is a random variable so the problem is a sum of random variables. In this case, is:
Let <span class="math-container">$X_1 ... X_{10}, Y_1 ... Y_{10}$</span> be random variables. ... | https://stats.stackexchange.com |
251,418 | [
"https://softwareengineering.stackexchange.com/questions/251418",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/79557/"
] | I've recently started working on a legacy application that frankly doesn't do all that it should. It's lacking a lot of features, has barely any administration capacities and doesn't check half the data it should.
As such, it's very easy for users to do something stupid and get stuck. <em>"Oops, I added this item of t... | As you're not in a position to change the policy, what you and colleagues need to do is:
<ul>
<li>Document the cost of the policy: the amount of time you spend making fixes in the DB as opposed to developing,</li>
<li>Document the risk of the policy: the number of times a fix in the DB had unexpected consequences and ... | <strong>I've seen the exact same situation,</strong> and what we did was <strong>assigning one person to do only data correction</strong>.
That way clients got their data correction requirements done fast, and the rest of developers, freed up from that burden, could fix the app more quickly.
Once most errors that gen... | https://softwareengineering.stackexchange.com |
1,656,334 | [
"https://math.stackexchange.com/questions/1656334",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/298984/"
] | I am having a course in Algebraic Topology and learning some basic category theory. But I only have a very limited understanding of basic set theory. I have no idea what is ZFC, and stuff like that. Thus, I find it hard to understand some motivation of the category theory.
My question is: does one need to learn some r... | I don't think you really need to go to formal set theory in order to understand category theory. What you need of course is basic understanding of what sets and functions are, nothing more then it is needed to understand algebra and topology (which I assume you know otherwise why taking a course in algebraic topology) ... | Many of the examples and explanations given in most category theory texts are done with the assumption that you are familiar with the language of set theory. So category theory is useful for understanding the presentation of Category theory.
However there is nothing about category theory itself that requires an under... | https://math.stackexchange.com |
172,284 | [
"https://physics.stackexchange.com/questions/172284",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/59062/"
] | Considering this simple circuit :
<img src="https://i.stack.imgur.com/x40IE.jpg" alt="enter image description here">
The potential is supposed to be constant along each wire (because they're conductors), such that the left wire in its entirety is at the same potential as the positive terminal of the battery and the s... | Let me first take a little detour away from this circuit to particle accelerators.
If you have some electrons in vacuum and a potential set up between two points (exactly the same as saying you have an electric field set up) you can accelerate your electrons. If you move a single electron through $1V$ of potential the... | <blockquote>
So what exactly happens to the potential inside the resistor ?
</blockquote>
Unlike the ideal conductors, for which an electric field cannot exist inside, there is an electric field through the resistor body when there is a current through.
And, as you may know, the <em>rate of change</em> in electric ... | https://physics.stackexchange.com |
193,134 | [
"https://softwareengineering.stackexchange.com/questions/193134",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/85655/"
] | I've been reading various techniques for splitting large user stories in helpful ways, such as by user workflow through the system etc. What I'm struggling with is how to word these smaller stories if all they achieve is facilitating the next step in the process and not delivering the application's main benefit to the ... | You have three stories here which have to be done (probably in a sequence) to achieve a goal, being able to query against the entities from a mobile device is a feature which will deliver a business goal, it does not appear to be the business goal itself IMHO.
Here's my suggestion, phrase the business goal that your ep... | The best way then would be to treat it as an epic, and scope in stories in sprints thereafter. My answer uses the same approach (stories as part of an epic).
| https://softwareengineering.stackexchange.com |
647,702 | [
"https://physics.stackexchange.com/questions/647702",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/246555/"
] | In section V.2 of Prof. A. Zee's book <em>Einstein Gravity in a Nutshell</em>, it is given that to get the action of a point particle in a gravitational field from that of the action in SR, one just replaces <span class="math-container">$\eta_{\mu\nu}$</span> with <span class="math-container">$g_{\mu\nu}$</span>. In ot... | I think the argument given by Umaxo is very nice, and it contributes a very helpful piece of understanding. However, it is not a proof that the replacement of <span class="math-container">$\eta_{\mu\nu}$</span> by <span class="math-container">$g_{\mu\nu}$</span> is the only possible thing to do when getting a theory th... | There are two main points
<ol>
<li>The trajectory on which particle moves extremizes the action. This means, that action is invariant under infinitesimal perturbations of the trajectory and not necessarily under finite perturbations.
</li>
<li>the integral <span class="math-container">$\int\sqrt{-g_{\mu\nu}dx^\mu dx^nu... | https://physics.stackexchange.com |
1,929,323 | [
"https://math.stackexchange.com/questions/1929323",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/369475/"
] | For the identity,
$$\dfrac{\cos A}{1 - \tan A} + \dfrac{\sin A}{1 - \cot A}=\sin A + \cos A$$
What I have been able to perform,
$$
\dfrac{\cos A}{\dfrac{\cos A}{\cos A}-\dfrac{\sin A}{\cos A}} + \dfrac{\sin A}{\dfrac{\sin A}{\sin A} - \dfrac{\cos A}{\sin A}}$$
$$
\dfrac{\cos^2 A}{\cos A - \sin A} + \dfrac{\sin^2 A}{... | Hint:
$${c^2\over c-s}+{s^2\over s-c}={s^2-c^2\over s-c}$$
Now factor the numerator. (In other words, what you did was correct, you just have to keep going.)
| Okay, so we want to verify that $$\frac{\cos{A}}{1 - \tan{A}} + \frac{\sin{A}}{1 - \cot{A}} = \sin{A} + \cos{A}.$$
Staring with the left hand side, we have (based on what you've already done):
\begin{split} \frac{\cos{A}}{1 - \tan{A}} + \frac{\sin{A}}{1 - \cot{A}} &= \frac{\cos{A}}{\left(\frac{\cos{A} - \sin{A}}{... | https://math.stackexchange.com |
2,173,524 | [
"https://math.stackexchange.com/questions/2173524",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/379997/"
] | How to simplify ${(1+2i)}^6$ using De Moivre's formula?<br>
I have found that $r=\sqrt 5$ and $\tan x=2$ but I can't find the exact value of $x$.
| Using the binomial formula is better, but is not what OP asked for. Using De Moivre's formula directly would be difficult, although doable if one has knowledge of Chebyshev's polynomials. I pointed this out in my answer, and was downvoted for it. So I have overwritten this answer.
| <strong>Hint</strong> You have that $\tan(\theta) = 2$ and you need $\cos(6\theta)$ and $\sin(6\theta).$ Drawing a triangle in the first quadrant you can see that if $\tan(\theta) = 2$ you have $\cos(\theta) = 1/\sqrt{5}$ and $\sin(\theta) = 2/\sqrt{5}.$ Now can you find $\sin(6\theta)$ and $\cos(6\theta)$?
As others ... | https://math.stackexchange.com |
366,272 | [
"https://physics.stackexchange.com/questions/366272",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/170917/"
] | My book mentions that the three informal gas laws (Boyle's, Charles', and Gay-Lussac's) can be combined into a more general relation PV ∝ mT (the precursor to the Ideal Gas Law).
Where:
P is pressure, V is volume, m is mass (taken as a measure related to quantity of gas molecules), and T is temperature on the absolu... | The relationship for physicists is:
$$PV=NkT,$$
where $N$ is is the number of gas molecules/atoms, and $k$ is Boltzmann's constant. In chemistry they normally convert the $Nk$ to $nR$, where $n$ is measured in moles instead of being a simple count, and $R$ is the universal gas constant.
So, the proportionality from p... | P ∝ m conceptually: for a given volume and temperature, if you increase the mass (get in more particles) the pressure will become higher. Simple, isn't is?
| https://physics.stackexchange.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.