text:
# Efficient Implementation of Boolean Lattice-Esque Operation

Let $$X = \{1,2,\dots n\}$$, and $$Y_i= \{T \in \mathcal{P}(X): |T| \le i\}$$. I am interested in "avoidance sets" $$A \subset Y_n$$. We say a subset $$S \subset X$$ is valid with respect to an avoidance set $$A$$ if $$T \not \subseteq S$$ for all $$T \in A$$.

We let $$f(A)$$ denote the set of $$S\subset X$$ that are valid with $$A$$. It may be helpful to note that $$f(A' \cup A'') = f(A')\cap f(A'')$$.

Given a list of avoidance sets $$A_1,A_2,\dots A_k \in Y_2$$, I want to return an avoidance set $$A' \in Y_2$$ such $$\bigcup_{1 \le i \le k} f(A_i) \subseteq f(A')\tag{1}$$ and for any other $$A'' \in Y_2$$ satisfying (1), we do not have $$f(A'') \subsetneq f(A')$$.

Can this be done in time linear to $$\sum_{1\le i \le k} |A_i|$$? (you may assume that all the sets $$A_i$$ are simplified, i.e. if $$\{a\}\in A_i$$ and $$\{b\}\in A_i$$ then $$\{a,b\} \not \in A_i$$)

Context:

The physical motivation behind my question is that I am trying to "roughly" keep track of events which must be avoided.

An element $$x \in X$$ corresponds to an "event" occurring in a probability space. A subset $$S \subset X$$ correspond to the intersection all the events $$x_1,x_2 \dots x_k \in S$$ occurring at once.

An avoidance set $$A$$ is supposed to express certain events which have probability zero of occurring. (so $$S \subset X$$ is not valid with $$A$$ if the event corresponding to $$S$$ has zero probability) To keep the cost of space low, I have decided to concern myself with only working with avoidance sets in $$Y_2$$. (thus this is a heuristic representation)

Now, let's say I am keeping track of avoidance sets $$A_i$$ where $$S$$ is invalid with $$A_i$$ represents that $$S$$ has probability zero given event $$i$$ happens. Now, if I know at least one of the events $$A_1,\dots A_k$$ occurs, then I am interested in finding $$A'$$.

• Relevant? en.wikipedia.org/wiki/Implicant – D.W. Jul 27 '20 at 16:47
• Interesting, I will try to read more about Karnaugh Maps when I can. Hopefully my context section makes sense? – Zachary Hunter Jul 27 '20 at 18:02
• I think the desired $A'$ is given by $A' = \{T : \forall T' . T \subseteq T' \implies T' \notin \cup_i f(A_i)\}$. I don't know if this helps, as it doesn't describe how to compute $A'$ in linear time. In the special case where $k=2$, I think this becomes $A' = \{T_1 \in A_1 : \exists T_2 \in A_2 . T_2 \subseteq T_1\} \cup \{T_2 \in A_2 : \exists T_1 \in A_1 . T_1 \subseteq T_2\}$, which should be computable in linear time if you're working in $Y_2$. I imagine this could probably be extended to arbitrary $k$, by doing two at a time. Does that look right to you? – D.W. Jul 28 '20 at 9:15

I believe the desired $$A'$$ is given by

$$A' = \{T : \forall T' . T \subseteq T' \implies T' \notin \cup_i f(A_i)\}.$$

Here is how to compute $$A'$$ in linear time from the $$A_i$$'s. Basically, we want to include the set $$T$$ if: (1) for all $$i$$, there exists $$T_i \in A_i$$ such that $$T_i \subseteq T$$ and (2) there exists $$j$$ such that $$T \in A_j$$. You can find those sets as follows:

• For each $$T \in A_1 \cup \cdots \cup A_k$$:
• Set flag := true.
• For each $$i := 1,2, \dots, k$$:
• If $$\not\exists T_i \in A_i$$ such that $$T_i \subseteq T$$, set flag := false.
• If flag := true, output $$T$$.

Naively, this seems likely to take quadratic time or more. However, since you're working in $$Y_2$$, there is a more efficient algorithm. For each $$i$$, build a hashtable (an index) that, given $$T$$, lets you check whether $$T \in A_i$$. Then, you can implement the algorithm above as:

• For each $$T \in A_1 \cup \cdots \cup A_k$$:
• Set flag := true.
• For each $$i := 1,2, \dots, k$$:
• If $$|T|=2$$: suppose $$T=\{u,v\}$$; if $$T \notin A_i$$ and $$\{u\} \notin A_i$$ and $$\{v\} \notin A_i$$, then set flag := false.
• Otherwise if $$|T|=1$$: if $$T \notin A_i$$, then set flag := false.
• If flag := true, output $$T$$.

This can now be implemented in time proportional to $$k \sum_i |A_i|$$. I don't know whether this is efficient enough for you.

I think for this to work corretly in all cases, you might need to first convert each avoidance set $$A_i$$ into canonical form. The canonical form of avoidance set $$A$$ is an avoidance set $$A^*$$ with the smallest number of sets such that $$f(A^*)=f(A)$$. When working in $$Y_2$$ you can compute the canonical form with the following rules:

• Rule 1: If $$\{u,v\} \in A$$ and $$\{u\} \in A$$ or $$\{v\} \in A$$, delete $$\{u,v\}$$ from $$A$$.

• Rule 2: If $$\{x,u\} \in A$$ for each $$x \in \{1,\dots,n\}\setminus\{u\}$$, then add $$\{x\}$$ to $$A$$ and remove all $$\{x,u\}$$ from $$A$$.

You can enforce Rule 1 with a linear scan over $$A$$; and then you can enforce Rule 2 with a simple linear-time graph algorithm (build the undirected graph with an edge for each $$\{u,v\} \in A$$; check the degree of each vertex; apply Rule 2 to each vertex with degree $$n-1$$). So, at least when working in $$Y_2$$, you can convert an avoidance set to canonical form in linear time. I haven't tried to think about a generalization to arbitrary $$Y_i$$.


text:
# zbMATH — the first resource for mathematics

Classical solutions of the periodic Camassa-Holm equation. (English) Zbl 1158.37311
Summary: We study the periodic Cauchy problem for the Camassa-Holm equation and prove that it is locally well-posed in the space of continuously differentiable functions on the circle. The approach we use consists in rewriting the equation and deriving suitable estimates which permit application of o.d.e. techniques in Banach spaces. We also describe results in fractional Sobolev $$H^s$$ spaces and in Appendices provide a direct well-posedness proof for arbitrary real $$s > 3/2$$ based on commutator estimates of Kato and Ponce as well as include a derivation of the equation on the diffeomorphism group of the circle together with related curvature computations.

##### MSC:
 37K65 Hamiltonian systems on groups of diffeomorphisms and on manifolds of mappings and metrics 35B10 Periodic solutions to PDEs 35Q53 KdV equations (Korteweg-de Vries equations) 58B20 Riemannian, Finsler and other geometric structures on infinite-dimensional manifolds
Full Text:

format: plain


text:
# Definition:Historic Measures/Length/Pace

(Redirected from Definition:Pace)

## Definition

The pace is a unit of length.

 $\ds$  $\ds 1$ pace $\ds$ $=$ $\ds 5$ feet $\ds$ $=$ $\ds 60$ inches

## Historical Note

The pace was defined in Roman times as $2$ steps.

Hence it is approximated to about $5$ feet.

This is how the Roman mille passuum is defined, which is literally $1000$ paces.

Hence the origin of the mile.


text:
## bookmark_borderEvaluating very nasty logarithmic integrals: Part II

In this post, we’ll evaluate some more nasty logarithmic integrals. Please read part 1 of this series if you haven’t done so already.

## Integral #3

We’ll start by finding a closed form for the integral: $$I_1 = \int_0^1 \frac{\log^2(1+x^2)}{1+x^2}dx$$ This integral can be reduced to Euler sums like our previous problem. But this time, the resulting Euler sums cannot be evaluated using the method of residues. Therefore, we’ll have to use a different approach.

Let us first consider the following integral: $$I_2 = \int_0^1 \frac{\log^2(1+ix)}{1+x^2}dx$$ Throughout this post, $\log$ denotes the principal branch of the logarithmic function defined by $\log z = \log|z| + i\text{arg}(z)$, with $-\pi < |\text{arg}(z)| \leq \pi$. We have \begin{aligned} I_2 &= \frac{1}{2}\int_0^1\log^2(1+ix)\left(\frac{1}{1+ix}+\frac{1}{1-ix} \right)dx \\ &= \frac{\log^3(1+ix)}{6i}\Big|_0^1 + \frac{1}{2}\int_0^1 \frac{\log^2(1+ix)}{1-ix}dx \\ &= \frac{\log^3(1+i)}{6i} + \frac{i}{2}\int_{\frac{1}{2}}^{\frac{1-i}{2}}\frac{\log^2(2(1-x))}{x}dx \\ &= \frac{\log^3(1+i)}{6i} + \frac{i}{2}\int_{\frac{1}{2}}^{\frac{1-i}{2}}\frac{\log^2(1-x)+\log^2(2)+2\log(2)\log(1-x)}{x}dx \\ &= \frac{\log^3(1+i)}{6i} + \frac{i\log^2(2)\log\left(1-i\right)}{2} + i\log(2) \left[\text{Li}_2\left(\frac{1}{2}\right)-\text{Li}_2\left(\frac{1-i}{2}\right) \right] \\ &\quad + \frac{i}{2}\int_{\frac{1}{2}}^{\frac{1-i}{2}}\frac{\log^2(1-x)}{x}dx \quad \color{blue}{\cdots (1)} \end{aligned} We can use equation (2) from (B) to evaluate $\int_{\frac{1}{2}}^{\frac{1+i}{2}}\frac{\log^2(1-x)}{x}dx$. \begin{aligned} \int_{\frac{1}{2}}^{\frac{1-i}{2}}\frac{\log^2(1-x)}{x}dx &= \log^2\left( \frac{1+i}{2}\right)\log\left(\frac{1-i}{2}\right) + 2\log\left(\frac{1+i}{2} \right)\text{Li}_2\left(\frac{1+i}{2}\right) \\ &\quad -2\text{Li}_3\left(\frac{1+i}{2}\right) + \log^3(2) + 2\log(2)\text{Li}_2\left(\frac{1}{2}\right) + 2\text{Li}_3\left(\frac{1}{2} \right) \quad \color{blue}{\cdots (2)} \end{aligned}

To simplify $\text{Li}_2\left(\frac{1+i}{2} \right)$ and $\text{Li}_2\left(\frac{1-i}{2} \right)$, we can use the following Dilogarithm identity: $$\text{Li}_2(1-z) + \text{Li}_2\left(1-z^{-1} \right) = -\frac{1}{2}\log^2(z)$$ This is easy to verify by differentiating both sides of the above equation with respect to $z$. Plugging in $z=\frac{1+i}{2}$ gives \begin{aligned} \text{Li}_2\left(\frac{1-i}{2}\right) &= -\text{Li}_2(i) - \frac{1}{2}\log^2\left(\frac{1+i}{2}\right) = \frac{5\pi^2}{96}-\frac{\log^2(2)}{8}+i\left(-G + \frac{\pi}{8}\log(2)\right) \\ \text{Li}_2\left(\frac{1+i}{2}\right) &= \overline{\text{Li}_2\left(\frac{1-i}{2}\right)} = \frac{5\pi^2}{96}-\frac{\log^2(2)}{8}-i\left(-G + \frac{\pi}{8}\log(2)\right) \end{aligned}

Now, we have everything needed to simplify equation (1). This is a tedious task so I used Mathematica to do it. The final result is \begin{aligned} I_2 &= -\frac{3\pi^3}{128}- \frac{G \log(2) }{2} + \frac{7\pi \log^2(2)}{32} + i\Bigg( -\frac{ G \pi }{4} + \frac{7\pi^2 \log(2)}{192} + \frac{\log^3(2)}{48}+\frac{7}{8}\zeta(3) \\ &\quad - \text{Li}_3\left(\frac{1+i}{2} \right)\Bigg) \quad \color{blue}{\cdots (3)} \end{aligned} As of now, I am not aware of a closed form expression for $\text{Li}_3\left(\frac{1+i}{2} \right)$. So, we’ll leave it as it is. We can now extract $I_1$ from the real part of $I_2$. \begin{aligned} \text{Re }I_2 &= \int_0^1 \frac{\frac{1}{4}\log^2(1+x^2) - \arctan^2(x)}{1+x^2}dx \\ &= \frac{1}{4}\int_0^1 \frac{\log^2(1+x^2)}{1+x^2}dx - \frac{\arctan^3(x)}{3}\Big|_0^1 \\ &= \frac{1}{4}I_1 - \frac{\pi^3}{192} \end{aligned} Therefore, $$\boxed{I_1 = -2G\log(2) - \frac{7\pi^3}{96} + \frac{7\pi \log^2(2)}{8} + 4\text{ Im }\text{Li}_3\left(\frac{1+i}{2} \right)}\quad \color{blue}{\cdots (4)}$$ Now, let’s turn our attention to another integral: $$I_3 = \int_0^1 \frac{\log(x)\log(1+x^2)}{1+x^2}dx$$ Notice that with the help of some algebra, we can write: $$I_3 = -\frac{1}{2}\int_0^1 \frac{\log^2\left(\frac{x}{1+x^2} \right)}{1+x^2}dx + \frac{1}{2}\int_0^1 \frac{\log^2(1+x^2)}{1+x^2}dx + \frac{1}{2}\int_0^1 \frac{\log^2(x)}{1+x^2}dx$$ The leftmost integral can be dealt with the trigonometric substitution $x=\tan \theta$: \begin{aligned} \int_0^1 \frac{\log^2\left(\frac{x}{1+x^2} \right)}{1+x^2}dx &= \int_0^{\frac{\pi}{4}} \log^2\left(\sin \theta \cos\theta \right) \; d\theta \\ &= \int_0^{\frac{\pi}{4}} \log^2\left(\frac{\sin(2\theta)}{2} \right)\; d\theta \\ &= \frac{1}{2}\int_0^{\frac{\pi}{2}}\log^2\left(\frac{\sin \theta}{2} \right)\; d\theta \\ &= \frac{1}{2}\lim_{s\to 1}\frac{d^2}{ds^2}\int_0^{\frac{\pi}{2}}\left(\frac{\sin\theta}{2} \right)^{s-1}d\theta \\ &= \frac{1}{2}\lim_{s\to 1}\frac{d^2}{ds^2}\left[\frac{2^{-s}\sqrt{\pi}\Gamma\left(\frac{s}{2}\right)}{\Gamma\left(\frac{1+s}{2} \right)} \right] \\ &= \frac{\pi^3}{48}+ \pi \log^2(2) \end{aligned} The middle integral has already been evaluated. As for the rightmost integral, we have: \begin{aligned} \int_0^1 \frac{\log^2(x)}{1+x^2}dx &= \sum_{n=0}^\infty (-1)^{n}\int_0^1 x^{2n}\log^2(x)\; dx \\ &= 2\sum_{n=0}^\infty \frac{(-1)^n}{(2n+1)^3} \\ &= \frac{\pi^3}{16} \end{aligned} This gives us $$\boxed{I_3 =-\frac{\pi^3}{64} -G \log(2) - \frac{\pi \log^2(2)}{16} +2 \text{ Im }\text{Li}_3\left(\frac{1+i}{2}\right)} \quad \color{blue}{\cdots (5)}$$

One can also evaluate $I_4 = \int_0^1\frac{\log(1+x^2)\arctan(x)}{x}dx$ by noting that $$I_4 = \text{Im}\int_0^1 \frac{\log^2(1+ix)}{x}dx = \text{Im}\int_0^{-i}\frac{\log^2(1-x)}{x}dx$$ and using equation (3) from (B).The end result is: $$\boxed{I_4 =-\frac{3\pi^3}{64}+G\log(2)-\frac{\pi \log^2(2)}{16}+2\text{ Im }\text{Li}_3\left(\frac{1+i}{2}\right) } \quad \color{blue}{\cdots (6)}$$ Using $I_3$ and $I_4$, we can evaluate $I_5 = \int_0^1 \frac{\log(x)\arctan(x)}{x(1+x^2)}dx$ as follows: \begin{aligned} I_5 &= \int_0^1 \log(x)\arctan(x)\left(\frac{1}{x}-\frac{x}{1+x^2} \right) dx \\ &= \int_0^1 \frac{\log(x)\arctan(x)}{x}dx - \int_0^1 \frac{x\log(x)\arctan(x)}{1+x^2}dx \\ &= -\frac{1}{2}\int_0^1 \frac{\log^2(x)}{1+x^2}dx + \frac{1}{2} \int_0^1 \frac{\log(x)\log(1+x^2)}{1+x^2} dx + \frac{1}{2}\int_0^1 \frac{\log(1+x^2)\arctan(x)}{x}dx \quad (\text{IBP}) \\ &= -\frac{\pi^3}{32} + \frac{I_3 + I_4}{2} \\ &= -\frac{\pi^3}{16} - \frac{\pi \log^2(2)}{16} + 2\text{ Im }\text{Li}_3\left(\frac{1+i}{2}\right) \end{aligned} On the other hand, we have: \begin{aligned} I_5 &= \int_0^1 \log(x) \left(\sum_{n=0}^\infty (-1)^n \tilde{H}_n x^{2n} \right) dx\\ &= \sum_{n=0}^\infty (-1)^n \tilde{H}_n \int_0^1 x^{2n}\log(x) \; dx \\ &= -\sum_{n=0}^\infty \frac{(-1)^n \tilde{H}_n}{(2n+1)^2} \end{aligned} where $\tilde{H}_n = \sum_{j=0}^n \frac{1}{2j+1}$. This gives us an interesting Euler sum: $$\boxed{\sum_{n=0}^\infty \frac{(-1)^n \tilde{H}_n}{(2n+1)^2} = \frac{\pi^3}{16} + \frac{\pi \log^2(2)}{16} - 2\text{ Im }\text{Li}_3\left(\frac{1+i}{2}\right)}\quad \color{blue}{\cdots (7)}$$ Of course, one can proceed in a similar manner to create more crazy integrals. The following problem is left as an exercise for the reader.

Exercise 1: Using the method of residues, show that $$\sum_{n=0}^\infty \frac{(-1)^n\tilde{H}_n}{2n+1} = \frac{G}{2}+\frac{\pi \log(2)}{8} \quad \color{blue}{\cdots (8)}$$

## Integral #4

Many years ago, I encountered the following integral: $$I_6 = \int_0^1 \frac{x \arctan(x)\log(1-x^2)}{1+x^2}dx$$ At that time, I couldn’t find a solution to this problem. Hence, I ended up asking it on math.stackexchange.com. The answers that I received there involved evaluating complex logarithmic integrals by brute force. Recently, I discovered a much simpler way to solve it using the method of residues.

Let’s start by breaking down $I_6$ into Euler sums. \begin{aligned} I_6 &= \int_0^1 x\log(1-x^2) \left(\sum_{n=0}^\infty (-1)^n \tilde{H}_n x^{2n+1} \right)dx \\ &= \sum_{n=0}^\infty (-1)^n \tilde{H}_n \int_0^1 x^{2n+2}\log(1-x^2) dx \\ &= \sum_{n=0}^\infty (-1)^{n+1} \tilde{H}_n \left(\frac{\psi_0\left(n+\frac{5}{2} \right)+\gamma}{2n+3} \right) \\ &= \sum_{n=0}^\infty (-1)^{n+1}\left(\tilde{H}_{n+1}-\frac{1}{2n+3} \right)\left(\frac{-2\log(2)+2\tilde{H}_{n+1}}{2n+3} \right) \\ &= \sum_{n=0}^\infty (-1)^n \left(\tilde{H}_{n}-\frac{1}{2n+1} \right)\left(\frac{-2\log(2)+2\tilde{H}_{n}}{2n+1} \right) \\ &= -2\log(2)\sum_{n=0}^\infty \frac{(-1)^n \tilde{H}_n}{2n+1}+2G\log(2) + 2\sum_{n=0}^\infty \frac{(-1)^n (\tilde{H}_n)^2}{2n+1} -2\sum_{n=0}^\infty \frac{(-1)^n \tilde{H}_n}{(2n+1)^2} \\ &= G\log(2) - \frac{\pi \log^2(2)}{4} + 2\sum_{n=0}^\infty \frac{(-1)^n (\tilde{H}_n)^2}{2n+1} -2\sum_{n=0}^\infty \frac{(-1)^n \tilde{H}_n}{(2n+1)^2} \quad \color{blue}{\cdots (9)} \end{aligned} The result of exercise 1 was used in the last step.

Now, integrate the function $f(z) = \pi\csc(\pi z) \frac{\left( \gamma + \psi_0 \left(-z+\frac{3}{2} \right)\right)^2}{-2z+1}$ over the positively oriented square, $C_N$, with vertices $\pm \left(N+\frac{1}{4}\right)\pm i\left(N+\frac{1}{4} \right)$. It takes a bit of effort to see that $$\lim_{N\to \infty}\int_{C_N} f(z)\; dz = 0$$ This implies that the sum of residues of $f(z)$ at it’s poles is equal to $0$. We have

\begin{aligned} \mathop{\text{Res}}\limits_{z=-n} f(z) &= (-1)^n \frac{\left(\gamma +\psi_0\left(n+\frac{3}{2}\right) \right)^2}{2n+1} = (-1)^n \frac{\left(-2\log(2)+2\tilde{H}_n \right)^2}{2n+1}, \quad n\in\{0,1,2,\cdots\} \\ \mathop{\text{Res}}\limits_{z=n} f(z) &= (-1)^{n-1} \frac{\left(\gamma+\psi_0\left(-n+\frac{3}{2} \right) \right)^2}{2n-1} = (-1)^{n-1} \frac{\left(-2\log(2)+2\tilde{H}_{n-1} -\frac{2}{2n-1}\right)^2}{2n-1}, \quad n\in\{1,2,3,\cdots\} \\ \mathop{\text{Res}}\limits_{z=\frac{2n+1}{2}} f(z) &= (-1)^{n-1} \frac{\pi H_n}{n} - (-1)^{n-1} \frac{3\pi}{2n^2}, \quad n\in\{1,2,3,\cdots\} \end{aligned}

Summing up the residues and performing some algebraic simplifications gives: \begin{aligned} &\; 8\sum_{n=0}^\infty \frac{(-1)^n (\tilde{H}_n)^2}{2n+1}-8\sum_{n=0}^\infty \frac{(-1)^n \tilde{H}_n}{(2n+1)^2}-16\log(2)\sum_{n=0}^\infty \frac{(-1)^n \tilde{H}_n}{2n+1}+ 4\sum_{n=0}^\infty \frac{(-1)^n}{(2n+1)^3} \\ &\quad + 8\log(2)\sum_{n=0}^\infty \frac{(-1)^n }{(2n+1)^2} + \pi\sum_{n=1}^\infty \frac{(-1)^{n-1}H_n}{n} - \frac{3\pi}{2}\sum_{n=1}^\infty \frac{(-1)^{n-1}}{n^2} = 0 \\ &\implies 8\left(\sum_{n=0}^\infty \frac{(-1)^n (\tilde{H}_n)^2}{2n+1}-\sum_{n=0}^\infty \frac{(-1)^n \tilde{H}_n}{(2n+1)^2} \right) + \frac{\pi^3}{8} + \pi \left(\frac{\pi^2}{12}-\frac{\log^2(2)}{2}\right)-\frac{3\pi}{2}\left(\frac{\pi^2}{12} \right) = 0 \\ &\implies \sum_{n=0}^\infty \frac{(-1)^n (\tilde{H}_n)^2}{2n+1}-\sum_{n=0}^\infty \frac{(-1)^n \tilde{H}_n}{(2n+1)^2} = -\frac{\pi^3}{96}+\frac{\pi \log^2(2)}{16} \quad \color{blue}{\cdots (10)} \end{aligned} In the above calculation, we used the result of exercise 1 and that $$\sum_{n=1}^\infty \frac{(-1)^{n-1}H_n}{n} = \frac{\pi^2}{12}-\frac{\log^2(2)}{2}$$ This follows from (A). Finally, plugging equation (10) into (9), gives $$\boxed{I_6 = -\frac{\pi^3}{48}-\frac{\pi}{8}\log^2 (2) +G\log (2)} \quad \color{blue}{\cdots (11)}$$

## bookmark_borderEvaluating very nasty logarithmic integrals: Part I

In this post, we’ll continue our exploration of logarithmic integrals and Euler sums. We’ll also discuss the contour integration method for evaluating Euler sums. It is recommended that the reader goes through the previous posts, (A) and (B), before reading this post.

## Integral #1

Our first integral is the following: \begin{aligned} I &= \int_0^1 \frac{\log(t)\log(1-t)\log(1+t)}{t}dt \end{aligned} We will use the integral $J = \int_0^1 \frac{\log(t)\log^2(1-t)}{t}dt$ as a starting point. Make the substitution $t\mapsto t^2$ in $J$ to obtain: \begin{aligned} J &= 2\int_0^1 \frac{\log(t^2) \log^2(1-t^2)}{t}dt \\ &= 4\int_0^1 \frac{\log(t)\log^2(1-t)}{t}dt + 4\int_0^1 \frac{\log(t)\log^2(1+t)}{t}dt + 8\int_0^1 \frac{\log(t)\log(1-t) \log(1+t)}{t}dt \\ &= 4J + 4\int_0^1 \frac{\log(t)\log^2(1+t)}{t}dt + 8I \end{aligned}

Solving the above equation for $I$ gives us: $$I = -\frac{3}{8}J - \frac{1}{2} \int_0^1 \frac{\log(t)\log^2(1+t)}{t}dt \quad \color{blue}{\cdots (1)}$$ Applying integration by parts and using the generating function of the Harmonic number yields: \begin{aligned} \int_0^1 \frac{\log(t)\log^2(1+t)}{t}dt &= -\int_0^1 \frac{\log^2(t)\log(1+t)}{1+t}dt \\ &= -\sum_{n=1}^\infty (-1)^{n+1} H_n \int_0^1 t^{n} \log^2(t) \; dt \\ &= -2\sum_{n=1}^\infty (-1)^{n+1} \frac{H_n}{(n+1)^3} \\ &= -2\sum_{n=0}^\infty (-1)^{n+1} \frac{H_{n+1}-\frac{1}{n+1}}{(n+1)^3} \\ &= 2\sum_{n=1}^\infty (-1)^{n+1} \frac{H_n}{n^3} - 2\sum_{n=1}^\infty \frac{(-1)^{n+1}}{n^4} \\ &= 2\text{Li}_4(-1) + 2\sum_{n=1}^\infty (-1)^{n+1} \frac{H_n}{n^3} \quad \color{blue}{\cdots (2)} \end{aligned} A similar calculation shows that: $$J = 2\zeta(4) - 2\sum_{n=1}^\infty \frac{H_n}{n^3} \quad \color{blue}{\cdots (3)}$$ From (A), we know how to evaluate $\sum_{n=1}^\infty (-1)^{n+1} \frac{H_n}{n^3}$ and $\sum_{n=1}^\infty \frac{H_n}{n^3}$. \begin{aligned} \sum_{n=1}^\infty \frac{H_n}{n^3} &= \frac{\pi^4}{72} \\ \sum_{n=1}^\infty (-1)^{n+1}\frac{H_n}{n^3} &= \frac{11\pi^4}{360}+\frac{\pi^2}{12}\log^2(2)-\frac{\log^4(2)}{12}-\frac{7}{4}\log(2)\zeta(3) -2\text{Li}_4\left(\frac{1}{2}\right) \end{aligned} Finally, putting everything together gives us: $$\boxed{I = -\frac{3\pi^4}{160}-\frac{\pi^2}{12}\log^2(2)+\frac{\log^4(2)}{12}+\frac{7}{4}\log(2)\zeta(3) +2\text{Li}_4\left(\frac{1}{2}\right)}$$

## Integral #2

The next integral on our list is $$K = \int_0^1 \frac{\log(x)\log(1+x^2)\arctan(x)}{x}dx$$ This integral was originally posted by the user FDP on math.stackexchange.com. My solution is posted there as well.

Using integration by parts gives us: $$K = - \frac{1}{2}\int_0^1 \frac{\log^2(x)\log(1+x^2)}{1+x^2}dx - \int_0^1 \frac{x \log^2(x) \arctan(x)}{1+x^2}dx$$ Now, we can use the following series expansions to reduce $K$ into Euler sums: \begin{aligned} \frac{\arctan (x)}{1+x^2} &= \sum_{n=0}^\infty (-1)^n \tilde{H}_n x^{2n+1} , \quad |x| < 1\\ \frac{\log(1+x^2)}{1+x^2} &= \sum_{n=1}^\infty (-1)^{n+1} H_n x^{2n} , \quad |x| < 1 \end{aligned} where $\tilde{H}_n = \sum_{i=0}^n \frac{1}{2i+1}$. This gives us: \begin{aligned} K &= -\sum_{n=0}^\infty (-1)^n \tilde{H}_n\int_0^1 x^{2n+2} \log^2(x)\; dx-\frac{1}{2}\sum_{n=1}^\infty (-1)^{n+1} H_n\int_0^1 x^{2n}\log^2(x)\; dx \\ &= -2\sum_{n=0}^\infty \frac{(-1)^n \tilde{H}_n}{(2n+3)^3} - \sum_{n=1}^\infty \frac{(-1)^{n+1} H_n}{(2n+1)^3} \\ &= -2\sum_{n=1}^\infty \frac{(-1)^{n+1} H_{2n}}{(2n+1)^3} \quad \color{blue}{\cdots (4)} \end{aligned} We’ll employ the contour integration method to evaluate the above Euler sum. It is a very powerful tool that can handle a large class of Euler sums (see, for e.g. Euler sums and contour integral representations by Philippe Flajolet and Bruno Salvy).

We’ll integrate the function $f(z) = \pi \csc(\pi z) \frac{\gamma+\psi_0(-2z+1)}{(-2z+1)^3}$ around the positively oriented square, $C_N$, with vertices $\pm \left(N+\frac{1}{4} \right)\pm \left(N+\frac{1}{4} \right)i$. It is easy to see that $$\lim_{N\to \infty}\int_{C_N}f(z)\; dz = 0$$ Hence, the sum of all residues of $f(z)$ at its poles is equal to $0$. A straightforward computation shows that the residues are: \begin{aligned} \mathop{\text{Res}}\limits_{z=-n} f(z) &= (-1)^n \frac{H_{2n}}{(2n+1)^3} , \quad n\in \{0,1,2,\cdots\} \\ \mathop{\text{Res}}\limits_{z=\frac{2n+1}{2}} f(z) &= \frac{(-1)^{n+1} \pi}{16 n^3} , \quad n\in \{1,2,3,\cdots\} \\ \mathop{\text{Res}}\limits_{z=n} f(z) &= \frac{(-1)^{n+1}H_{2n-1}}{(2n-1)^3}- 3\frac{(-1)^{n+1}}{(2n-1)^4}, \quad n\in \{1,2,3,\cdots \}\\ \mathop{\text{Res}}\limits_{z=\frac{1}{2}} f(z) &= \frac{\pi \zeta(3)}{2} \end{aligned} The list of local expansions of basic kernels given on page 6 of the above mentioned paper are quite useful for carrying out these computations. Now, adding up all the residues gives us: \begin{aligned} \frac{\pi \zeta(3)}{2}+\sum_{n=1}^\infty \frac{(-1)^n H_{2n}}{(2n+1)^3} + \frac{\pi}{16}\sum_{n=1}^\infty \frac{(-1)^{n+1}}{n^3} + \sum_{n=1} ^\infty \frac{(-1)^{n+1}H_{2n-1}}{(2n-1)^3} -3\sum_{n=1}^\infty \frac{(-1)^{n+1}}{(2n-1)^4}&= 0\\ \implies \frac{\pi \zeta(3)}{2}+\sum_{n=1}^\infty \frac{(-1)^n H_{2n}}{(2n+1)^3} + \frac{\pi}{16}\left(\frac{3\zeta(3)}{4} \right) + \sum_{n=1}^\infty \frac{(-1)^n H_{2n}}{(2n+1)^3} -2 \sum_{n=1}^\infty \frac{(-1)^{n+1}}{(2n-1)^4} &= 0 \\ \implies -2\sum_{n=1}^\infty \frac{(-1)^{n+1}H_{2n}}{(2n+1)^3} + \frac{35\pi \zeta(3)}{64} -2\beta(4) = 0 \\ \implies \boxed{\sum_{n=1}^\infty \frac{(-1)^{n+1}H_{2n}}{(2n+1)^3} = -\beta(4) + \frac{35\pi \zeta(3)}{128}} \color{blue}{\cdots (5)} \end{aligned} where $\beta(s) = \sum_{n=0}^\infty \frac{(-1)^n}{(2n+1)^s}$ is the Dirichlet beta function. Finally, plugging equation (5) into (4) gives us: $$\boxed{K = 2\beta(4) - \frac{35\pi \zeta(3)}{64}}$$

Following are some more examples of Euler sums that can be evaluated using the contour integration method: \begin{aligned} \sum_{n=0}^\infty\frac{(-1)^n\psi_2(n+1)}{2n+1} &= 8\beta(4)+\frac{\pi^2}{3}G-\frac{7\pi}{2}\zeta(3) \\ \sum_{n=0}^\infty\frac{(-1)^n\psi_1(n+1)}{(2n+1)^2} &= 6\beta(4)+\frac{\pi^2}{4}G-\frac{7\pi}{4}\zeta(3) \\ \sum_{n=1}^\infty \frac{(-1)^{n+1} H_n}{(2n+1)^3} &= -3\beta(4)+\frac{7\pi}{16}\zeta(3)+\frac{\pi^3}{16}\log(2) \end{aligned} where $G=\beta(2)$ denotes the Catalan’s constant. Some integrals that can be evaluated with the above Euler sums are: \begin{aligned} \int_0^1 \frac{\log^2(x)\arctan(x)}{x\left(1-x^2 \right)}dx &=\beta(4)+\frac{7\pi \zeta(3)}{64}+\frac{\pi^3 \log(2)}{32} \\ \int_0^1\frac{\log(x)\arctan(x)\text{arctanh}(x)}{x}dx &= \frac{\pi^2}{16}G-\frac{7\pi\zeta(3)}{32} \\ \int_0^{\frac{\pi}{2}}\frac{x}{\sin x}\log^2\left(\frac{1+\cos x-\sin x}{1+\cos x+\sin x}\right)dx &= \frac{\pi^2}{6}G +4\beta(4) \end{aligned}


text:
# for loop optimization

List<String> flowers = new ArrayList<String>();

My for loop currently looks like this...

for (int i = 0; i < flowers.size(); i++) {
...
}

OR should I change this to look like the code given below

int size = flowers.size();
for (int i = 0; i < size; i++) {
...
}

Which is more performant (assuming I have a large array of flowers), I am guessing it should be the latter.

-
I think the underlying mechanics will probably optimise that for you. –  sje397 May 23 '11 at 6:24
one would hope that the java compiler would make that optimization for you. –  Yaur May 23 '11 at 6:24
If Java didn't make the optimisation, then yes, the latter would be better to avoid calling .size() every time. But Java is quite clever. –  thasc May 23 '11 at 6:27
@sje397, @Yaur: It may or may not be able to optimize that. It depends on the JVM and the code inside the loop. If the code inside changes the size of flowers (and that might be very tricky to check!) then it can't be optimized. –  Joachim Sauer May 23 '11 at 6:27
... and the JVM has to be pessimistic: it needs to prove that no code inside the loop (including any functions called there) can change flowers. This is especially hard in modern languages such as Java) where code can change at runtime, e.g. through loading extra code. –  MSalters May 23 '11 at 8:26

It is better to use for-each loop [more readable]

for (Flower flower :flowers){
//...
}

I have dumped instructions using javap for the following code:

public void forLoop1() {
List<String> lst = new ArrayList<String>();
for (int i = 0; i < lst.size(); i++) {
System.out.println("hi");
}
}

public void forLoop2() {
List<String> lst = new ArrayList<String>();
int size = lst.size();
for (int i = 0; i < size; i++) {
System.out.println("hi");
}
}

public void forLoop1();
Code:
0:   new     #2; //class java/util/ArrayList
3:   dup
4:   invokespecial   #3; //Method java/util/ArrayList."<init>":()V
7:   astore_1
8:   iconst_0
9:   istore_2
12:  invokeinterface #4,  1; //InterfaceMethod java/util/List.size:()I
17:  if_icmpge       34
20:  getstatic       #5; //Field java/lang/System.out:Ljava/io/PrintStream;
23:  ldc     #6; //String hi
25:  invokevirtual   #7; //Method java/io/PrintStream.println:(Ljava/lang/Str
ing;)V
28:  iinc    2, 1
31:  goto    10
34:  return

public void forLoop2();
Code:
0:   new     #2; //class java/util/ArrayList
3:   dup
4:   invokespecial   #3; //Method java/util/ArrayList."<init>":()V
7:   astore_1
9:   invokeinterface #4,  1; //InterfaceMethod java/util/List.size:()I
14:  istore_2
15:  iconst_0
16:  istore_3
19:  if_icmpge       36
22:  getstatic       #5; //Field java/lang/System.out:Ljava/io/PrintStream;
25:  ldc     #6; //String hi
27:  invokevirtual   #7; //Method java/io/PrintStream.println:(Ljava/lang/Str
ing;)V
30:  iinc    3, 1
33:  goto    17
36:  return

It doesn't optimize for me.

java version "1.6.0_22" Java(TM) SE Runtime Environment (build 1.6.0_22-b04) Java HotSpot(TM) Client VM (build 17.1-b03, mixed mode, sharing)

So if you need to choose from mentioned two, go for second, but I personally would go for for-each.

# for-each Performance

From Item 46 in Effective Java by Joshua Bloch :

The for-each loop, introduced in release 1.5, gets rid of the clutter and the opportunity for error by hiding the iterator or index variable completely. The resulting idiom applies equally to collections and arrays:

// The preferred idiom for iterating over collections and arrays
for (Element e : elements) {
doSomething(e);
}

When you see the colon (:), read it as “in.” Thus, the loop above reads as “for each element e in elements.” Note that there is no performance penalty for using the for-each loop, even for arrays. In fact, it may offer a slight performance advantage over an ordinary for loop in some circumstances, as it computes the limit of the array index only once. While you can do this by hand (Item 45), programmers don’t always do so.

-
-1: That wasn't the question, explain which of the constructs that is the best, this is just a comment... –  dacwe May 23 '11 at 6:41
This isn't a good answer. Java's for each loop is twice as slow as the OPs question, and 4 times as slow as optimized loops. –  David Titarenco May 23 '11 at 6:43
+1 It is a good answer because when your over all performance is bad, the last thing you should do is doing that sort of micro-optimization. Performance issues are solved with multithreading and looking at complexity (O-Notation, includes choosing appropriate collection types). A solid +1 for readability. Sometimes it helps not to think about fine tuning. (general statement, Joe may have good reasons for his question) –  Andreas_D May 23 '11 at 7:04
It doesn't optimize for me. -- FYI, javac does very few optimizations. Optimizations like these are done by the JIT compiler. –  aioobe May 23 '11 at 7:32
What a solid answer!!! I am busy with Effective Java. What a awesome read as well. The only additional thing to check is if flowers is null. But it is not applicable to the above example. –  Koekiebox May 24 '11 at 15:42

Sorry to say, but @Jigar's answer is incorrect. This is the correct answer. (tldr; don't use for : each).

import java.util.ArrayList;
import java.util.List;

public class LoopTest {

public static void main(String s[]) {

long start, end;

List<Integer> a =  new ArrayList<Integer>();

for (int i = 0; i < 2500000; i++) {
}

///// TESTING FOR : EACH LOOP

start = System.currentTimeMillis();

for (Integer j : a) {
int x = j + 3;
}

end = System.currentTimeMillis();

System.out.println(end - start
+ " milli seconds for [ Integer j : a ] ");

////// TESTING DEFAULT LOOP

start = System.currentTimeMillis();
for (int i = 0; i < a.size(); i++) {
int x = a.get(i) + 3;
}

end = System.currentTimeMillis();

System.out.println(end - start
+ " milli seconds for [ int i = 0; i < a.length; i++ ] ");

////// TESTING SLIGHTLY OPTIMIZED LOOP

start = System.currentTimeMillis();
int size = a.size();
for (int i = 0; i < size; i++) {
int x = a.get(i) + 3;
}

end = System.currentTimeMillis();

System.out.println(end - start
+ " milli seconds for [ int i = 0; i < size; i++ ] ");

//// TESTING MORE OPTIMIZED LOOP

start = System.currentTimeMillis();
for (int i = size; --i >= 0;) {
int x = a.get(i) + 3;
}

end = System.currentTimeMillis();

System.out.println(end - start
+ " milli seconds for [ int i = size; --i >= 0; ] ");

}

}

The results:

96 milli seconds for [ Integer j : a ]
57 milli seconds for [ int i = 0; i < a.length; i++ ]
31 milli seconds for [ int i = 0; i < size; i++ ]
31 milli seconds for [ int i = size; --i >= 0; ]

You can make up your own mind, but too much attribution is given to the JVM optimizer. You still have to be smart with your own code, and using for : each notation is NOT a good idea (almost ever). As you can see, you have a good idea by putting size in its own variable.

Even though some of these optimization may be JVM-dependent (and some may kick in with the JIT), it's important to know what Java does and what Java doesn't do.

-
u r right for : each is always been slow and call to frequent .size() is some what slow than assign to one varialble –  Ravi Parekh May 23 '11 at 7:00
Try running your 'benchmark' with LinkedList. –  user802421 Jul 23 '11 at 2:50
Saying "that using for-each notation is NOT a good idea (almost ever)" is pretty silly. In the absolute majority of the cases, you are going to prefer readability over performance. In the few cases where your loop is a performance bottelneck, it might be worth it to investigate whether there is a more performant option. –  Alderath Apr 5 '12 at 8:47
I think the problem with your for each sample code is with auto boxing and unboxing. –  Raze Apr 11 '12 at 8:03
When I ran with LinkedList it has thrown me OutOfMemoryError... –  KrishPrabakar Jun 2 '12 at 13:35

The JVM can't optimize it because size() is a method, and JVM can't (and won't try to) determine that the size() will always return the same value in this context. Provided size() value doesn't change, the second one is slightly more performant, but the gain is so, so slight that you don't really have to even consider using it.

-

If performance is critical, use the plain counter loop, however for 98% of cases, clarity and simplicity of code is far more important (like 1000x or more) and you should use a for-each loop.

@David points out that using a counter is faster, but I would point out that even for 10,000 entries, the difference is sub-microsecond.

If you have a collection of more than 10,000 entries it is highly likely you shouldn't be brute force iterating over every possibility. It is more likely a collection with a lookup like a Map is a better solution for whatever you have in mind. If you have far less than 10,000 entries performance is less likely to be important.

-

From the Java language specification (14.14.1):

The basic for statement executes some initialization code, then executes an Expression, a Statement, and some update code repeatedly until the value of the Expression is false.

The Expression is i < flowers.size() in your first example and it is evaluated once in every iteration. In your special case it shouldn't make a noteable difference, because flowers.getSize() on ArrayList is a very short method. But, in general, if the result of the expression is the same for each iteration and expensive, then do a pre calculation.

Consequence: this has to produce the same output in every implementation of a Java virtual machine and proves, that Expression is evaluate once in each iteration:

int counter2 = 10;
for (int counter1 = 0; counter1 < counter2; counter1++) {
System.out.println(counter1 + ", " + counter2);
counter2--;
}

Output:

0, 10
1, 9
2, 8
3, 7
4, 6

-

The behavior is different if the array list changes while iterating. But I guess you don't do that. According to my test, the latter is usually faster (specially on systems like Android). I would write it as follows:

for (int i = 0, size = flowers.size(); i < size; i++) {
...
}

-

The best option is

[ int i = 0; i < size; i++ ]

Your results will vary based on which JVM and other setting like -client vs -server because some of the measurements are so tiny you need to use nano seconds to measure, and you need to do many tests otherwise you end up with the GC messing with the results. Also these kinds of tests have a habit of the JVM optimizing the loop to nothing. I tried to eliminate that risk by putting the variable that it modifies at the end of the code to the screen.

1.6
-server
7.968242071 milli seconds for [ Integer j : a ]
7.206275775999999 milli seconds for [ int i = 0; i < a.length; i++ ]
1.5864E-5 milli seconds for [ int i = 0; i < size; i++ ]
14.774186076999998 milli seconds for [ int i = size; --i >= 0; ]

-client
83.36101683999999 milli seconds for [ Integer j : a ]
44.288568631 milli seconds for [ int i = 0; i < a.length; i++ ]
2.3191E-5 milli seconds for [ int i = 0; i < size; i++ ]
24.826621246 milli seconds for [ int i = size; --i >= 0; ]

1.7

-server
7.029150422 milli seconds for [ Integer j : a ]
6.6269827779999995 milli seconds for [ int i = 0; i < a.length; i++ ]
1.3852E-5 milli seconds for [ int i = 0; i < size; i++ ]
13.842110377 milli seconds for [ int i = size; --i >= 0; ]
13.868426141 milli seconds for [ int i = a.size()-1; i >= 0; i-- ]
1.6618000000000003E-5 milli seconds for [ int i = 0; i < a.size(); i++ ]

-client
7.382479727 milli seconds for [ Integer j : a ]
6.748068759 milli seconds for [ int i = 0; i < a.length; i++ ]
1.4162999999999998E-5 milli seconds for [ int i = 0; i < size; i++ ]
13.951547335999999 milli seconds for [ int i = size; --i >= 0; ]
13.929234053999998 milli seconds for [ int i = a.size()-1; i >= 0; i-- ]
1.6873E-5 milli seconds for [ int i = 0; i < a.size(); i++ ]

Test code:

public static void main(String s[]) {
long start=0, end = 0, delta = 0;
//int[] a = new int[2500000];
List<Integer> a = new ArrayList<Integer>();
int x = 0;

for (int i = 0; i < 2500000; i++) {
}

start=0; end = 0; delta = 0;
for (int ctr = 0; ctr < 1000; ctr++) {
start = System.nanoTime();
for (Integer j : a) {
x = j + 3;
}
end = System.nanoTime();
delta += end - start;
}
System.out.println(Math.pow(10, -6) * delta / 1000 + " milli seconds for [ Integer j : a ] ");

start=0; end = 0; delta = 0;
for (int ctr = 0; ctr < 1000; ctr++) {
start = System.nanoTime();
for (int i = 0; i < a.size(); i++) {
x = a.get(i) + 3;
}
end = System.nanoTime();
delta += end - start;
}
System.out.println(Math.pow(10, -6) * delta / 1000 + " milli seconds for [ int i = 0; i < a.length; i++ ]  ");

int size = a.size();

start=0; end = 0; delta = 0;
for (int ctr = 0; ctr < 1000; ctr++) {
start = System.currentTimeMillis();

for (int i = 0; i < size; i++) {
x = a.get(i) + 3;
}
end = System.currentTimeMillis();
delta += end - start;
}
System.out.println(Math.pow(10, -6) * delta / 1000 + " milli seconds for [ int i = 0; i < size; i++ ] ");

start=0; end = 0; delta = 0;
for (int ctr = 0; ctr < 1000; ctr++) {
start = System.nanoTime();
for (int i = size; --i >= 0;) {
x = a.get(i) + 3;
}
end = System.nanoTime();
delta += end - start;
}
System.out.println(Math.pow(10, -6) * delta / 1000 + " milli seconds for [ int i = size; --i >= 0; ] ");

start=0; end = 0; delta = 0;
for (int ctr = 0; ctr < 1000; ctr++) {
start = System.nanoTime();
for (int i = a.size()-1; i >= 0; i--) {
x = a.get(i) + 3;
}
end = System.nanoTime();
delta += end - start;
}
System.out.println(Math.pow(10, -6) * delta / 1000 + " milli seconds for [ int i = a.size()-1; i >= 0; i-- ] ");

start=0; end = 0; delta = 0;
for (int ctr = 0; ctr < 1000; ctr++) {
start = System.currentTimeMillis();

for (int i = 0; i < a.size(); i++) {
x = a.get(i) + 3;
}
end = System.currentTimeMillis();
delta += end - start;
}
System.out.println(Math.pow(10, -6) * delta / 1000 + " milli seconds for [ int i = 0; i < a.size(); i++ ] ");

System.out.println(x);
}

-
Nice data collection. But some issues: 1. Don't switch timers used! (They return different units so the values reported are incorrect!) 2. Update for consistent result and formatting so all numbers are using the same base 3. Run entire set of tests multiple times within same process to check for anomalies. Also "fastest" is not necessarily "best" ;-) –  user166390 Jan 27 '12 at 19:46

This is just a clarification by example of how situational this is.

I tested executions of the "normal" for loop for (int i = 0; i < list.size(); i++) and a microoptimized for loop for (int i = -1, size = list.size(); ++i < size;). I ran the tests both in eclipse from the command line and noticed a HUGE difference.

Results from running in eclipse:

Time for Original: 32552 ms   Time for MicroOptimized 32707 ms
Fastest Loop: Original
Slowest loop takes 0.47616121897272057% more time

Results from running from commandline:

Time for Original: 274489 ms   Time for MicroOptimized 30516 ms
Fastest Loop: MicroOptimized
Slowest loop takes 799.4920697339101% more time

So in eclipse, the two for loops take the same time, but when run from the command line, the original version takes 800% more time than the microoptimized version. The magnitude of the difference blows my mind. I guess that eclipse uses a different JVM which applies some smart optimization tricks.

This doesn't mean that you should start using the microoptimized version however. In almost all cases, the lists you iterate over will likely be so small that the performance difference is negligible. And the readability gained from using the standard version which everyone will recognize and understand much more quickly is more beneficial than a non-noticable performance increase.

For completeness, this is the code I ran:

public static void main(String[] args) {
List<Byte> list = initializeList();
byte value = 0;
final int NUM_LOOPS = 100;

long startOriginal, startOptimized, endOriginal, endOptimized;

startOptimized = System.currentTimeMillis();
for (int j = 0; j < NUM_LOOPS; j++) {
for (int i = -1, size = list.size(); ++i < size;) {
value = list.get(i);
}
}
endOptimized = System.currentTimeMillis();

startOriginal = System.currentTimeMillis();
for (int j = 0; j < NUM_LOOPS; j++) {
for (int i = 0; i < list.size(); i++) {
value = list.get(i);
}
}
endOriginal = System.currentTimeMillis();

System.out.println(value);
printResults(startOriginal, endOriginal, startOptimized, endOptimized);
}

private static void printResults(long startOriginal, long endOriginal,
long startOptimized, long endOptimized) {

long timeOriginal = endOriginal - startOriginal;
long timeOptimized = endOptimized - startOptimized;

long diff = Math.abs(timeOriginal - timeOptimized);
long min = Math.min(timeOriginal, timeOptimized);

System.out.println("Time for Original: " + timeOriginal + " ms"
+ "   Time for MicroOptimized " + timeOptimized + " ms");

System.out.println("Fastest Loop: "
+ ((timeOriginal < timeOptimized) ? "Original"
: "MicroOptimized"));

System.out.println("Slowest loop takes " + ((double) 100 * diff / min)
+ "% more time");
}

public static List<Byte> initializeList(){
List<Byte> list = new ArrayList<Byte>();
final Byte ONE = new Byte((byte) 1);

for (int i = 0; i < Integer.MAX_VALUE / 10; i++) {
}

return list;
}

}

-

go for the first one only as both are same, but creating one more redundent int variable in second code snippet.

So go for the first code snippet

for (int i = 0; i < flowers.size(); i++) {
...
}

-
They are not both the same. The second one should always be preferred. >_< craziness going on in this question. –  David Titarenco May 23 '11 at 7:04

Either one will do. Depending on JVM, the second may be a few clock-cycles faster, but it will be an immeasurable or insignificant difference. Beware of these types of sub-optimizations. Unless you are building a real-time system, where every CPU tick counts, they just add complexity and more sources for errors.

I would suggest using the iterator construct (as has already been suggested)

For (Flower flower: flowers) { ...

It's clear, flexible and predicatble.

-

My approach is bit different on this problem. For me, it really doesn't matter which method you choose. the reason is the "performance improvement" you will get in the best optimized method will be ~50ms for 2,500,000 iteration!! (as per @David's post). And obviously this improvement is not something like you would like to waste your valuable time in finding optimized solution.

(But still, as per OP's original question, I would also like to suggest the last approach.)

I know the answer is bit weird and un-common, but this is the reality.

-

To avoid all this numbering and iterators and checkings in writing the code use the following simple most readable code that has its performance to maximum. Why this has maximum performance (details are coming up)

for (Object object : aCollection) {
// Do something here
}

If the index is needed then: To choose between the above two forms: The second is the better because you're using a local variable for checking up. When the method is exited the variable is gone to the trash ou of the stack.

-

When the compiler compiles the first loop and sees that the length of the list isn't modified inside the loop, it optimizes the loop and makes it like the second one.

If you turn off compiler's optimization, you'll see the second loop is faster.

-


text:
# Current flow with batteries in series vs parallel

Taking let's say three ideal and identical batteries, why does the current flow increase when we add them in series compared to them being in parallel?

I can understand the height analogy for voltage but what would be a similar analogy for current which also explains the above question?

My question is based on this video.

• While voltage can correspond to a height difference, current (charges per second) can correspond to water flow (cubic metre per second). The battery can then be considered a pump that moves water up (increases voltage) – Steeven Oct 23 '17 at 22:43

Using the height analogy, tripling the height of the water reservoir means that you will also get 3 times the pressure in the pipe. That increased pressure then increases the flow through the pipe.

Mathematically, for electrical circuits, we use Ohm's law: $I=V/R$

That means that the current increases when we increase the voltage. If we triple the voltage, and everything else stays the same, then the current will also triple.

If you put the batteries in parallel, the total voltage remains the same. This is the same as connecting 3 identical reservoirs to a pipe: you are not increasing the pressure. However, the parallel batteries (or reservoirs) will be able to supply more current (3 times, in the case of ideal batteries) when you reduce the resistance (make the pipe larger)

• The current won't be larger, since the voltage is the same. What will triple is the total charge released before the battery is drained. – Mark H Oct 23 '17 at 23:14
• Note that I said "when you reduce the resistance" – hdhondt Oct 24 '17 at 1:21

Intuitively, a parallel circuit requires the current to split in as many flows as branches, because the current must pass through all branches at almost the same time. The current arrives to a bifurcation in which it splits.

However, a series one doesn't need to split, the current is the same for all elements, because it goes in order, first through first element, and then all that current for the second one, and so on.

I can understand the height analogy for voltage but what would be a similar analogy for current which also explains the above question?

I'll try a different approach.

Assume you have a resistor of resistance $1\, \Omega$ connected across an ideal cell that maintains $1\, \mathrm{V}$ across its terminals.

The voltage across the resistor is thus $1\, \mathrm{V}$ and so, the current through the resistor is, by Ohm's law, $1\, \mathrm{A}$.

Now, replace the $1\,\mathrm{V}$ cell with a $3\,\mathrm{V}$ cell.

The voltage across the resistor is thus $3\, \mathrm{V}$ and so, the current through the resistor is, by Ohm's law, $3\, \mathrm{A}$.

Assuming you have no problem with the above, take the next step and replace the $3\,\mathrm{V}$ cell with a $3\,\mathrm{V}$ battery consisting of three $1\,\mathrm{V}$ cells in series.

Since the voltage across the resistor is still $3\, \mathrm{V}$, the current through the resistor is still $3\, \mathrm{A}$.

So you see, the current increases when you place cells in series for the same reason the current increases when you use a cell with a larger voltage - the larger voltage across the same resistance produces a larger current.

• Thanks but I was searching more for an intuitive analogy since I know Ohm's law already. – philmcole Oct 25 '17 at 20:15
• @philmcole, you're welcome but the point of this answer isn't Ohm's law, it's that one 3V source and (3) 1V sources (in series) are indistinguishable. Perhaps you don't fully appreciate this point now but maybe later you will. Cheers. – Alfred Centauri Oct 26 '17 at 0:35


text:
##### Use the inscribed polygon method and determine ___ for the compound below.
Use the inscribed polygon method and determine ___  for the compound below.a. number of electrons contained in the bonding $$\mathrm{M.O.s}$$b. number of electrons contained in the antibonding $$\mathrm{M} . \mathrm{O.S}$$c. number of electrons in the nonbonding \(\mathrm{M} . \mathrm{O} ....
##### Please show work 5. The formula for the hexacyanoferrate (II) ion is Fe(CN), Write the formulas...
please show work 5. The formula for the hexacyanoferrate (II) ion is Fe(CN), Write the formulas for and name the compounds formed from the hexacyanoferrate (II) ion and cations from elements having Z numbers of 3, 31, and 38. 6. Write the correct formulas and balance the equations: A. Gallium plus ...
Hahn Company uses a job-order costing system. Its plantwide predetermined overhead rate uses direct labor-hours as the allocation base. The company pays its direct laborers $12.00 per hour. During the year, the company started and completed only two jobs—Job Alpha, which used 65,100 direct lab... 1 answer ##### ALL YEAR. Chapter 8 Handout Dr. Griffin purchased a dentist's drill at a cost of$40,000....
ALL YEAR. Chapter 8 Handout Dr. Griffin purchased a dentist's drill at a cost of $40,000. The drill has an estimated life of four years and an estimated salvage value of$4000. The drill, which is expected to last 3600 hours, was operated 1200 hours in year 1: 800 hours in year 2: 1000 hours in ...


text:
# Relation And Function Questions And Answers

The inverse of y=2^x is y=log_2 x This is how to do it. y 3x 2 for each relation below (put your answer on the same graph). The optimal growth rate for a fledgling enterprise is a function of many interdependent factors. • Look at the command words in the question. the policy statements developed by the firm Q2. Sql Server Interview Questions and Answers (1772) - Page 1 Latest and authentic Interview questions. Math MCQs quiz, multiple choice questions and answers (pdf) for grade 6, 7, 8 for solved math MCQs learning to attempt practice math quizzes. Thanks for contributing an answer to TeX - LaTeX Stack Exchange! Please be sure to answer the question. Consequently, if x is in the domain x ≥ 3, then the value of f is in the range f(x) ≥ 0. This activity contains 16 questions. NET Interview questions and answers. Provide details and share your research! But avoid … Asking for help, clarification, or responding to other answers. You can find answers of these MCQs at the end of each question. I'm certain that this is a very naive question, but I am just beginning to look more deeply at neural networks, having only used decision tree approaches in the past. PD5 Exam Exemplar Questions Mar2013 Page 3 of 10 other interested stakeholders. SHORT ANSWER. SETS RELATION AND FUNCTION on JEE Mains Mathematics Practice Question Papers MCQ Pattern with Solution (Download pdf free) Subtopic (1) Sets, (2) Venn diagrams, (3) Relations, (4) Functions, (5) Domain of a function, (6) Co-domain and range of a function, (7) Modulus, identical, and signum function, (8) Greatest integer and fractional part function, (9) Exponential and logarithmic functions. A function is created. All Sheets are with Answer Keys. 3: Rational Functions MATH 1330 Precalculus 229 Recall from Section 1. Solve graphically using the 2nd trace-intersect function on your calculator or by algebra using logarithms. A) There is a linear relationship between the independent and dependent variables. These MCQs are helpful for those who are looking for MCQs related to Basics of Marketing & Marketing Management. Mock Interviews. Relations Expressed as Mappings Express the following relations as a mapping, state the domain and range, then determine if is. For now, functions will take one or more real numbers as an input, and return a numerical output. y=2x2-3x+1 2. Justify Your Answers. This can be interpreted a rape. An example for such a relation might be a function. office administrator job interview questions and answers. R = {(x, Y) ?. And the questions are 1. CHAPTER-RELATION AND FUNCTION (1 mark question) CHAPTER – TRIGONOMETRY AND FUNCTIONS (1 Mark Questions) 1. The employer may ask a job applicant whether he or she can perform particular job functions. Research and thorough preparation can increase your probability of making it to the next step in any Hadoop job interview. Qualitative questions fall under this category. Questions are an important part of the scientific process and, over the years, hundres of people have sent their questions to us. Understand both why the correct answer is correct and why the other answers are wrong. Identifying Domain/Range of relations/functions Independent/Dependent Variables Is the relation a function or not? Vertical Line Test Function Notation: function tables; evaluating functions for specific values of x; given the output of a function, solve for x (input) Coordinate Plane 1) Label the x-axis and y-axis. 33 First, ﬁnd h(a). Give three examples. BAI) and personality trait (e. Your questions can indicate that you want to know a little more about the job you applied for. A function is a relationship between two sets of numbers. Welcome to McDougal Littell's Test Practice site. Typical examples are functions from integers to integers or from the real numbers to real numbers. All WhatsApp messages are well organized in 57 categories so that you can easily find WhatsApp messages for every day, every mood, every moment, every occasion. Relationships include parent/child, sibling/sibling, friendship, dating, marriage, and lots of others. D) the level of income. GCSE (1 – 9) Compound and Inverse Functions Name: _____ Instructions • Use black ink or ball-point pen. Statement 1: The goal of machine learning is to get a function from the given data Statement. Bio 270 Practice Population Growth Questions 1 Population Growth Questions Answer Key 1. That’s all for Spring Framework interview questions. CHAPTER-RELATION AND FUNCTION (1 mark question) CHAPTER – TRIGONOMETRY AND FUNCTIONS (1 Mark Questions) 1. Try to work the problem ﬁrst without looking at the answer. Welcome! This is one of over 2,200 courses on OCW. AD4 Exam Exemplar Questions Mar2013 Page 3 of 8 To conclude, strategic sourcing is more likely to adopt the profiling of different suppliers and for added value solutions to be sought by the organisations in the supply chain. Answer Guide: Answer should show you problem solving skills in a positive light and promote your analytical skill level. So this brings us to the end of the SQL interview questions blog. Definition of relation, pictorial diagrams, domain, co-domain and range of a relation. Making statements based on opinion; back them up with references or personal experience. Find helpful Biology questions and answers on Chegg. how activities are coordinated & controlled b. The thing to do is to divide numerator and denominator by x 2. Its negation is represented by 6∈, e. These MCQs & answers can help to both students and teachers to understand concepts of organization behaviour deeply. Why questions for kids can be very useful. Which State did not send deputies to the Constitutional Convention?. Research and thorough preparation can increase your probability of making it to the next step in any Hadoop job interview. Question #5: What carbohydrates are the best to include in my eating pattern? Answer: Some of the best carbohydrate sources for good health include fruits and vegetables, especially nonstarchy vegetables like lettuce, broccoli, tomatoes, and spinach. If you have difficulties answering a question, review the definition(s) and theorem(s) related to the question. The questions includes 1 mark questions, 2 mark questions, 3 mark questions, 4 mark questions, 5 mark questions and other questions as per the latest CBSE curriculum for the current session. Answer three questions. Binary operation multiple choice questions and answers (MCQs), binary operation quiz answers pdf to learn college math online courses. GUIDANCE DOCUMENT. Practice Questions and Answers from Lesson III-2: Perfect Competition Practice Questions and Answers from Lesson III-2: Perfect Competition. In this series, we'll look at some common interview questions and what you should consider when formulating your responses. It's important to be informed about your products, your company's policy on. Test your knowledge with ten supply and demand practice questions that come from previously administered GRE Economics tests. DEFINITION A function from set A to set B is the set of ordered pairs (x, y) such that every. Each one has model problems worked out step by step, practice problems, as well as challenge questions at the sheets end. Consider, for example. The first chapter of CBSE Class 12 deals with the notion of relations and functions, domain, co-domain and range which have already been introduced in class 11 syllabus along with various types of specific real valued functions and their respective graphs. • Discuss the origins of and changes within the public relations field over time and what is expected of contemporary practitioners • Identify the core values, theories, principles that guide the practice of public relations • Describe the steps and processes involved in executing the management function. Selecting a qualified health care professional to participate in the workplace safety and health activities can be a vital step in this process. It uses English keywords frequently, whereas other languages use punctuation, and it has fewer syntactical constructions than other languages. The path to finding answers to your research questions constitutes research methodology. In fact, normally when Zeus commits a crime it is mortals who suffer and are punished. A) There is a linear relationship between the independent and dependent variables. These questions cover four common bases from classics, team leadership, examples and role play as well as customer service – know-how and competency. Set, Relations and Functions – Solved Examples Download IIT JEE Solved Examples on Set, Relations and Functions To read more, Buy study materials of Set Relations and Functions comprising study notes, revision notes, video lectures, previous year solved questions etc. Don't just look at the questions, think through and practice your answers. Here’s list of Questions & Answers on Database Management System with 100+ topics: 1. If there is only one y value for an x value it is a function. Question 1 Next Generation Advanced Algebra and Functions Practice Test for the ACCUPLACER ® test Which answer provides the solution to this system of equations and describes the relationship between the lines?. It is both a relation and a function. This is a functional relationship. You will be expected to appropriately analyze this information and provide reasonable, sound advice. Find human resources surveys and sample HR questions and build surveys that better inform your team. Don't show me this again. A function is created. SAP ABAP Multiple Choice Questions and Answers pdf mcqs free SAP ABAP Multiple Choice Questions and Answers pdf In relation to an internal table as a formal. Function Concepts/WS Intro to Relations and Functions Part 2 – Different Representations. One hypothesis for the. Were there any restrictions as to the number of deputies a State might send? A. Relations and functions are two different words having different meaning mathematically. And the questions are 1. Find the solution of all exercises and questions in chapter 2 of NCERT Class 11 Maths book. $$4\cdot 5-3$$ And then we calculate the answer. 1: What the First Derivative Says About a Function : In Module 10 we saw that the value of the derivative of a function at x is given by the slope of the line tangent to the graph of f at x. Thanks for contributing an answer to TeX - LaTeX Stack Exchange! Please be sure to answer the question. Cartesian product of the set of reals with itself (upto R x R x R). One approach to why-questions is to try to make the question-answer relationship formal in that case, too, or at least as formal as possible. Listed below are some of the most common, and most interesting, questions visitors to our site have asked. D) the level of income. 07/01/2019 People that are interviewed for office administrator jobs need to create an impression of themselves as being reliable and highly professional in the way they conduct themselves. Printable in convenient PDF format. About this video Set relation and function objective question and answer 11th class in hindi. This article lists top ADO. About this video Set relation and function objective question and answer 11th class in hindi. Feel free to download and enjoy these free worksheets on functions and relations. y=-3x4+x3-2x+1 I would like to know the explainations. 1 Questions then arise out of a perceived knowledge deficit within a subject area or field of study. Decide whether the relation is a function. The Open Response is more time-consuming, but again it is important to provide students with questions that require them to provide reasoning in a written format. A primary responsibility of a customer service representative is answering customer questions and solving problems. Explain why purchasing is regarded as a very important management function in many organizations. • Solution A is 30% acid by volume. Here is one such worksheet that other busy teacher have found useful. Thus the answer is A For question 5, from before the y values of (x,y) belong the range. Make a table of values to find ordered pairs that satisfy the equation. The point x=a determines a relative minimum for function f if f is continuous at x=a, and the first derivative f' is negative (-) for xa. Let T be the set of all triangles in a plane with R a relation in T given by R = {(T 1,T 2):T 1 ≅ T 2) show that R is an equivalence relation. Functions and limits MCQs, hyperbolic functions quiz questions and answers for online college degrees. Cartesian product of the set of reals with itself (upto R x R x R). Multiple Choice Questions on functions in C++ language with answers. In trying to find a formula for some mathematical sequence, a common intermediate step is to find the nth term, not as a function of n, but in terms of earlier terms of the sequence. The following questions practice these skills: Identify total cost, variable cost, fixed cost, marginal cost, and average total cost. Finding a balance between remaining objective and advocating for your clients is vital. If the applicant has a disability known to the employer, the employer may ask how he or she can perform job functions that the employer considers difficult or impossible to perform because of the disability, and whether an accommodation would be needed. In this method the teacher controls the situation. These functions are central to an understanding of exponential growth (used to model populations and compound interest) as well as radioactive decay and other physical processes. We offer professional help with questions in a variety of economics topics you may find confusing or difficult to comprehend. PD5 Exam Exemplar Questions Mar2013 Page 3 of 10 other interested stakeholders. This post covers MCQs on Marketing Management, Basics of Marketing & Principles of Marketing. 3 Classifying the types of relations 3 2. Here is a Sample of an Open Response Question on Functions. ribosomes produce enzymes that could be stored in lysosomes. It includes six examples of determining whether a relation is a function, using the vertical line test and by looking for repeated x values. A set of questions on the concepts of a function, in calculus, are presented along with their solutions. I recently saw the following questions on a survey about organizational management, and decided to answer them from my open organization point of view. But Zeus is difficult to punish. The basic answer is that NORA (non-obvious relationship awareness) is the process of collecting large quantities of a variety of information and then combining it to create profiles of individuals. We can also represent a relation as a mapping diagram or a graph. Solved examples with detailed answer description, explanation are given and it would be easy to understand. Exercise set with 9 questions on identifying domain & range of a variety of functions (answers included) EXS_2-1-40v1_SLHL_function_basics Set of 7 exercises (neary all with multiple parts) covering function basics such as: identifying domain & range, composite functions, inverse functions, vertex form of a quadratic function (completing the. Accelerated Algebra II. This function gives me the answer when I input a number. 2018 The objective of these interview questions is to give you an overview of some of the typical interview questions you can expect during your interview and to help you prepare and get into the right frame of mind. Find the solution of all exercises and questions in chapter 2 of NCERT Class 11 Maths book. B) level of income. Each job interview includes common interview questions - questions about you, your experience, your education, and your training. You need to attach your question or provide a link to let our experts work on the problem and find the best possible answer. Managing Human Resources, 7e (Gómez-Mejía / Balkin / Cardy) Chapter 1 Meeting Present and Emerging Strategic Human Resource Challenges. One hypothesis for the. What are the key. A set can be represented by listing its elements between braces: A = {1,2,3,4,5}. Finally, discuss the intergovernmental tensions that emerge within states between the state, county, and municipal levels of government, and what can be done to shift from competition to cooperation. When you work with limit and continuity problems in calculus, there are a couple of formal definitions you need to know about. The doctor also pays close attention to the color of the optic nerve because some other diseases of the optic nerve can cause enlarged cups but also cause the nerve to look pale (multiple sclerosis, brain tumors, strokes to the nerve or brain, etc. • Discuss the origins of and changes within the public relations field over time and what is expected of contemporary practitioners • Identify the core values, theories, principles that guide the practice of public relations • Describe the steps and processes involved in executing the management function. The inverse of y=2^x is y=log_2 x This is how to do it. Functions and limits MCQs, hyperbolic functions quiz questions and answers for online college degrees. Economists are careful to consider all of the costs of making a choice. In more advanced classes you'll learn about far more complex functions! However, a simple function might return the input plus one. Discrete Mathematics - Relations - Whenever sets are being discussed, the relationship between the elements of the sets is the next thing that comes up. A set of questions on the concepts of a function, in calculus, are presented along with their solutions. 7 ways to improve communication in a relationship with advanced listening skills. In this article we have asked our panel of experts for the top customer service interview questions. Whatever is inside the parentheses of a function gets substituted for x in the given expression for the function. Émile Durkheim Questions and Answers - Discover the eNotes. Justify Your Answers. DBMS Interview Questions. R = {(x, Y) ?. About C Programming Aptitude Questions and Answers. Answers to Text Questions and Problems in Chapter 8 Answers to Review Questions 1. The following questions practice these skills: Identify price taking and perfect competition. If a function is even or odd, then half of the function can be. One of the relationships that exists between ribosomes and lysosomes is that a. • Solution A is 30% acid by volume. A: The function f assigns to each element of the domain exactly one element of the range. ESMA will review these questions and answers on a regular basis to identify if, in a certain area, there is a need to convert some of the material into ESMA guidelines. Qualitative questions fall under this category. Try the multiple choice questions below to test your knowledge of this chapter. Functions were originally the idealization of how a varying quantity depends on another quantity. Multiple Choice Questions on Protein Function the relationship between the. • Discuss the origins of and changes within the public relations field over time and what is expected of contemporary practitioners • Identify the core values, theories, principles that guide the practice of public relations • Describe the steps and processes involved in executing the management function. The subset is derived by describing a relationship between the first element and the second element of the ordered pairs in A × B. Foundations of Mathematics and Pre-Calculus 10 Page 5 Sample Questions for Relations and Functions PART B: NUMERIC-RESPONSE QUESTIONS 11. Questions are expected in the various sections of the question paper corresponding to (i) Very Short Answer Type (VSA) Questions: 1 Mark, (ii) Short Answer Type (SA) Questions: 2 Marks, (iii) Long Answer Type I (LA-I) Questions: 4 Marks, and. The subset is derived by describing a relationship between the first element and the second element of the ordered pairs in A × B. The Function Table Worksheets & In and Out Boxes Worksheets are randomly created and will never repeat so you have an endless supply of quality Function Table Worksheets & In and Out Boxes Worksheets to use in the classroom or at home. • Solution A is 30% acid by volume. Open: questions used to promote discussion or student interaction. The female reproductive system is designed to carry out several functions. Algebra Worksheets Pre-Algebra, Algebra 1, and Algebra 2 Worksheets. The digestive system, also known as "systema digestorium", or the gastrointestinal system, is composed of the digestive tract organs plus the digestive adnexal glands. Relations IV VI II III About This Test The Government/Political Science test is designed for prospective teachers of government or political science in secondary schools. Range of Relations Step-by-step Lesson- You are given a relation that is graphed for you and are asked to find the range. Logic Problems In the Court of Law III You live on an island where there are only two kinds of people: the ones who always tell the truth (truth tellers) and those who always lie (liars). Functions)Worksheet) Domain)Range)and)Function)Notation) 1. The symbol ∈ is used to express that an element is (or belongs to) a set, for instance 3 ∈ A. You may like to read some of the things you can do with lines:. Media reporting has a natural tendency to cover areas experiencing escalations in gang violence, sometimes directly or inadvertently creating the illusion that the upsurge is widespread and perpetual. Suitable for both SAP C_TSCM52_66 & SAP C_TSCM52_67. Sample Questions to Answer: 1. There are various ways to answer this. As another example, any subset of the identity relation on X has equivalence classes that are the singletons of X. What does this test contain? Non-verbal - Twelve Inductive/Logical Reasoning questions GOOD LUCK!. SHORT ANSWER. A function is a set of mathematical operations performed on one or more inputs (variables) that results in an output. What's On This Page This page contains sample problems on linear functions. The following 【Quiz】 and 【Official Answer】are the. Mathematics MCQs for JEE(Main) - Sets Relations and Functions MCQ with Answer Keys. The following questions practice these skills: Identify price taking and perfect competition. For question 4, for a relation to be a function each input needs a unique output. Functions And Function Notation (grade 11) Section 1. org, where students, teachers and math enthusiasts can ask and answer any math question. So in a relation, you have a set of numbers that you can kind of view as the. Answers to Selected Review Questions. C) the stock of wealth. You can find answers of these MCQs at the end of each question. Tell wheth. 1/3 pairs were randomly assigned to the experimental treatment group. Try to work the problem ﬁrst without looking at the answer. GATE Computer science and IT. Attend any 4 questions. Understanding that the idea to store their information in note cards or Google documents is a bit old-fashioned, they are wondering, what is CRM, how it works and how it can help their businesses. This is a pretty tricky question to answer and the answer may be dependent upon the job you are applying for. Success in answering interview questions lies in preparation, in anticipating the questions and preparing answers accordingly. These are 1 of 16 "Relation Puzzle" questions answers of "Blood Relations" Verbal Reasoning with explanation for various competitive examination and entrance test. Guidance for Industry: Questions and Answers for Guidance to Facilitate the Implementation of a HACCP System in Seafood Processing January 1999. Why Logical Reasoning Cause and Effect? In this section you can learn and practice Logical Reasoning Questions based on "Cause and Effect" and improve your skills in order to face the interview, competitive examination and various entrance test (CAT, GATE, GRE, MAT, Bank Exam, Railway Exam etc. Giovanna has a bank certificate that pays 2. ribosomes produce lipids that could be stored in lysosomes. (see previous question "Where can I get information about a specific dietary supplement?"). AP Calculus BC Exam, and they serve as examples of the types of questions that appear on the exam. For theoretical purposes, it may be convenient to separate the function of management but practically these functions are overlapping in nature i. org Read latest news about Emerging Technologies, like, 3D Printing , NanoTechnology, Robotics and Gene Editing. MSCRM Interview Questions and Answers N relationship between 'TestCustomEntity1' and 'TestCustomEntity2'. Employers want to hire experienced workers who will continue to learn and grow to the benefit of their company. Start your questions with how, what, when, where. The ratio between the surface area and volume of cells influences their structure and biology. Range of Relations Step-by-step Lesson- You are given a relation that is graphed for you and are asked to find the range. We have given marketing multiple choice questions with answers. subset of A x B. #Find#the#domain# ####a. Q: What is the itinerary requirement for agents performing the function of an employer?. You can find answers of these MCQs at the end of each question. -95 pairs of fraternal twins included in the program. Data Science is a blend of various tools, algorithms, and machine learning principles with the goal to discover hidden patterns from the raw data. Give the equations for each. Consequently, if x is in the domain x ≥ 3, then the value of f is in the range f(x) ≥ 0. Of the extensive number and types of questions that can be asked, I will cover 21 Questions and Answers that I regard to be the most commonly asked. b) Find the velocity and acceleration at t = 2 for the above function. Exams, Essays and Short Answer Questions Merton's Strain Theory of Deviance Research Methods in Sociology - An Introduction The Marxist Perspective on Education Social. You need to attach your question or provide a link to let our experts work on the problem and find the best possible answer. Radian measure of 40 020 ' is : (a) 540 121. Examples of Some Key Language Functions (Page 1). Questions and answers - MCQ with explanation on Computer Science subjects like System Architecture, Introduction to Management, Math For Computer Science, DBMS, C Programming, System Analysis and Design, Data Structure and Algorithm Analysis, OOP and Java, Client Server Application Development, Data Communication and Computer Networks, OS, MIS, Software Engineering, AI, Web Technology and many. € f(x)= x−4 x−2 #####b. Math explained in easy language, plus puzzles, games, quizzes, worksheets and a forum. The following questions and answers respond to the concerns most commonly raised by police departments. By preparing answers for these common interview questions, you can develop compelling talking points to make a great impression during your next job interview. BAI) and personality trait (e. What kinds of structural changes accompany bond-breaking and bond-forming in olefin polymerization? Answer: The olefin monomers are flat (two-dimensional) molecules with sp 2-hybridized carbon atoms. In our case we have x2 2x= (x 2) x; x2 4 = (x 2) (x+ 2. Answer Key – Questions from the Unit Circle. Under Part 432, you have the option of demotion or removal and you do not have to defend your reasoning for choosing either action. Identifying Functions Concept 21: Identifying Functions Assessment (Level 4 Example Level 3 Example Level 2 Example Identify the domain and range. Which countries are the biggest users of the Internet? Social media? Mobile? a. Offer questions like, “How well does your team work with clients?” and, “How well do the members of your department communicate with each other?” to better understand individual and team dynamics, and how they affect performance in multiple situations. Answers of the logical & aptitude questions are provided for the reference at the bottom of this article. As answers to such questions will be inherently descriptive, it is important that you recount or characterise in narrative form. Relations IV VI II III About This Test The Government/Political Science test is designed for prospective teachers of government or political science in secondary schools. Be sure to comment at the end if you have a question I haven't answered yet or want to contribute more to an answer! General Questions. Functions/Graphs Past Papers Unit 1 Outcome 2 Written Questions Part Marks Level Calc. com offer the best practice material that covers all important questions so that students will not miss any. No matter what value of "x", f(x) is always equal to some constant value. You can determine if a function is a relation by looking at each group of ordered pairs. Relations and Functions carry a total of 4-6 marks in the CBSE Class XII Board Examination. All three requirements for the existence of a limit. BAI) and personality trait (e. If you know some more questions that should be part of the list, make sure to add a comment for it and I will include it. Which of the following public sector banks has the largest number of branches in foreign countries?. One hypothesis for the. Each question is followed by the targeted learning objective(s) from the curriculum framework. This article discusses 57 common interview questions, answers and examples. Marginal utility is the addition to total utility from consuming one more unit. You may want to mention what type of role you tend to adopt in a team, especially if you want to emphasize key skills such as leadership. Answer Guide: Answer should show how you are able to work under stress and how you don’t crack under pressure. It is not a relation, but it is a function. Provide details and share your research! But avoid … Asking for help, clarification, or responding to other answers. I hope these questions will help you in coming Java EE interview. Radian measure of 40 020 ' is : (a) 540 121. Choose values for x and find the corresponding values for y. This can sometimes save time in graphing rational functions. Build My Resume 6 Public Relations Interview Questions & Answers. This is the best website for all types of latest Hindi WhatsApp messages. Guided Lesson - It is all about determining if a relation is a function or vice versa. I heard and read a lot of times the following statements and got a lot of confusion over time. What Is Discrete Mathematics Functions? Answer : A Function assigns to each element of a set, exactly one element of a related set. All WhatsApp messages are well organized in 57 categories so that you can easily find WhatsApp messages for every day, every mood, every moment, every occasion. Answer: In the regenerative cycle, feedwater is passed through a series of feed-water heaters and is heated by steam extracted from stages of a steam turbine. Using open questions. How can I recognize whether the relationship between the variables is quadratic? What equation models a quadratic function given in a table, graph, or problem context? How can I answer questions about the problem situation by studying a table, graph, or equation representing a quadratic function? 8-5 Butterflies, Pinwheels and Wallpaper. What is the period of the sine curve? That is, what is th. Different types of relations. In such cases, the procedures foreseen under Article 16 of the ESMA Regulation will be followed. These notes are made by highly professional teachers. Distinguish between exponential and logistic population growth. Examples of Some Key Language Functions (Page 1). Computer Science MCQs or Chapter-wise Computer Science Multiple Choice Questions and Answers. Interest in a particular topic usually begins the research process, but it is the familiarity with the subject that helps define an appropriate research question for a study. almost impossible to measure. The question asks to find the domain and range of the function by using interval notation. Experience-related questions in job interviews may include: What are your qualifications? Based on your experience, what problems do team-focused companies face? When answering experience. Logic Problems In the Court of Law III You live on an island where there are only two kinds of people: the ones who always tell the truth (truth tellers) and those who always lie (liars). There include 20 multiple choice questions followed by four possible answers. Chapter 13. • Solution A is 30% acid by volume. National Science Teachers Association) Following is a list of question types you can use to analyze your questioning strategies and develop a variety of questions to help students think. Concentrate on what he or she is saying – don’t allow yourself to become distracted. The questions cover a wide range of concepts related to functions such as definition, domain, range , evaluation , composition and transformations of the graphs of functions. Answer Guide: Answer should show how you are able to work under stress and how you don’t crack under pressure.


text:
# 2020 AMC 10B Problems/Problem 21

The following problem is from both the 2020 AMC 10B #21 and 2020 AMC 12B #18, so both problems redirect to this page.

## Problem

In square $ABCD$, points $E$ and $H$ lie on $\overline{AB}$ and $\overline{DA}$, respectively, so that $AE=AH.$ Points $F$ and $G$ lie on $\overline{BC}$ and $\overline{CD}$, respectively, and points $I$ and $J$ lie on $\overline{EH}$ so that $\overline{FI} \perp \overline{EH}$ and $\overline{GJ} \perp \overline{EH}$. See the figure below. Triangle $AEH$, quadrilateral $BFIE$, quadrilateral $DHJG$, and pentagon $FCGJI$ each has area $1.$ What is $FI^2$? $[asy] real x=2sqrt(2); real y=2sqrt(16-8sqrt(2))-4+2sqrt(2); real z=2sqrt(8-4sqrt(2)); pair A, B, C, D, E, F, G, H, I, J; A = (0,0); B = (4,0); C = (4,4); D = (0,4); E = (x,0); F = (4,y); G = (y,4); H = (0,x); I = F + z * dir(225); J = G + z * dir(225); draw(A--B--C--D--A); draw(H--E); draw(J--G^^F--I); draw(rightanglemark(G, J, I), linewidth(.5)); draw(rightanglemark(F, I, E), linewidth(.5)); dot("A", A, S); dot("B", B, S); dot("C", C, dir(90)); dot("D", D, dir(90)); dot("E", E, S); dot("F", F, dir(0)); dot("G", G, N); dot("H", H, W); dot("I", I, SW); dot("J", J, SW); [/asy]$ $\textbf{(A) } \frac{7}{3} \qquad \textbf{(B) } 8-4\sqrt2 \qquad \textbf{(C) } 1+\sqrt2 \qquad \textbf{(D) } \frac{7}{4}\sqrt2 \qquad \textbf{(E) } 2\sqrt2$

## Solution

Since the total area is $4$, the side length of square $ABCD$ is $2$. We see that since triangle $HAE$ is a right isosceles triangle with area 1, we can determine sides $HA$ and $AE$ both to be $\sqrt{2}$. Now, consider extending $FB$ and $IE$ until they intersect. Let the point of intersection be $K$. We note that $EBK$ is also a right isosceles triangle with side $2-\sqrt{2}$ and find it's area to be $3-2\sqrt{2}$. Now, we notice that $FIK$ is also a right isosceles triangle and find it's area to be $\frac{1}{2}$$FI^2$. This is also equal to $1+3-2\sqrt{2}$ or $4-2\sqrt{2}$. Since we are looking for $FI^2$, we want two times this. That gives $\boxed{\textbf{(B)}\ 8-4\sqrt{2}}$.~TLiu

## Solution 2

Since this is a geometry problem involving sides, and we know that $HE$ is $2$, we can use our ruler and find the ratio between $FI$ and $HE$. Measuring(on the booklet), we get that $HE$ is about $1.8$ inches and $FI$ is about $1.4$ inches. Thus, we can then multiply the length of $HE$ by the ratio of $\frac{1.4}{1.8},$ of which we then get $FI= \frac{14}{9}.$ We take the square of that and get $\frac{196}{81},$ and the closest answer to that is $\boxed{\textbf{(B)}\ 8-4\sqrt{2}}$. ~Celloboy (Note that this is just a strategy I happened to use that worked. Do not press your luck with this strategy, for it was a lucky guess)

## Solution 3

Draw the auxiliary line $AC$. Denote by $M$ the point it intersects with $HE$, and by $N$ the point it intersects with $GF$. Last, denote by $x$ the segment $FN$, and by $y$ the segment $FI$. We will find two equations for $x$ and $y$, and then solve for $y^2$.

Since the overall area of $ABCD$ is $4 \;\; \Longrightarrow \;\; AB=2$, and $AC=2\sqrt{2}$. In addition, the area of $\bigtriangleup AME = \frac{1}{2} \;\; \Longrightarrow \;\; AM=1$.

The two equations for $x$ and $y$ are then:

$\bullet$ Length of $AC$: $1+y+x = 2\sqrt{2} \;\; \Longrightarrow \;\; x = (2\sqrt{2}-1) - y$

$\bullet$ Area of CMIF: $\frac{1}{2}x^2+xy = \frac{1}{2} \;\; \Longrightarrow \;\; x(x+2y)=1$.

Substituting the first into the second, yields $\left[\left(2\sqrt{2}-1\right)-y\right]\cdot \left[\left(2\sqrt{2}-1\right)+y\right]=1$

Solving for $y^2$ gives $\boxed{\textbf{(B)}\ 8-4\sqrt{2}}$ ~DrB

## Solution 4

Plot a point $F'$ such that $F'I$ and $AB$ are parallel and extend line $FB$ to point $B'$ such that $FIB'F'$ forms a square. Extend line $AE$ to meet line $F'B'$ and point $E'$ is the intersection of the two. The area of this square is equivalent to $FI^2$. We see that the area of square $ABCD$ is $4$, meaning each side is of length 2. The area of the pentagon $EIFF'E'$ is $2$. Length $AE=\sqrt{2}$, thus $EB=2-\sqrt{2}$. Triangle $EB'E'$ is isosceles, and the area of this triangle is $\frac{1}{2}(4-2\sqrt{2})(2-\sqrt{2})=6-4\sqrt{2}$. Adding these two areas, we get $$2+6-4\sqrt{2}=8-4\sqrt{2}\rightarrow \boxed{\mathrm{(B)}}$$. --OGBooger

## Solution 5 (HARD Calculation)

We can easily observe that the area of square $ABCD$ is 4 and its side length is 2 since all four regions that build up the square has area 1. Extend $FI$ and let the intersection with $AB$ be $K$. Connect $AC$, and let the intersection of $AC$ and $HE$ be $L$. Notice that since the area of triangle $AEH$ is 1 and $AE=AH$ , $AE=AH=\sqrt{2}$, therefore $BE=HD=2-\sqrt{2}$. Let $CG=CF=m$, then $BF=DG=2-m$. Also notice that $KB=2-m$, thus $KE=KB-BE=2-m-(2-\sqrt{2})=\sqrt{2}-m$. Now use the condition that the area of quadrilateral $BFIE$ is 1, we can set up the following equation: $\frac{1}{2}(2-m)^2-\frac{1}{4}(\sqrt{2}-m)^2=1$ We solve the equation and yield $m=\frac{8-2\sqrt{2}-\sqrt{64-32\sqrt{2}}}{2}$. Now notice that $FI=AC-AL-\frac{m}{\sqrt{2}}=2\sqrt{2}-1-\frac{\sqrt{2}}{2}*\frac{8-2\sqrt{2}-\sqrt{64-32\sqrt{2}}}{2}$ $=2\sqrt{2}-1-\frac{8\sqrt{2}-4-\sqrt{128-64\sqrt2}}{4}$ $=\frac{\sqrt{128-64\sqrt{2}}}{4}$. Hence $FI^2=\frac{128-64\sqrt{2}}{16}=8-4\sqrt{2}$. -HarryW

-edit: annabelle0913


text:
### Other Fourier series

#### Fourier series for even and odd functions

In the previous Lecture 15 we proved the completeness of the system of functions $$\Bigl\{\frac{1}{2},\qquad \cos (\frac{\pi nx}{l}), \qquad \sin (\frac{\pi nx}{l}) \quad n=1,\ldots\Bigr\} \label{eq-1}$$ on interval $J:=[x_0,x_1]$ with $(x_1-x_0)=2l$. In other words we proved that any function $f(x)$ on this interval could be decomposed into Fourier series $$f(x)= \frac{1}{2}a_0 + \sum_{n=1}^\infty\bigl( a_n\cos (\frac{\pi nx}{l})+b_n \sin (\frac{\pi nx}{l}) \bigr)\label{eq-2}$$ with coefficients calculated according to (14.7) \begin{align} a_n=& \frac{1}{l}\int_J f(x)\cos (\frac{\pi nx}{l})\,dx \qquad n=0,1,2,\ldots,\label{eq-3}\\ b_n= & \frac{1}{l}\int_J f(x)\sin (\frac{\pi nx}{l})\,dx \qquad n=1,2,\ldots0,\label{eq-4}\\ \end{align} and satisfying Parseval's equality $$\frac{l}{2}|a_0|^2 +\sum_{n=1}^\infty l\bigl( |a_n|^2+|b_n |^2 \bigr)=\int_J |f(x)|^2\,dx. \label{eq-5}$$

Now we consider some other orthogonal systems and prove their completeness. To do this we first prove

Lemma 1. Let $J$ be a symmetric interval: $J=[-l,l]$. Then

1. $f(x)$ is even iff $b_n=0$     $\forall n=1,2,\ldots$.
2. $f(x)$ is odd iff $a_n=0$     $\forall n=0,1,2,\ldots$.

Proof. (a) Note that $\cos (\frac{\pi nx}{l})$ are even functions and $\sin (\frac{\pi nx}{l})$ are odd functions. Therefore if $b_n=0$     $\forall n=1,2,\ldots$ then only decomposition (\ref{eq-2}) contains only even functions and $f(x)$ is even. Conversely, if $f(x)$ is an even function then integrand in (\ref{eq-4}) is an odd function and its integral over symmetric interval is $0$.

(b) Statement (b) is proven in the similar way.

#### $\cos$-Fourier series

Let us consider function $f(x)$ on the interval $[0,l]$. Let us extend it as an even function on $[-l,l]$ so $f(x):=f(-x)$ for $x\in [-l,0]$ and decompose it into full Fourier series (\ref{eq-2}); however $\sin$-terms disappear and we arrive to decomposition $$f(x)= \frac{1}{2}a_0 + \sum_{n=1}^\infty a_n\cos (\frac{\pi nx}{l}). \label{eq-6}$$ This is decomposition with respect to orthogonal system $$\Bigl\{\frac{1}{2},\qquad \cos (\frac{\pi nx}{l}) \quad n=1,\ldots\Bigr\}. \label{eq-7}$$

Its coefficients are calculated according to (\ref{eq-3}) but here integrands are even functions and we can take interval $[0,l]$ instead of $[-l,l]$ and double integrals: $$a_n= \frac{2}{l}\int_0^l f(x)\cos (\frac{\pi nx}{l})\,dx \qquad n=0,1,2,\ldots,\label{eq-8}.$$ Also (\ref{eq-5}) becomes $$\frac{l}{4}|a_0|^2 +\sum_{n=1}^\infty \frac{l}{2} |a_n|^2= \int_0^l |f(x)|^2\,dx. \label{eq-9}$$

The sum of this Fourier series is $2l$-periodic. Note that even and then periodic continuation does not introduce new jumps.

#### $\sin$-Fourier series

Let us consider function $f(x)$ on the interval $[0,l]$. Let us extend it as an odd function on $[-l,l]$ so $f(x):=-f(-x)$ for $x\in [-l,0]$ and decompose it into full Fourier series (\ref{eq-2}); however $\cos$-terms disappear and we arrive to decomposition $$f(x)= \sum_{n=1}^\infty b_n\sin (\frac{\pi nx}{l}). \label{eq-10}$$ This is decomposition with respect to orthogonal system $$\Bigl\{ \sin (\frac{\pi nx}{l}) \quad n=1,\ldots\Bigr\}. \label{eq-11}$$

Its coefficients are calculated according to (\ref{eq-4}) but here integrands are even functions and we can take interval $[0,l]$ instead of $[-l,l]$ and double integrals: $$b_n= \frac{2}{l}\int_0^l f(x)\sin (\frac{\pi nx}{l})\,dx \qquad n=1,2,\ldots. \label{eq-12}.$$ Also (\ref{eq-5}) becomes $$\sum_{n=1}^\infty \frac{l}{2} |b_n|^2= \int_0^l |f(x)|^2\,dx. \label{eq-13}$$

The sum of this Fourier series is $2l$-periodic. Note that odd and then periodic continuation does not introduce new jumps iff $f(0)=f(l)=0$.

#### $\sin$-Fourier series with half-integers

Let us consider function $f(x)$ on the interval $[0,l]$. Let us extend it as an even with respect to $x=l$ function on $[0,2l]$ so $f(x):=f(2l-x)$ for $x\in [l,2l]$; then we make an odd continuation to $[-2l,2l]$ and decompose it into full Fourier series (\ref{eq-2}) but with $l$ replaced by $2l$; however $\cos$-terms disappear and we arrive to decomposition \begin{equation*} f(x)= \sum_{n=1}^\infty b'_n\sin (\frac{\pi nx}{2l}). \end{equation*}

Then $f(2l-x)= \sum_{n=1}^\infty b'_n\sin (\frac{\pi nx}{2l})(-1)^{n+1}$ and since $f(x)=f(2l-x)$ due to original even continuation we conclude that $b'_n=0$ as $n=2m$ and we arrive to $$f(x)= \sum_{n=0}^\infty b_n\sin (\frac{\pi (2n+1)x}{2l}) \label{eq-14}$$ with $b_n:=b'_{2n+1}$ where we replaced $m$ by $n$.

This is decomposition with respect to orthogonal system $$\Bigl\{ \sin (\frac{\pi (2n+1)x}{2l}) \quad n=1,\ldots\Bigr\}. \label{eq-15}$$

Its coefficients are calculated according to (\ref{eq-12}) (with $l$ replaced by $2l$) but here we can take interval $[0,l]$ instead of $[0,2l]$ and double integrals: $$b_n= \frac{2}{l}\int_0^l f(x)\sin (\frac{\pi (2n+1)x}{2l})\,dx \qquad n=0,2,\ldots. \label{eq-16}.$$ Also (\ref{eq-13}) becomes $$\sum_{n=0}^\infty \frac{l}{2} |b_n|^2= \int_0^l |f(x)|^2\,dx. \label{eq-17}$$

The sum of this Fourier series is $4l$-periodic. Note that odd and then periodic continuation does not introduce new jumps iff $f(0)=0$.

#### Fourier series in complex form

Consider (\ref{eq-2})--(\ref{eq-5}). Plugging \begin{align*} &\cos(\frac{\pi n x}{l})=\frac{1}{2}e^{\frac{i\pi n x}{l}}+\frac{1}{2}e^{-\frac{i\pi n x}{l}}\\ &\sin(\frac{\pi n x}{l})=\frac{1}{2i}e^{\frac{i\pi n x}{l}}-\frac{1}{2i}e^{-\frac{i\pi n x}{l}} \end{align*} and separating terms with $n$ and $-n$ and replacing in the latter $-n$ by $n=-1,-2,\ldots$ we get $$f(x)= \sum_{n=-\infty}^\infty c_n e^{\frac{i\pi nx}{l}} \label{eq-18}$$ with $c_0=\frac{1}{2}a_0$, $c_n = \frac{1}{2}(a_n -i b_n)$ as $n=1,2,\ldots$ and $c_n = \frac{1}{2}(a_{-n} +i b_{-n})$ as $n=-1,-2,\ldots$ which could be written as $$c_n= \frac{1}{2l}\int_J f(x)e^{-\frac{i\pi n x}{l}}\,dx \qquad n=\ldots,-2, -1, 0,1,2,\ldots.\label{eq-19}$$ Parseval's equality becomes $$2l\sum_{n=-\infty}^\infty |c_n|^2= \int\_J |f(x)|^2\,dx. \label{eq-20}$$ One can see easily that the system $$\Bigl\{X_n:=e^{\frac{i\pi nx}{l}} \quad \ldots,-2, -1, 0,1,2,\ldots\Bigr\} \label{eq-21}$$ on interval $J:=[x_0,x_1]$ with $(x_1-x_0)=2l$ is orthogonal: $$\int_J X_n(x)\bar{X_m(x)}\,dx = 2l\delta_{mn}. \label{eq-22}$$

Remark.

1. All our formulae are due to (Lecture 14) but we need the completeness of the systems and those are due to compleness of the system (\ref{eq-1}) established in Lecture 15.
2. Recall that with periodic boundary conditions all eigenvalues $(\frac{\pi n }{l})^2$ are of multiplicity $2$ i.e. the corresponding eigenspace (consisting of all eigenfunctions with the given eigenvalue) has dimension $2$ and $\{\cos (\frac{\pi n x}{l}), \sin (\frac{\pi n x}{l})\}$ and $\{e^ {\frac{i\pi n x}{l}}, e^{-\frac{\pi n x}{l}}\}$ are just two different orthogonal basises in this eigenspace.


text:
# triple integration to find volume

how can I solve this problem I already have the final answer but I don't know how to solve it , the answer for this problem is $$(V=8(pi-1/3)$$ I tried solving it with this:

$$\int_{-2}^2\int_{-\sqrt{4-x^2}}^{\sqrt{4-x^2}}\int_0^{x^2+y^2}dzdydx$$

but it didn't work

Write an iterated triple integral in the order dzdydx for the volume of the region bounded below by the xy-plane and above by the paraboloid $$z = x^2 + y^2$$ and lying inside the cylinder $$x^2 + y^2 = 4$$?

You should switch to cylindrical coordinates instead. Your integral will change to: $$4 \int_0^2 \int_0^{\pi/2} \int_0^{\rho^2} \rho dz d\phi d\rho$$


text:
# Why we can add an element on both sides like this?

Suppose $A$ is a set equipped with a binary operation $+$.

How I can prove if $a=b$ then $a+c=b+c$? Why we can add an element on both sides like this?

• You can prove it by induction. Aug 2, 2016 at 12:26
• a=b iff (a,c)=(b,c) only if +(a,c)=+(b,c) Aug 2, 2016 at 14:08
• en.wikipedia.org/wiki/…
– yago
Aug 2, 2016 at 14:20
• @KennyLau This has nothing to do with induction except when $A = \mathbb{N}$. Aug 2, 2016 at 15:24
• Why are people downvoting this? It's a good question.
– D_S
Aug 2, 2016 at 16:09

A simple explanation is that saying $a=b$ literally says that $a$ and $b$ are the exact same mathematical object. Hence 'adding' $c$ to $a$ on the right is one the same as 'adding' $c$ to $b$ on the right (adding in quotes because what I am really referring to is the given binary operation).

Note that the converse, $a+c=b+c \Rightarrow a=b$, is not guaranteed to be valid unless every element of the set $A$ has unique right inverses, and in such a case, we say that $c$ has right inverse $c_R^{-1}$ and we can apply that right inverse to both sides to obtain $a+c+c_R^{-1}=b+c+c_R^{-1}\Rightarrow a+e=b+e$ where $e$ is an identity element (required for the notion of a right inverse to make sense) and thus $a+e=b+e\Rightarrow a=b$.

• Actually, $a + c = b + c \implies a = b$ just requires $c$ to be right cancellable, not necessarily invertible.
– yago
Aug 2, 2016 at 14:18

This also confused me when I first started studying math. A binary operation $+$ on $A$ is a function $+: A \times A \rightarrow A$. By $a+b$, we mean $+(a,b)$.

The question is why if $b, c \in A$ with $b =c$, then $+(a,b) = +(a,c)$?

The naive way to do this is to just say: it's obvious; two things are "equal" if they are the same. If $b$ is the same thing as $c$, then $+(a,b)$ is obviously the same thing as $+(a,c)$, because $b$ is the same thing as $c$. There is no difference in the expressions. If I add $3$ to the number $2$, that's obviously the same thing as adding $3$ to the number $1+1$, because $1+1$ is the same thing as $2$.

Another way if you want to think more carefully about it: fix $a \in A$. Then the mapping $x \mapsto +(a,x)$ is a function $f: A \rightarrow A$.

So this reduces the problem to showing the following: if $f$ is a function from $A$ to $A$, and $b, c \in A$ with $b = c$, then $f(b) = f(c)$. Can you see why this is tre?

• I like the idea of explaining $+$ as a function $+:X\times X \rightarrow X$. I think, however, you can omit the part where you fix $a$, provided that you have suitable rules for determining the equality of ordered pairs. So +1 to this answer for introducing $+$ as a function at the very beginning, +1 to goblin's answer for applying the binary function directly. Aug 2, 2016 at 16:49

For the binary operation to be well-defined, it must be the case that for any elements $a, b, c, d$ with $a=b$ and $c=d$, $a+c = b+d$. It is not at all clear in your question what further conditions there are on the binary operation $+$, but being well-defined is absolutely necessary for what you've written to make sense.

The converse is not necessarily true, however. Since you have not mentioned the existence of inverses for your binary operation, there is no reason to assume that $a+c=b+c \implies a=b$. Taking an example from ring theory, replacing your '+' with multiplication in $\mathbb{Z}_6$, we have $2 \times 3 = 4 \times 3 = 0$, but $2 \neq 4$.

See this thread for a more concise explanation of what I've said.

Because this is what equality means.

From a very formal perspective, equality is just some relation between mathematical objects. It becomes interesting if we restrict it's behavior via some axioms, like this:

$$x=y \Rightarrow \left[\phi(x) \leftrightarrow \phi(y)\right]$$

for any one-argument proposition $\phi$.

That is, we require equal elements to behave exactly the same. If something is true for $x$, it is true for $y$, and vice versa.

You particular case corresponds to $\phi(x)=x+c$ for a fixed $c$.

Let be $a=b$ now add c to a: $$a+c$$ Now:$$a+c = a+c$$ but $a=b$, so we can replace $a$ in the second member, then $=> a+c = b+c$

To prove that $a = a$, $0+a = a$ and $a+0 = a$ then, $a+0 = 0+a => a=a$.