text:
## Equilibrium equations

A solid body is in static equilibrium when the resultant force and moment on each axis is equal to zero. This can be expressed by the equilibrium equations. In this article we will prove the equilibrium equations by calculating the resultant force and moment on each axis. A more elegant solution may be derived by using Gauss’s theorem and Cauchy’s formula. This approach may be found in international bibliography.

Consider a solid body in static equilibrium that neither moves nor rotates. Surface and body forces act on this body. We cut an infinitesimal parallelepiped inside the body and we analyze the forces that act on it as shown in Fig. 1. We will assume that the stress field is continuous and differentiable inside the whole body.

The stress components on each side of the cube is a function of the position since we have a non uniform but continuous stress field. For example on side $$4$$ the normal stress is $$\sigma_{11}(x_{1},x_{2},x_{3})=\sigma_{11}$$. On the opposite side $$2$$ the normal stress is $$\sigma_{11}(x_{1}+\mathrm{d}x_{1},x_{2},x_{3})$$. By taking under consideration Taylor’s theorem we may write:

$\sigma_{11}(x_{1}+dx,x_{2},x_{3})=\sigma_{11}+\dfrac{\partial\sigma_{11}}{\partial x_{1}}dx_{1}$
(1)

where the higher order terms have been neglected because they are relatively small. We follow the same procedure for all the components as shown if Fig. 1.

Equilibrium of the body demands that the resultant forces must vanish. By summing up the forces with direction parallel to axis $$x_{1}$$ we get:

$\begin{array}{l}\left(\sigma_{11}+\dfrac{\partial\sigma_{11}}{\partial x_{1}}\mathrm{d}x_{1}\right)\mathrm{d}x_{2}\mathrm{d}x_{3}-\sigma_{11}\mathrm{d}x_{2}\mathrm{d}x_{3}+\\+\left(\sigma_{21}+\dfrac{\partial\sigma_{21}}{\partial x_{2}}\mathrm{d}x_{2}\right)\mathrm{d}x_{1}\mathrm{d}x_{3}-\sigma_{21}\mathrm{d}x_{1}\mathrm{d}x_{3}+\\+\left(\sigma_{31}+\dfrac{\partial\sigma_{31}}{\partial x_{3}}\mathrm{d}x_{3}\right)\mathrm{d}x_{1}\mathrm{d}x_{2}-\sigma_{31}\mathrm{d}x_{1}\mathrm{d}x_{2}+f_{1}\mathrm{d}x_{1}\mathrm{d}x_{2}\mathrm{d}x_{3}=0\end{array}$
(2)

where $$\mathrm{d}x_{1}$$, $$\mathrm{d}x_{2}$$ and $$\mathrm{d}x_{3}$$ are the dimensions of the parallelepiped and $$f_{1}$$ is the component of the body force parallel to $$x_{1}$$. By dividing with $$\mathrm{d}x_{1}\mathrm{d}x_{2}\mathrm{d}x_{3}$$ we get:

$\dfrac{\partial\sigma_{11}}{\partial x_{1}}+\dfrac{\partial\sigma_{21}}{\partial x_{2}}+\dfrac{\partial\sigma_{31}}{\partial x_{3}}+f_{1}=0$
(3)

Similarly we can obtain the equations for the other two directions. The final set of equilibrium equations is:

$\begin{array}{l}\dfrac{\partial \sigma_{11}}{\partial x_{1}}+\dfrac{\partial \sigma_{21}}{\partial x_{2}}+\dfrac{\partial \sigma_{31}}{\partial x_{3}}+f_{1}=0\\ \dfrac{\partial \sigma_{12}}{\partial x_{1}}+\dfrac{\partial \sigma_{22}}{\partial x_{2}}+\dfrac{\partial \sigma_{32}}{\partial x_{3}}+f_{2}=0\\ \dfrac{\partial \sigma_{13}}{\partial x_{1}}+\dfrac{\partial \sigma_{23}}{\partial x_{2}}+\dfrac{\partial \sigma_{33}}{\partial x_{3}}+f_{3}=0\end{array}$
(4)

By using index notation we may write the three equilibrium equations in compact form:

$\sigma_{ji,j}+f_{i}=0$
(5)

The resultant moment on each axis must also vanish. By taking under consideration all the forces that contribute to moment about axis $$x_{3}$$ we may write:

$\begin{array}{l}-\left(\sigma_{11}+\dfrac{\partial\sigma_{11}}{\partial x_{1}}\mathrm{d}x_{1}\right)\mathrm{d}x_{2}\mathrm{d}x_{3}\dfrac{\mathrm{d}x_{2}}{2}+\sigma_{11}\mathrm{d}x_{2}\mathrm{d}x_{3}\dfrac{\mathrm{d}x_{2}}{2}+\\+\left(\sigma_{22}+\dfrac{\partial\sigma_{22}}{\partial x_{2}}\mathrm{d}x_{2}\right)\mathrm{d}x_{1}\mathrm{d}x_{3}\dfrac{\mathrm{d}x_{1}}{2}-\sigma_{22}\mathrm{d}x_{1}\mathrm{d}x_{3}\dfrac{\mathrm{d}x_{1}}{2}+\\+\left(\sigma_{12}+\dfrac{\partial\sigma_{12}}{\partial x_{1}}\mathrm{d}x_{1}\right)\mathrm{d}x_{2}\mathrm{d}x_{3}\mathrm{d}x_{1}-\left(\sigma_{21}+\dfrac{\partial\sigma_{21}}{\partial x_{2}}\mathrm{d}x_{2}\right)\mathrm{d}x_{1}\mathrm{d}x_{3}\mathrm{d}x_{2}-\\-\left(\sigma_{31}+\dfrac{\partial\sigma_{31}}{\partial x_{3}}\mathrm{d}x_{3}\right)\mathrm{d}x_{1}\mathrm{d}x_{2}\dfrac{\mathrm{d}x_{2}}{2}+\sigma_{31}\mathrm{d}x_{1}\mathrm{d}x_{2}\dfrac{\mathrm{d}x_{2}}{2}+\\+\left(\sigma_{32}+\dfrac{\partial\sigma_{32}}{\partial x_{3}}\mathrm{d}x_{3}\right)\mathrm{d}x_{1}\mathrm{d}x_{2}\dfrac{\mathrm{d}x_{1}}{2}-\sigma_{32}\mathrm{d}x_{1}\mathrm{d}x_{2}\dfrac{\mathrm{d}x_{1}}{2}-\\-f_{1}\mathrm{d}x_{1}\mathrm{d}x_{2}\mathrm{d}x_{3}\dfrac{\mathrm{d}x_{2}}{2}+f_{2}\mathrm{d}x_{1}\mathrm{d}x_{2}\mathrm{d}x_{3}\dfrac{\mathrm{d}x_{1}}{2}=0\end{array}$
(6)

by dividing with $$\mathrm{d}x_{1}\mathrm{d}x_{2}\mathrm{d}x_{3}$$ and taking the limit $$\mathrm{d}x_{1}\to 0$$, $$\mathrm{d}x_{2}\to 0$$ and $$\mathrm{d}x_{3}\to 0$$ we derive:

$\sigma_{12}=\sigma_{21}$
(7)

Following the same procedure for the other two axes lead to the conclusion that the stress tensor is symmetric:

$\sigma_{ij}=\sigma_{ji}$
(8)

For the case of two dimensional problems, equilibrium equations simplify as follows:

$\begin{array}{l}\dfrac{\partial \sigma_{11}}{\partial x_{1}}+\dfrac{\partial \sigma_{21}}{\partial x_{2}}+f_{1}=0\\ \dfrac{\partial \sigma_{12}}{\partial x_{1}}+\dfrac{\partial \sigma_{22}}{\partial x_{2}}+f_{2}=0\end{array}$
(9)

### Exercise

$\begin{array}{ccc}\sigma_{11}=12x_{1}^{2}x_{2}^{2}x_{3} & \sigma_{22}=-9x_{1}^{3}x_{2}^{2} & \sigma_{33}=4x_{2}^{2}x_{3}^{3}\\ \sigma_{12}=4x_{2}^{3} & \sigma_{13}=-12x_{1}x_{2}^{2}x_{3}^{2} & \sigma_{23}=16x_{1}^{3}x_{2}x_{3}\end{array}$
(10)

Calculate the body forces in order to achieve static equilibrium.

The resultant force on each axis must vanish. By using equations (4) we get:

$\begin{array}{l}\dfrac{\partial \sigma_{11}}{\partial x_{1}}+\dfrac{\partial \sigma_{21}}{\partial x_{2}}+\dfrac{\partial \sigma_{31}}{\partial x_{3}}+f_{1}=0\Rightarrow\\24x_{1}x_{2}^{2}x_{3}+12x_{2}^{2}-24x_{1}x_{2}^{2}x_{3}+f_{1}=0\Rightarrow\\f_{1}=-12x_{2}^{2}\end{array}$
(11)
$\begin{array}{l}\dfrac{\partial \sigma_{12}}{\partial x_{1}}+\dfrac{\partial \sigma_{22}}{\partial x_{2}}+\dfrac{\partial \sigma_{32}}{\partial x_{3}}+f_{2}=0\Rightarrow\\0-18x_{1}^{3}x_{2}+16x_{1}^{3}x_{2}+f_{2}=0\Rightarrow\\f_{2}=2x_{1}^{3}x_{2}\end{array}$
(12)
$\begin{array}{l}\dfrac{\partial \sigma_{13}}{\partial x_{1}}+\dfrac{\partial \sigma_{23}}{\partial x_{2}}+\dfrac{\partial \sigma_{33}}{\partial x_{3}}+f_{3}=0\Rightarrow\\-12x_{2}^{2}x_{3}^{2}+16x_{1}^{3}x_{3}+12x_{2}^{2}x_{3}^{2}+f_{3}=0\Rightarrow\\f_{3}=-16x_{1}^{3}x_{3}\end{array}$
(13)


text:
# How to check if circles intersect each other?

I'm trying to do trilateration where I know the coordinates of three known points and the estimates of the radii - not guaranteed to be really precise. My question is, how can I check if the circles actually intersect each other? Does the checking step mentioned in this tutorial make sense, considering the estimate values?

-
Two circles intersect each other if the distance of the middle points is smaller than the sum of their radii. Does this help? –  Listing Jun 2 '11 at 12:30
Yes, I know. The problem is I don't know the exact value of the radii because I estimate them based on other parameters (e.g. Bluetooth signal strength values). So, does it somehow still make sense to check if they actually intersect, or just go with the rest of the calculation? –  printemps Jun 2 '11 at 12:44
Sure it does but of course you will get an error in the end that depends on the error in the calculation of the radii. –  Listing Jun 2 '11 at 12:47
Thanks! I'll get back to you if there's any further issues. –  printemps Jun 2 '11 at 12:55

## 1 Answer

If by the checking step you mean the first three lines in the tutorial, it does make sense. It sounds like your center points are known well, even if the distances are not. For two circles, each with a range of radii, you can do two checks-one with the minimum radii and one with the maximum. For the most part, you will then know if they intersect none, some, or all of the time the radii are in that range. There are pathological cases where the intersection will disappear in the middle. One example would be center $(0,0)$, distance $(\frac{5}{8},\frac{7}{8})$ and center $(1,0)$ distance $(\frac{1}{2},\frac{7}{4})$. If the error in you distance estimates is small, this is unlikely.

-
Thanks! That will do the trick. –  printemps Jun 3 '11 at 7:42

format: plain


text:
# Synthesis of gold nanoparticles

This section of the module first provides some background information about the most common method used for the synthesis of gold nanoparticles which involves the reduction of tetrachloroauric acid (HAuCl4) by small amounts of citric acid. This method was introduced by Turkevich et al. in 1951 and further refined by Frens in 1973. In this method, hot tetrachloroauric acid reacts with a small amount of sodium citrate solution. The citrate ions act as both a reducing agent, and a capping agent. Reduction occurs according to the reactions:

$\ce{Na3C6H5O7 \:(sodium\: citrate) + 3H+ → C6H8O7 \:(citric\: acid) + 3Na+}\nonumber$

$\mathrm{2HAuCl_4 + 3C_6H_8O_7 \:(citric\: acid) → 2Au + 3C_5H_6O_5 \:\textrm{(3-ketoglutaric acid)} + 8HCl + 3CO_2}\nonumber$

In the traditional Frens’ method, small citrate to tetrachloroauric acid ratios are used without particular attention to pH and the typical trend observed is that particle size decreases as the ratio of citrate to tetrachloroauric acid increases. This is consistent with the mechanism where part of the sodium citrate is used to reduce Au3+ to Au and the remaining sodium citrate ions are available for stabilizing the particles (capping agent). Nanoparticles continue to aggregate until the total surface area of all particles becomes small enough to be covered by the existing citrate ions. Therefore, higher concentrations of sodium citrate result in less particle aggregation and the final size of the particles decrease. However, Ji et al. (reference 7) observed that if the ratio is increased beyond 3.5:1, the particle size actually increases and eventually levels off for very large ratios. This can be attributed to the effect the citrate plays on the final pH of the solution. Upon addition of larger amounts of Na3Ct to HAuCl4, the pH increases and shifts the gold complex equilibrium toward more hydrolyzed forms. In addition, oxidation products of citrate are formed. All these processes create a continuously changing Turkevich reaction system with a great complexity and a variety of possible pathways for the reduction of Au3+. pH also affects the ionization of citrate depending where the pH falls with respects to three pKa values of 3.2, 4.8 and 6.4. As more citric acid is in the form of citrate (with a -3 charge), the ionic strength of the solution increases and the colloidal stability of the seed particles decreases. As consequence, the seed particle size increases leading to less particles and larger final sizes.

Students are directed to investigate both the effect of changing the Na3Ct to HAuCl4 ratio as well as the pH of the solution at three different values slightly above each respective pKa. These values were chosen because of the larger particle size observed which yield larger extinction coefficients and are more suitable for sensor application. However, to thoroughly investigate the role that pH plays in the synthesis of gold nanoparticles, the instructor will have to widen the pH range from 1 to 8 (see reference 7).

Q6. What is the oxidation number of gold in HAuCl4?

The oxidation number is +3.

Q7. Write the half reaction for the reduction of HAuCl4 to Au.

$\ce{HAuCl4 + 3e- → Au + H+ + 4Cl-}\nonumber$

Q8. Above what pH value will citric acid (C6H8O7) be completely dissociated to citrate (C6H5O73–)?

Since citric acid is a triprotic acid with pKa values of 3.2, 4.8 and 6.4, the acid will be completely dissociated to citrate at pH values above 6.4.


text:
# Can this recursive definition be improved?

The question goes something like this:
Give a recursive definition for the following set $S$: The set of ordered pairs $(a,b)$ where $a$ and $b$ are both positive integers and $a + b$ is odd.

In order to solve this, I first had to create a recursive case for odd and even numbers as follows.

$Q(1) = 1 || Q(N) = (Q(n-1)) + 2, N > 1$ //this gives all our positive odd values
$R(2) = 2 || R(N) = (R(n-1)) + 2, N > 2$ // this gives all our positive even values
If $x$ is in set $Q$, and $y$ is in set $R$, then $(x,y)$ is in $S$ and $(y,x)$ is in $S$

Would this be correct, and is there a different way I Should be doing this? I see that this question was asked here, however their approach was different than mine and I'm not entirely sure that I understand how they are doing it.


text:
# A nowhere-zero point in a linear mapping

 Importance: High ✭✭✭
 Author(s): Jaeger, Francois
 Subject: Combinatorics » Matrices
 Keywords: invertible nowhere-zero flow
 Recomm. for undergrads: no
 Prize: none
 Posted by: mdevos on: March 8th, 2007
Conjecture   If is a finite field with at least 4 elements and is an invertible matrix with entries in , then there are column vectors which have no coordinates equal to zero such that .

The motivation for this problem comes from the study of nowhere-zero flows on graphs. If is the directed incidence matrix of a graph , then a nowhere-zero -flow on is precisely a vector so that has all entries nonzero, and . The above conjecture is similar, but is for general (invertible) matrices. Alon and Tarsi have resolved this conjecture for all fields not of prime order using their polynomial technique.

Definition: Say that a matrix is -choosable if for all with and for all with , there exists a vector and a vector so that . Note that every matrix is -choosable, but that an matrix is -choosable if and only if it is invertible.

Alon and Tarsi actually prove a stronger property than Jaeger conjectured for fields not of prime order. They prove that if has characteristic , then every invertible matrix over is -choosable. This result has been extended by DeVos [D] who showed that every such matrix is -choosable. Yang Yu [Y] has verified that the conjecture holds for matrices with entries in when .

Jaeger's conjecture is true in a very strong sense for fields of characteristic 2. DeVos [D] proved that every invertible matrix over such a field is -choosable for every . The following conjecture asserts that invertible matrices over fields of prime order have choosability properties nearly as strong.

Conjecture   [The choosability in conjecture (DeVos)] Every invertible matrix with entries in for a prime is -choosable for every .

This is essentially the strongest choosability conjecture one might hope to be true over fields of prime order. I (M. DeVos) don't have any experimental evidence for this at all, so it could be false already for some small examples. However, I suspect that if The permanent conjecture is true, that this conjecture should also be true. In any case, I (M. DeVos) am offering a bottle of wine for this conjecture.

## Bibliography

[A] N. Alon, Combinatorial Nullstellensatz, Combinatorics Probability and Computing 8 (1999) no. 1-2, 7-29. MathSciNet

[AT] N. Alon, M. Tarsi, A Nowhere-Zero Point in Linear Mappings, Combinatorica 9 (1989), 393-395. MathSciNet

[BBLS] R. Baker, J. Bonin, F. Lazebnik, and E. Shustin, On the number of nowhere-zero points in linear mappings, Combinatorica 14 (2) (1994), 149-157. MathSciNet

[D] M. DeVos, Matrix Choosability, J. Combinatorial Theory, Ser. A 90 (2000), 197-209. MathSciNet

[Y] Y. Yu, The Permanent Rank of a Matrix, J. Combinatorial Theory Ser. A 85 (1999), 237-242. MathSciNet

* indicates original appearance(s) of problem.


text:
# [gmx-users] Ion conductivity: current-current (auto)correlation function

Mon Apr 30 19:49:29 CEST 2012

Hi,

Is it possible to compute the ion conductivity using any of the existing
Gromacs tools?  Ion conductivity is proportional to the current-current
(auto)correlation function.

For example, the current J_z(t) along z can be written as the sum of the
products of charge and z-component of the speed for each atom in the system:

J_z(t) = \sum_{i=1}^N q_i v_{z,i}(t)

Now, by the Green-Kubo formula, ion conductivity is proportional to the
current-current (auto)correlation function:

\sigma = \frac{1}{3 V k_B T} \int_{0}^{\infty} dt C_{JJ}(t)

where

C_JJ(t) = < J_z(0) \cdot J_z(t) >

and

<...> represents an equilibrium ensemble average.

I know that g_velacc computes velocity autocorrelation functions, but is
there any way to compute the current and calculate the current-current
(auto)correlation function?

It seems that g_current calculates the current autocorrelation function, but
do you know what method it uses?  Also, is it somehow possible to use
g_current to calculate only the autocorrelation of the current J_z(t) along
z?

Thank you so very much for your time!

Andrew DeYoung
Carnegie Mellon University


text:
# Math Help - [SOLVED] nth root in a simple calculator

1. ## [SOLVED] nth root in a simple calculator

I came across this trick to find n th root of any number on a calculator that does not have nth root function or logs !! problem is I can't figure out why it works ...

To find : nth root of x.

take sqrt of 'x' 12 times. (i.e. take sqrt (x) then again take sqrt (x) ... 12 times)

subtract 1 from this ans.

divide by 'n'.

square the result 12 times...

Any idea why i get the correct answer ?

2. Originally Posted by rohankg88
I came across this trick to find n th root of any number on a calculator that does not have nth root function or logs !! problem is I can't figure out why it works ...

To find : nth root of x.

take sqrt of 'x' 12 times. (i.e. take sqrt (x) then again take sqrt (x) ... 12 times)

subtract 1 from this ans.

divide by 'n'.

square the result 12 times...

Any idea why i get the correct answer ?
Why not just evaluate $x^{\frac{1}{n}}$?

3. ## Curiosity...

In simple calculators there's no function for x ^ 1/n.

I just wanted to know why this method works... whats the math behind it ??

4. I attempted to do this to compute $3^{1/4}$, but it didn't work. Can you give an example?

5. Originally Posted by rohankg88
I came across this trick to find n th root of any number on a calculator that does not have nth root function or logs !! problem is I can't figure out why it works ...

To find : nth root of x.

take sqrt of 'x' 12 times. (i.e. take sqrt (x) then again take sqrt (x) ... 12 times)

subtract 1 from this ans.

divide by 'n'.

square the result 12 times...

Any idea why i get the correct answer ?
The approximation you give is:

$x^{1/n}\approx \left( 1+\frac{x^{1/4096}-1}{n}\right)^{4096}$

This is using the result that for large $m$:

$e^x \approx \left(1+\frac{x}{m}\right)^m$

so:

$x^{1/n}=e^{\ln(x)/n}\approx \left( 1+\frac{\ln(x)}{n.m}\right)^m$

and presumably a suitable approximation for $\ln(x^{1/4096})\approx x^{1/4096}-1$.

I will leave the detail to others to work out

CB

6. Originally Posted by CaptainBlack
The approximation you give is:

$x^{1/n}\approx \left( 1+\frac{x^{1/4096}-1}{n}\right)^{4096}$

This is using the result that for large $m$:

$e^x \approx \left(1+\frac{x}{m}\right)^m$

so:

$x^{1/n}=e^{\ln(x)/n}\approx \left( 1+\frac{\ln(x)}{n.m}\right)^m$

and presumably a suitable approximation for $\ln(x^{1/4096})\approx x^{1/4096}-1$.

I will leave the detail to others to work out

CB
The final approximation you need is

$\frac{\ln(x)}{m} \approx x^{1/m}-1$ for large $m$.

To show this, start by observing that
$t^{1/m} \approx 1$ for large $m$,
so
$\frac{1}{t} \approx t^{1/m-1}$.
Now integrate both sides of the equation from 1 to x.

7. Originally Posted by awkward
The final approximation you need is

$\frac{\ln(x)}{m} \approx x^{1/m}-1$ for large $m$.

To show this, start by observing that
$t^{1/m} \approx 1$ for large $m$,
so
$\frac{1}{t} \approx t^{1/m-1}$.
Now integrate both sides of the equation from 1 to x.
If you had not noticed that is what I gave (may be I gave the impression that that is what I wanted, if so that is the wrong impression).

CB

8. ## Re: [SOLVED] nth root in a simple calculator

if u hv understood the reason behind this, could u please share it with me too???


text:
# Create a better set of simulated data for the deblender

XMLWordPrintable

## Details

• Type: Story
• Status: Done
• Resolution: Done
• Fix Version/s: None
• Component/s:
• Labels:
None
• Story Points:
10
• Sprint:
DRP F17-3, DRP F17-4, DRP F17-5
• Team:
Data Release Production

## Description

Currently the deblender test data (located here) has 5 simulated images created with galsim. Blends are separated by running the stack's detection task on them, which estimates positions for the objects and groups them together.

Many of the "blends" detected are not actually blended objects, and many other objects are too faint to be detected by the pipeline (at least in the current catalogs). This makes it difficult to compare the deblender results with the simulated data, where there are a few big and dense blends and a larger number of "blends" whose objects aren't really blended together. The output created in this ticket will be images in all 6 LSST bands, the psf image, the variance in each band, the "truth" catalog, and a set of stack objects (calexps and merged catalogs) for use in the stack.

This is a change in scope from the original description of this ticket, which was just to make the current images more accessible to non-LSST Stack versions of the deblender (ie. the WFIRST deblender).

## Activity

Hide
Fred Moolekamp added a comment -

One of the problems with the current sims is that they are large images with objects randomly placed on them, using the LSST stack to detect sources and select the blended groups. A better solution would be to create a set of blends of various sizes and densities so that we know which objects are included in each blend. This will make it easier to have a non-stack version of the simulated images and greatly simplify the procedure for comparing the deblender results to the true values of the simulated blends.

Show
Fred Moolekamp added a comment - One of the problems with the current sims is that they are large images with objects randomly placed on them, using the LSST stack to detect sources and select the blended groups. A better solution would be to create a set of blends of various sizes and densities so that we know which objects are included in each blend. This will make it easier to have a non-stack version of the simulated images and greatly simplify the procedure for comparing the deblender results to the true values of the simulated blends.
Hide
Fred Moolekamp added a comment -

Hey Peter,
I added 3 new directories with simulated data:

1. psf_matched_sim : psf matched simulations with different bulge/disk SEDs
2. unmatched_sim : simulations with different bulge/disk SEDs and different psfs in different bands
3. matched_real : psf matched simulations with real galaxy morphologies (but a single SED)

When you get back in town, can you have a look at these and review the ticket?

Show
Fred Moolekamp added a comment - Hey Peter, I added 3 new directories with simulated data: psf_matched_sim : psf matched simulations with different bulge/disk SEDs unmatched_sim : simulations with different bulge/disk SEDs and different psfs in different bands matched_real : psf matched simulations with real galaxy morphologies (but a single SED) When you get back in town, can you have a look at these and review the ticket?
Hide
Peter Melchior added a comment -

These are exactly what we need. Please check the pixel_scale=0.23 parameter in the YAML file. It seems not to be read.

Also, we'll need a new ticket to collect summary statistics of such a run with, say, 1000 objects: flux, colors, ellipticity. Position and radius are either not very relevant or dependent on the precise definition, so we can/should ignore them.

Show
Peter Melchior added a comment - These are exactly what we need. Please check the pixel_scale=0.23 parameter in the YAML file. It seems not to be read. Also, we'll need a new ticket to collect summary statistics of such a run with, say, 1000 objects: flux, colors, ellipticity. Position and radius are either not very relevant or dependent on the precise definition, so we can/should ignore them.

## People

• Assignee:
Fred Moolekamp
Reporter:
Fred Moolekamp
Reviewers:
Peter Melchior
Watchers:
Fred Moolekamp, Peter Melchior


text:
kidzsearch.com > wiki   Explore:web images videos games

Asteroid belt

The asteroid belt or main belt is a ring of small and large rocks and dust between the orbits of Mars and Jupiter. The biggest object in the asteroid belt is Ceres, a dwarf planet. The Kirkwood gaps separate the asteroid belt into several groups.

Most asteroids orbit at 2 to 3 times the distance between Earth and the Sun. Planets that are "inside" - or before - the asteroid belt (which means they are closer to the sun) are called inner planets. Planets that are "outside" - that is, after - the asteroid belt are called outer planets: so Mercury, Venus, Earth, and Mars are inner planets, while Jupiter, Saturn, Uranus and Neptune are the outer planets.

Origin

In 1802, shortly after discovering 2 Pallas, Heinrich Olbers suggested to William Herschel that Ceres and Pallas were fragments of a much larger planet that once occupied the Mars–Jupiter region, this planet having suffered an internal explosion or a cometary impact many million years before.[1] This hypothesis has fallen from favor. The large amount of energy needed to destroy a planet, and with the belt's low combined mass (only about 4% of the mass of the Moon) do not support the hypothesis. Also, the significant chemical differences between the asteroids are difficult to explain if they come from the same planet.[2] Today, most scientists accept that the asteroids never formed a planet at all.

In general, the formation and evolution of the Solar System happened when a cloud of interstellar dust and gas collapsed under the influence of gravity to form the Sun and planetesimals, and eventually the planets.[3] This gravitational accretion led to the formation of the rocky planets and the gas giants.

Planetesimals in the region which would become the asteroid belt were too strongly disturbed by Jupiter's gravity to form a planet. Instead they continued to orbit the Sun as before, while occasionally colliding.[4] In regions where the velocity of the collisions was too high, the shattering of planetesimals was more common than accretion,[5] preventing the formation of planet-sized bodies.

References

1. "A brief history of asteroid spotting". Open2.net. Retrieved 2007-05-15.
2. Masetti, M.; and Mukai, K. (2005). "Origin of the Asteroid Belt". NASA Goddard Spaceflight Center. Retrieved 2007-04-25.
3. Watanabe, Susan (2001). "Mysteries of the Solar Nebula". NASA. Retrieved 2007-04-02.
4. Petit, J.-M.; Morbidelli, A.; and Chambers, J. (2001). "The primordial excitation and clearing of the Asteroid Belt" (PDF). Icarus 153 (2): 338–347. . Archived from the original on 21 February 2007. Retrieved 2007-03-22.
5. Edgar, R.; and Artymowicz, P. (2004). "Pumping of a planetesimal disc by a rapidly migrating planet" (PDF). Monthly Notices of the Royal Astronomical Society 354: 769–772. . Retrieved 2007-04-16.


text:
# Longtable: Variable or switch to determine if row is the first or last one of the current page

I am currently struggling with the longtable package and horizontal lines that should visually separate rows. The thing is that I do not want to display bottom lines on the last row of each particular page and a top line on the first row of each succeeding page. My question would be if there is any variable or switch of the longtable code that i can use to determine (inside my rowend command) if this is true and then suppress the execution of hdashline? I know of the variable \LT@rows but what I have tried so far didn't give me any results.

MWE:

\documentclass[a4paper]{article}

\usepackage[english]{babel}
\usepackage[utf8x]{inputenc}
\usepackage{longtable}
\usepackage{array}
\usepackage{arydshln}

\newcommand{\rowend}{%
\tabularnewline%
% Determine here if it is the last row of the current page or first row of next page
% If it is the last row of the current page, don't make a bottom dashed line.
% If it is the first row of a succeeding page, don't make a top row (although I have no idea why that line is actually drawn ...
\hdashline%
}

\begin{document}

\begin{longtable}{|l|r|c|p{2cm}|}
\caption{A simple longtable example}\\
\hline
\textbf{First entry} & \textbf{Second entry} & \textbf{Third entry} & \textbf{Fourth entry} \\
\hline

\multicolumn{4}{c}%
{\tablename\ \thetable\ -- \textit{Continued from previous page}} \\
\hline
\textbf{First entry} & \textbf{Second entry} & \textbf{Third entry} & \textbf{Fourth entry} \\
\hline

\hline \multicolumn{4}{r}{\textit{Continued on next page}} \\
\endfoot
\hline
\endlastfoot

1 & 2 & 3 & 4 \rowend 1 & 2 & 3 & 4 \rowend 1 & 2 & 3 & 4 \rowend 1 & 2 & 3 & 4 \rowend
1 & 2 & 3 & 4 \rowend 1 & 2 & 3 & 4 \rowend 1 & 2 & 3 & 4 \rowend 1 & 2 & 3 & 4 \rowend
1 & 2 & 3 & 4 \rowend 1 & 2 & 3 & 4 \rowend 1 & 2 & 3 & 4 \rowend 1 & 2 & 3 & 4 \rowend
1 & 2 & 3 & 4 \rowend 1 & 2 & 3 & 4 \rowend 1 & 2 & 3 & 4 \rowend 1 & 2 & 3 & 4 \rowend
1 & 2 & 3 & 4 \rowend 1 & 2 & 3 & 4 \rowend 1 & 2 & 3 & 4 \rowend 1 & 2 & 3 & 4 \rowend
1 & 2 & 3 & 4 \rowend 1 & 2 & 3 & 4 \rowend 1 & 2 & 3 & 4 \rowend 1 & 2 & 3 & 4 \rowend
1 & 2 & 3 & 4 \rowend 1 & 2 & 3 & 4 \rowend 1 & 2 & 3 & 4 \rowend 1 & 2 & 3 & 4 \rowend
1 & 2 & 3 & 4 \rowend 1 & 2 & 3 & 4 \rowend 1 & 2 & 3 & 4 \rowend 1 & 2 & 3 & 4 \rowend
1 & 2 & 3 & 4 \rowend 1 & 2 & 3 & 4 \rowend 1 & 2 & 3 & 4 \rowend 1 & 2 & 3 & 4 \rowend
1 & 2 & 3 & 4 \rowend 1 & 2 & 3 & 4 \rowend 1 & 2 & 3 & 4 \rowend 1 & 2 & 3 & 4 \rowend
1 & 2 & 3 & 4 \rowend 1 & 2 & 3 & 4 \rowend 1 & 2 & 3 & 4 \rowend 1 & 2 & 3 & 4 \rowend
1 & 2 & 3 & 4 \rowend 1 & 2 & 3 & 4 \rowend 1 & 2 & 3 & 4 \rowend 1 & 2 & 3 & 4 \rowend

\end{longtable}

\end{document}

It would be possible to use a two pass system using \pageref (or \pdfsavepos, or wrappers such as zref) to detect if one row is on a different page from the previous and so in that case omit the rule, or (perhaps) you could adjust the rule to have a special depth (say 1sp) and detect that and remove it in the output routine.
An alternative would be to use supertabular instead of longtable that does the page breaking "by hand" within the table macros measuring the height and then stopping the table forcing a break and starting a new one internally. In such a system it is much easier to "know" that you are the last row of a page.
• @hetsch idea would be that at the end of a row that you want to follow with an optional \hline do \label{some-generated-name-a}\\\myhline\label{some-generated-name-b} then define myhline to do an \hline unless both the labels -a and -b are defined from the previous run and \pageref shows they are on separate pages, in which case omit the hline. – David Carlisle Jan 4 '16 at 11:06


text:
Trading in precision for better recall in neural network

There's always a tradeoff between precision and recall. I'm dealing with a multi-class problem, where for some classes I have perfect precision but really low recall.

Since for my problem false positives are less of an issue than missing true positives, I want reduce precision in favor of increasing recall for some specific classes, while keeping other things as stable as possible. What are some ways to trade in precision for better recall?

• Weighted loss (ML software like scikit-learn or Keras let you attach weights to classes, so that you can tell which is more significant)
• @Avis in Keras you can use loss_weights argument model.compile. Feb 20, 2018 at 8:50


text:
# Parametric Form - Chapter 1 Integration Techniques 1.1...

• Notes
• jweng1292
• 49

This preview shows page 1 - 4 out of 49 pages.

##### We have textbook solutions for you!
The document you are viewing contains questions related to this textbook.
The document you are viewing contains questions related to this textbook.
Chapter 6 / Exercise 48
Intermediate Algebra
Tussy/Gustafson
Expert Verified
Chapter 1Integration Techniques1.1Integration TechniquesThe Riemann integral is defined to beZbaf(x)dx=limkΔxk→0nXi=0f(c0)(xi+1-xi)where thexipartition (a, b).However the Fundamental Theorem of Calculus allows integrals to be calculated byZbaf(x)dx=F(b)-F(a)wheredF(x)dx=f(x).This technique of finding an anti-derivative works well if an anti-derivative exists and can befound. Consider the following problems.1. Integrate the following by finding an anti-derivative.Rsin(x2)2x dx2. Why will the technique for finding the anti-derivative above not work on this integral? Note this function isintegrable.RxexdxBecause there are no simple rules for finding all anti-derivatives many techniques must be learned.1.2Integration by Parts1.2.1DerivationConsider the following use of the derivative product property and be prepared to explain the steps.f(x)=g(x)h(x).f0(x)=g(x)h0(x) +g0(x)h(x).Zf0(x)dx=Zg(x)h0(x) +g0(x)h(x)dx.g(x)h(x)=Zg(x)h0(x)dx+Zg0(x)h(x)dx.Zg(x)h0(x)dx=g(x)h(x)-Zg0(x)h(x)dx.Zudv=uv-Zv du.1
##### We have textbook solutions for you!
The document you are viewing contains questions related to this textbook.
The document you are viewing contains questions related to this textbook.
Chapter 6 / Exercise 48
Intermediate Algebra
Tussy/Gustafson
Expert Verified
2CHAPTER 1.INTEGRATION TECHNIQUES1.2.2ExampleConsider the following technique calledintegration by parts. RememberEquation 1Rudv=uv-Rvdu.ZxexdxZxexdx=Zxexdxu=xdv=exdxdu=dxv=ex=xex-Zexdx=xex-ex+C.1.2.3PracticeUse integration by parts to find the following anti-derivatives.1.Zxsinx dx2.Zx2sinx dx3.Zxlnx dx4.Zlnx dx5. Complete the WebAssign problems.1.2.4ExampleThe practice problems required using integration by parts in different ways. The following examples demonstratesanother use of this technique.Zexsinx dx=Zexsinx dxu=exdv=sinx dxdu=exdxv=-cosx=ex(-cosx)-Z-cosxexdx=-excosx+Zexcosx dxu=exdv=cosx dxdu=exdxv=sinx=-excosx+exsinx-Zsinxexdx=-excosx+exsinx-Zexsinx dx.
1.3.INTEGRATION OF TRIGONOMETRIC FUNCTIONS3Compare the remaining integral on the right to the original integral on the left of the equation.Zexsinx dx=-excosx+exsinx-Zexsinx dx.Glob=Zexsinx dx.Glob=-excosx+exsinx-Glob.2Glob=-excosx+exsinx.Glob=12(-excosx+exsinx).Zexsinx dx=12(-excosx+exsinx) +C.1.2.5PracticeFind the following anti-derivatives. Try using integration by parts and another method.1.Zexsinx dx2.Zexsinhx dx3. How many types of problems like this exist?4. Complete the WebAssign problems.1.3Integration of Trigonometric Functions1.3.1MotivationIntegrateRsin2ycosy dyIntegrateRcos57θsinθ dθ.Note that both were easy to integrate using a u-substitution.Note thatRsin2ycos3y dycannot be directly integrated using a u-substitution.Identities, however, can be used to convert such products of trigonometric functions into a u-substitution form.


text:
CType Function (Visual Basic)

Returns the result of explicitly converting an expression to a specified data type, object, structure, class, or interface.

Syntax

CType(expression, typename)

Parts

expression Any valid expression. If the value of expression is outside the range allowed by typename, Visual Basic throws an exception.

typename Any expression that is legal within an As clause in a Dim statement, that is, the name of any data type, object, structure, class, or interface.

Remarks

Tip

You can also use the following functions to perform a type conversion:

• Type conversion functions such as CByte, CDbl, and CInt that perform a conversion to a specific data type. For more information, see Type Conversion Functions.
• DirectCast Operator or TryCast Operator. These operators require that one type inherit from or implement the other type. They can provide somewhat better performance than CType when converting to and from the Object data type.

CType is compiled inline, which means that the conversion code is part of the code that evaluates the expression. In some cases, the code runs faster because no procedures are called to perform the conversion.

If no conversion is defined from expression to typename (for example, from Integer to Date), Visual Basic displays a compile-time error message.

If a conversion fails at run time, the appropriate exception is thrown. If a narrowing conversion fails, an OverflowException is the most common result. If the conversion is undefined, an InvalidCastException in thrown. For example, this can happen if expression is of type Object and its run-time type has no conversion to typename.

If the data type of expression or typename is a class or structure you've defined, you can define CType on that class or structure as a conversion operator. This makes CType act as an overloaded operator. If you do this, you can control the behavior of conversions to and from your class or structure, including the exceptions that can be thrown.

The CType operator can also be overloaded on a class or structure defined outside your code. If your code converts to or from such a class or structure, be sure you understand the behavior of its CType operator. For more information, see Operator Procedures.

Converting Dynamic Objects

Type conversions of dynamic objects are performed by user-defined dynamic conversions that use the TryConvert or BindConvert methods. If you're working with dynamic objects, use the CTypeDynamic method to convert the dynamic object.

Example

The following example uses the CType function to convert an expression to the Single data type.

Dim testNumber As Long = 1000
' The following line of code sets testNewType to 1000.0.
Dim testNewType As Single = CType(testNumber, Single)

For additional examples, see Implicit and Explicit Conversions.


text:
# Harmonic motion

1. Apr 15, 2005

### ness9660

Im really not sure how to solve this. For the oscillations themself the angular frequency is w=sqrt(k/m)? Although this is not going to be the angular frequency of the cylinder. Im looking through my book and all my notes, I really cant figure out how to relate the angular frequency of the wheel to the oscillations.

for this problem Ive been trying to use w=sqrt((m*g*d)/I).
Im not sure if Im on the right track, as Im not sure what to use for d and Im still trying to calculate the moment of inertia. Am I correct in assuming that I is the sum of the moments of inertia on each side of the axis? So that you would have I =(1/2)(9.7)(1.326^2) + (1/2)(9.7)(2.57^2)?

thanks for any help.

2. Apr 15, 2005

### learningphysics

For a simple spring oscillator we can derive the frequency from the energy equation:

$$E=\frac{1}{2}kx^2 + \frac{1}{2}mv^2$$

This equation leads to a frequency of $$\sqrt{\frac{k}{m}}$$

Try to find a similar equation for total energy of your cylinder oscillator.... you have the energy stored in the spring... the translational kinetic energy of the cylinder.... and the rotational kinetic energy of the cylinder. When you get the equation in the same form as the above equation.... you should be able to get frequency.

Hint: what is the relationship between w (angular velocity) and v (linear velocity) when the cylinder does not slip.


text:
# How do you simplify  (2+sqrt(x)) / (sqrt(2 x)+sqrt(8)) ?

$\sqrt{2}$

#### Explanation:

When working a problem such as this, keep in mind that if we take something (like our denominator) that has the form of $a + b$, we can multiply by $a - b$ and we'll end up with ${a}^{2} - {b}^{2}$. And so:

$\frac{2 + \sqrt{x}}{\sqrt{2 x} + \sqrt{8}} \left(1\right)$

$\frac{2 + \sqrt{x}}{\sqrt{2 x} + \sqrt{8}} \left(\frac{\sqrt{2 x} - \sqrt{8}}{\sqrt{2 x} - \sqrt{8}}\right)$

$\frac{\left(2 + \sqrt{x}\right) \left(\sqrt{2 x} - \sqrt{8}\right)}{\left(\sqrt{2 x} + \sqrt{8}\right) \left(\sqrt{2 x} - \sqrt{8}\right)}$

$\frac{2 \sqrt{2 x} - 2 \sqrt{8} + \sqrt{x} \sqrt{2 x} - \sqrt{x} \sqrt{8}}{2 x - 8}$

Now for some simplification in the numerator. Remember that $\sqrt{8} = 2 \sqrt{2}$:

$\frac{2 \sqrt{2 x} - 2 \left(2 \sqrt{2}\right) + \sqrt{2 {x}^{2}} - 2 \sqrt{2 x}}{2 x - 8}$

$\frac{- 4 \sqrt{2} + x \sqrt{2}}{2 x - 8}$

$\frac{\sqrt{2} \left(x - 4\right)}{2 \left(x - 4\right)}$

$\frac{\sqrt{2}}{2}$

Remember that ${\left(\pm \sqrt{2}\right)}^{2} = 2$

$\frac{\sqrt{2}}{\sqrt{2}} ^ 2 = \sqrt{2}$

and

$\frac{\sqrt{2}}{- \sqrt{2}} ^ 2 = \sqrt{2}$

Jul 2, 2018

$\frac{\sqrt{2}}{2} = \frac{1}{\sqrt{2}}$

#### Explanation:

Given: $\frac{2 + \sqrt{x}}{\sqrt{2 x} + \sqrt{8}}$

Multiply both the numerator and the denominator by the conjugate of the denominator, which is basically multiplying the expression by $1$.

The conjugate is a factor that when multiplied, cancels the middle term. The conjugate of $\sqrt{2 x} + \sqrt{8}$ is $\sqrt{2 x} - \sqrt{8} .$

$\frac{2 + \sqrt{x}}{\sqrt{2 x} + \sqrt{8}} \cdot \frac{\sqrt{2 x} - \sqrt{8}}{\sqrt{2 x} - \sqrt{8}}$

$= \frac{2 \sqrt{2 x} - 2 \sqrt{8} + \sqrt{x} \sqrt{2 x} - \sqrt{x} \sqrt{8}}{\sqrt{2 x} \sqrt{2 x} - \sqrt{8} \sqrt{8}}$

Use the Radical rules: sqrt(a)sqrt(b) = sqrt(ab); " "sqrt(x)sqrt(x) = sqrt(x^2) = x

Simplify $\sqrt{8} : \text{ } \sqrt{8} = \sqrt{4 \cdot 2} = \sqrt{4} \sqrt{2} = 2 \sqrt{2}$

$= \frac{\cancel{2 \sqrt{2 x}} - 2 \cdot 2 \sqrt{2} + x \sqrt{2} \cancel{- 2 \sqrt{2 x}}}{\sqrt{4 {x}^{2}} - \sqrt{64}}$

$= \frac{- 4 \sqrt{2} + x \sqrt{2}}{2 x - 8} = \frac{x \sqrt{2} - 4 \sqrt{2}}{2 x - 8}$

Factor: $\text{ } \frac{\sqrt{2} \cancel{x - 4}}{2 \cancel{x - 4}}$

$\frac{2 + \sqrt{x}}{\sqrt{2 x} + \sqrt{8}} = \frac{\sqrt{2}}{2}$


text: Title Electronic properties of triangular and hexagonal $MoS_{2}$ quantum dots Author Pavlović, S. Peeters, F.M. Faculty/Department Faculty of Sciences. Physics Publication type article Publication 2015 Lancaster, Pa , 2015 Subject Physics Source (journal) Physical review : B : condensed matter and materials physics. - Lancaster, Pa, 1998 - 2015 Volume/pages 91(2015) :15 , 7 p. ISSN 1098-0121 1550-235X 1098-0121 Article Reference 155410 Carrier E-only publicatie Target language English (eng) Full text (Publishers DOI) Affiliation University of Antwerp Abstract Using the tight-binding approach, we calculate the electronic structure of triangular and hexagonal MoS2 quantum dots. Due to the orbital asymmetry we show that it is possible to form quantum dots with the same shape but having different electronic properties. The electronic states of triangular and hexagonal quantum dots are explored, as well as the local and total density of states and the convergence towards the bulk spectrum with dot size is investigated. Our calculations show that: (1) edge states appear in the band gap, (2) that there are a larger number of electronic states in the conduction band as compared to the valence band, and (3) the relative number of edge states decreases with increasing dot size. E-info http://gateway.webofknowledge.com/gateway/Gateway.cgi?GWVersion=2&SrcApp=PARTNER_APP&SrcAuth=LinksAMR&KeyUT=WOS:000352591200005&DestLinkType=RelatedRecords&DestApp=ALL_WOS&UsrCustomerID=ef845e08c439e550330acc77c7d2d848 http://gateway.webofknowledge.com/gateway/Gateway.cgi?GWVersion=2&SrcApp=PARTNER_APP&SrcAuth=LinksAMR&KeyUT=WOS:000352591200005&DestLinkType=FullRecord&DestApp=ALL_WOS&UsrCustomerID=ef845e08c439e550330acc77c7d2d848 http://gateway.webofknowledge.com/gateway/Gateway.cgi?GWVersion=2&SrcApp=PARTNER_APP&SrcAuth=LinksAMR&KeyUT=WOS:000352591200005&DestLinkType=CitingArticles&DestApp=ALL_WOS&UsrCustomerID=ef845e08c439e550330acc77c7d2d848 Full text (open access) https://repository.uantwerpen.be/docman/irua/7ec667/132516.pdf Handle


text:
# New lines and TeX: difference between ^^J and ^^M

What is a new line for TeX in the following contexts:

1. When reading from a file.
2. When writing to a file.
3. After having read a % character.
4. In a \scantokens.

I am asking in particular because the following code only typesets A:

\documentclass{minimal}
\begin{document}
\catcode\%=12
\def\foo{\scantokens{A%

B}}
\show\foo
\catcode\%=14
\foo
\end{document}

So my main question is: how does % know where to stop gobbling characters?

\catcode\^^M=12
\newlinechar\^^M

before the definition of \foo is instructive: then the definition actually contains new-lines, and the comment stops gobbling where we expect.

EDIT2: pdflatex sets \newlinechar\^^J and \endlinechar\^^M (see Harald's concise answer below for what these are).

• Re you edit: Yep. The e-TeX manual says, "In particular every occurrence of the current newline character is interpreted as start of a new line, and input characters will be converted into tokens as usual." So that takes care of \scantokens. Changing the catcode deals with the tokenization of the replacement text of \foo. – TH. Jan 17 '11 at 13:28
• @TH.: thank you for your longer explanation: I accepted Harald's answer rather than yours because I think that it will be more directly useful to other people wanting a quick answer. The two complement each other quite well. – Bruno Le Floch Jan 17 '11 at 16:40

1. I think that what constitutes the end of line upon reading from a file is hardcoded according to whatever operating system you are running on. And that end of line is represented by the character whose number is \endlinechar.
2. When writing, the character whose number is \newlinechar will trigger the end of a line. Again, the exact result in the output file is hard coded, depending on your operating system.
3. See #1.
4. Usually, the argument to \scantokens is treated as a single line. Thus a percent sign in the argument to \scantokens will end input from this argument. However, any occurrences of the character whose number is \newlinechar will be used to split the argument into several lines.

To bring all these ideas together, consider the plain TeX file

\newlinechar=2
{\catcode\%=12
\gdef\foo{\scantokens{abc%xyz^^Bdef}}}%
\endlinechar=X
\foo%
\bye%

which will typeset the text “abcdefX” .

(Edited to take into account what I learned about #4 from the comments.)

• It's not that \scantokens treats its input as a single line, it's the \def that removed the new lines (which makes sense because it tokenized them). – TH. Jan 14 '11 at 21:00
• @TH: I suppose you could put it that way. The way I see it, the point is that there is no token that corresponds to a newline. A person might naïvely think that \endlinechar would be that token, but you can put one in the middle of an input line (usually as ^^M), so that's not it. – Harald Hanche-Olsen Jan 14 '11 at 21:09
• @Harald: Actually, when TeX encounters any character of cat code 5 (end of line), it throws away the rest of its buffer and does the normal stuff it does when it encounters that character (which depends on it being in state N, M, or S; see my blog post about this). – TH. Jan 14 '11 at 22:08
• Ah, I had forgotten all about catcode 5. It must be because I have never seen a use for it. – Harald Hanche-Olsen Jan 14 '11 at 22:37
• @Harald: I realized that setting \catcode\^^M=12 \newlinechar\^^M before the definition works: then \scantokens sees its argument as several lines. – Bruno Le Floch Jan 17 '11 at 12:55

What happens here is that when the definition for \foo is being parsed, it's identical to

\def\foo{\scantokens{A%\par B}}

Now when \scantokens executes, it's as if it read the line

A%\par B

from a file with the current catcodes in effect. Since you reset % to be a comment, the \par B is ignored.

For your other questions, individual installations of TeX can determine what is treated as a new line when reading and writing files. If I recall correctly, \n, \r, \r\n, and \n\r are treated as a newline for the purposes of input, at least that's what I recall from reading through the source for pdfTeX recently. For output, (i.e., writing files), I suspect it uses \n on *NIX and \r\n on Windows, but I haven't verified this.

After TeX reads a line of text from an input file—and before it begins to tokenize it—it removes all trailing space characters including \r and \n and appends the \endlinechar character which is normally ^^M (i.e., \r). This happens regardless of there being a % character in the line. When TeX encounters a % character in its input (note that there is no comment token), it ignores the rest of the line, including the trailing \r.

As far as I know, ^^J (i.e., \n) is not special in most contexts except it is often used as the \newlinechar for use in \write.

I forgot \scantokens. It is really treated like lines of input from a file, including the \endlinechar at the end of each. For a simple example of this, try

\endlinecharX %
\scantokens{A}%
\bye%

(The space after the X is necessary because TeX looks for an optional space there.) Every line ends with a percent and yet the output shows AX because \scantokens has inserted that character.

• Actually, TeX does not insert the \endlinechar if there was a comment character on the line. Neither does \scantokens, if there is one in its argument. – Harald Hanche-Olsen Jan 14 '11 at 21:25
• @Harald: TeX can't know if there is a comment in the line until it tokenizes the line. Consider \def\foo{\catcodeX14 } and then on the next line \foo This has a comment. X this isn't shown. You can see this in tex.web. Look for else buffer[limit]:=end_line_char; – TH. Jan 14 '11 at 22:06
• @TH: Yes, but how does that support your claim that TeX inserts an \endlinechar character at the end of a line even if there is a comment on the line? A simple experiment reveals that this is not so. – Harald Hanche-Olsen Jan 14 '11 at 22:22
• @Harald: It supports my claim because the code shows that it happens! Of course it doesn't appear in the output because TeX throws away the rest of the buffer, including the \endlinechar, when it encounters the comment. Maybe changing my example will make this more clear: \def\foo{\catcode\%12 }\endlinechar"5a and on the next line: \foo %This line contains no comment. If TeX did not insert the \endlinechar in lines that had comment characters at the time the line was read, there would be no Z at the end of the output line. – TH. Jan 14 '11 at 22:34
• Bah. Markdown ate my first backtick. Make that \def\foo{\catcode"25 12 }\endlinechar"5a` – TH. Jan 14 '11 at 22:36


text:
### Home > INT3 > Chapter 2 > Lesson 2.2.2 > Problem2-61

2-61.

Use the definition of $i$ to rewrite each of the following expressions. Homework Help ✎

1. $\sqrt { - 25 }$

$\sqrt{-25}=\sqrt{25(-1)}=\sqrt{25i^{2}}=5i$

1. $\sqrt { - 32 }$

Use the same method as (a).

1. $(3+2i)(5-3i)$

Multiply as you would any two binomials.

$15+i-6i^2=21+i$

1. $(3+2i)+(5-3i)$

Combine like terms.


text:
# NLopt Matlab Reference

The NLopt includes interfaces callable from the Matlab and GNU Octave (a free-software Matlab-like program), using identical syntax.

The main purpose of this section is to document the syntax and unique features of the Matlab API; for more detail on the underlying features, please refer to the C documentation in the NLopt Reference.

## Using the NLopt Matlab API

On Unix, the Matlab and Octave interfaces should automatically be installed in places where they will be found at runtime, assuming you have Matlab and Octave correctly installed on your machine, as documented in the Installation manual.

On Windows, we provide a precompiled the NLopt library, which includes a matlab directory. Using this or your own compiled version, you can then download nlopt-optimize-mex.c file, rename it to nlopt-optimize.c, and compile it into a MEX file callable from Matlab — the result must be put into your Matlab path or your working directory. You will also want to copy the the .m files (mostly implementing constants and documentation) from the src/octave directory of the NLopt release and put it into the same directory as the MEX file.

## The opt structure

The NLopt API revolves around an Matlab structure, analogous to the nlopt_opt object in C and similar objects in NLopt's interfaces for other languages. All of the parameters of the optimization are specified (dimensions, algorithm, stopping criteria, constraints, objective function, etcetera) simply by assigning fields to this structure, and then one finally calls the nlopt_optimize(opt) function in order to perform the optimization. Every opt structure should specify the algorithm, via:

opt.algorithm =algorithm

given an algorithm (see NLopt Algorithms for possible values) and the dimensionality of the problem (n, the number of optimization parameters). Just as in C, algorithms are specified by predefined constants of the form NLOPT_MMA, NLOPT_COBYLA, etcetera.

You need not set all the fields of the structure; any fields that are not specified take on innocuous default values (the same as if you did not specify those parameters in the C interface).

The dimension n of the problem (the number of optimization parameters) is determined implicitly by the length of the vector you pass to nlopt_optimize as the initial guess. An error will occur if you use vectors of inconsistent lengths (e.g. you set opt.lower_bounds to be a different length).

## Objective function

The objective function is specified setting either the opt.min_objective or opt.max_objective field to a function handle for the objective function f, depending on whether one wishes to minimize or maximize f, respectively. The function f should be of the form:

function [val, gradient] = myfunc(x)

val =...value of f(x)...

   if (nargout > 1)

gradient =...gradient at x...

   end

The first return value should be the value of the function at the point x, where x row or column vector of the n of the n optimization parameters (the same length as the initial guess passed to nlopt_optimize). (Whether x is a row or column vector depends on whether the initial guess you pass to nlopt_optimize is a row or column vector, respectively.)

In addition, if the caller requests two return values (nargout > 1), then the second return value gradient should be a vector (row or column) of length n that is the gradient of the function with respect to the optimization parameters at x. That is, grad(i) should upon return contain the partial derivative $\partial f / \partial x_i$, for $1 < i \leq n$. Not all of the optimization algorithms (below) use the gradient information: for algorithms listed as "derivative-free," the nargout will always be 1 and the gradient need never be computed.

If your objective function returns NaN (nan in Matlab), that will force the optimization to terminate, equivalent to calling nlopt_force_stop in C.

## Bound constraints

The bound constraints can be specified by setting opt.lower_bounds and/or opt.upper_bounds to vectors of length n (the same as the length of the initial guess passed to nlopt_optimize).

To specify an unbounded dimension, you can use ±inf in Matlab to specify ±∞.

## Nonlinear constraints

Just as for nonlinear constraints in C, you can specify nonlinear inequality and equality constraints by setting opt.fc and opt.h to be cell arrays of function handles (of the same form as the objective function above) for the inequality and equality constraints, respectively.

Recall that a cell array is specified via {...} in Matlab, e.g. { @constraint1, @constraint2 }.

Optionally, you can specify a tolerance in judging feasibility for the purposes of stopping the optimization, as in C. Tolerances are specified as fields opt.fc_tol and opt.h_tol, which (if they are set) should be vectors (not cell arrays) of tolerances, of the same lengths as opt.fc and opt.h, respectively. (If they are not specified, the tolerances default to zero.)

## Stopping criteria

As explained in the C API Reference and the Introduction), you have multiple options for different stopping criteria that you can specify. (Unspecified stopping criteria are disabled; i.e., they have innocuous defaults.) The various stopping criteria can be specified via the following fields of your structure.

opt.stopval

Stop when an objective value of at least stopval is found.

opt.ftol_rel

Set relative tolerance on function value.

opt.ftol_abs

Set absolute tolerance on function value.

opt.xtol_rel

Set relative tolerance on optimization parameters.

opt.x_weights

Set the weights used when the computing L₁ norm for the xtol_rel stopping criterion above. The opt.x_weights value must be a vector of length n (the same length as the initial guess passed to nlopt_optimize).

opt.xtol_abs

Set absolute tolerances on optimization parameters. The opt.xtol_abs value must be a vector of length n (the same length as the initial guess passed to nlopt_optimize) of the tolerances.

opt.maxeval

Stop when the number of function evaluations exceeds maxeval. (0 or negative for no limit.) An integer.

opt.maxtime

Stop when the optimization time (in seconds) exceeds maxtime. (0 or negative for no limit.)

## Performing the optimization

Once all of the desired optimization parameters have been specified in a given structure opt, you can perform the optimization by calling:

[xopt, fmin, retcode] = nlopt_optimize(opt, x);

On input, x is a vector (row or column) of length n (this specifies the dimension of the problem, and must be consistent with vectors you use elsewhere as mentioned above) giving an initial guess for the optimization parameters. The return value xopt is a vector (row or column, same as x) containing the optimized values of the optimization parameters.

The second return value fmin is the optimized value of the objective function, and the third value is a return code (negative on failure and positive on success).

## Local/subsidiary optimization algorithm

Some of the algorithms, especially MLSL and AUGLAG, use a different optimization algorithm as a subroutine, typically for local optimization. You can change the local search algorithm and its tolerances by setting the opt.local_optimizer field to another optimization structure.

For example, opt.local_optimizer.algorithm = NLOPT_LN_BOBYQA; opt.local_optimizer.ftol_rel = 1e-4 will set the local optimizer to use BOBYQA and a relative function tolerance of 1e-4.

The fields of opt.local_optimizer are used to determine the local search algorithm, its stopping criteria, and other algorithm parameters. (However, the objective function, bounds, and nonlinear-constraint parameters of opt.local_optimizer are ignored.)

## Initial step size

Just as in the C API, you can get and set the initial step sizes for derivative-free optimization algorithms. In Matlab, you set the opt.initial_step field to a vector of the (nonzero) initial steps for each dimension.

## Stochastic population

Just as in the C API, you can get and set the initial population for stochastic optimization algorithms, by setting opt.population to an (integer) initial population. (An opt.population of zero implies that the heuristic default will be used.)

## Vector storage for limited-memory quasi-Newton algorithms

Just as in the C API, you can set the number M of stored vectors for limited-memory quasi-Newton algorithms, via:

opt.vector_storage

(The default is 0, in which case NLopt uses a heuristic nonzero value.)

## Verbose output

If you set opt.verbose to 1, the Matlab interface will output information as the optimization progresses, such as the objective function values.

Of course, your objective function and constraints can also output anything you wish, using disp and similar Matlab functions.


text:
# Identifier Naming Convention

In this article, we present the identifier naming convention used in a growing portion of our How-To articles. It is presented as a motivated choice; we share the considerations that lead us to making this choice. Perhaps these considerations will help you to make an informed choice for the identifier naming convention you want to use (if any). Perhaps it even convinces you to follow the same convention.

## The purpose of a naming convention

Decision Support applications are based on models. As you know, such models are a description of selected portions of reality. Nobody seriously disputes that having clear and descriptive identifier names help relating the models to the reality being modeled.

There are several use cases for developing with AIMMS:

1. The first use case of the AIMMS language is to formulate models for Decision Support applications.

2. A second second use case of the AIMMS language is to create generic libraries, for instance the libraries as presented in the AIMMS library repository.

Particular to Decision Support applications are constraint definitions. Consider the following simple equality:

$p {\ } q = r$

where:

symbol

interpretation

$$p$$

price

$$q$$

quantity

$$r$$

return

When values for two of these symbols are known, then the value for the third symbol follows, barring special cases such as $$p=0 \wedge r\neq 0$$.

The impact of such an equation for the complexity of the model depends on whether values are already known for the symbols or not. To be concrete:

1. when the value of $$p$$ is fixed, the equation becomes a linear equation. When all other constraints in the model are also linear, the total model is linear.

2. when the value of all three symbols are not known, the equation becomes a quadratic equation. When all other constraints in the model are linear, the model is still a quadratic model.

The complexity of the model (linear, quadratic, non-linear, with or without integrality restrictions), in turn, determines which solution algorithm can be used to solve the mathematical problem that is inside the model.

In other words, as a model builder, inspecting and analyzing a model, you will need to understand which of symbols used in the constraints are:

1. So-called knowns; values for these symbols are not determined by the solution algorithm but are directly, or indirectly, provided by an external source. Such symbols are usually called ‘data’ or ‘parameters’ in the operations research literature. In economic literature, these symbols correspond to so-called exogenous variables. These knowns are called parameters in the AIMMS language.

2. So-called unknowns; values for these symbols are determined by the solution algorithm. They typically correspond to the decisions made by the decision-maker. Such symbols are usually called decision variables in the operations research literature or variables for short. In economic literature, these correspond to so-called endogenous variables. These unknowns are called variables in the AIMMS language.

## Distinguishing parameters and variables

The classical approach is to use prefixes. More modern approaches rely on the development environment to make such a distinction, for instance by:

• Hovering: hovering over an identifier shows a tooltip with typing and other detail about the identifier.

• Syntax coloring: color an identifier based on its type, see also Type based syntax coloring which provides a tasteful coloring scheme distinguishing parameters (darkcyan) from variables (palevioletred).

These two modern approaches are supported by the AIMMS IDE. However, AIMMS models are not only presented in the AIMMS IDE, they are also part of other documentation for instance these How-To articles, in educational material, and in technical reports about the applications.

Note that the IDE approach and the prefixing approach to distinguish between parameters and variables do not exclude each other, they complement each other.

### Other naming conventions in practice

There are various alternatives:

1. camelCase An identifier is named starting with a lower case letter, and if several words are used, each subsequent word is started with a capital. for instance priceIncrease.

2. PascalCase A variation whereby the first word starts with a capital, for instance PriceIncrease

3. snake_case Words are same case (mostly lower case) and separated by _, for instance price_increase

There is no commonly accepted best way to present concepts in the real world as identifier names in a model.

## Identifier parts and their purpose

As discussed, there are two parts of an identifier name, and these two parts have a rather different purpose:

1. The prefix: The purpose is to present the type, especially when it is a parameter or a variable.

2. The base: The purpose is to communicate the interpretation in the modeled world.

## Our choice

In view of the considerations above, the following choice is made for AIMMS identifiers that are used in How-To articles:

Consider the example p_priceIncrease:

1. The prefix is the p indicating that this identifier is a parameter. The prefixes are in lower case.

2. The base is priceIncrease, indicating that this is a change in price in the modelled world. The base is presented in camelCase.

3. Because of the difference in purpose, the prefix is visually separated from the base by an _.

### Prefixes used

The prefixes encouraged are enumerated in the table below:

prefix

identifier type

s

set

h

horizon

cal

calendar

i

index

p

parameter

bp

binary parameter

ep

element parameter

sp

string parameter

up

unit parameter

v

variable

ev

element variable

bv

binary variable

cv

complementarity variable

c

constraint

uc

uncertainty constraint

n

node

a

arc

as

assertion

ac

activity

r

resource

mp

mathematical program

m

macro

qnt

quantity

cnv

convention

f

file

db

database

dbpr

database procedure

pr

procedure

fnc

function

epr

external procedure

efnc

external function


text:
Courses
Courses for Kids
Free study material
Free LIVE classes
More

# In an AP, if the common difference (d) is -4 and the seventh term $\left( {{a_7}} \right)$ is 4, then find the first term.

Last updated date: 18th Mar 2023
Total views: 308.1k
Views today: 4.87k
Hint- Use the concept that any ${n^{th}}$ term of an AP is written as ${a_n} = a + (n - 1)d$
Given that in an A.P the common difference $d = - 4$ and the seventh term ${a_7} = 4$
Let a be the first term of the A.P and ${a_n}$be the ${n^{th}}$term of the A.P such that ${a_n} = a + (n - 1)d$
So the seventh term of the A.P that is ${a_7}$ can be written as
${a_7} = a + (7 - 1)d$
$4 = a + (7 - 1)( - 4) \\ \Rightarrow 4 = a - 24 \\ \Rightarrow a = 28 \\$
Thus the first term of the A.P is $a = 28$
Note- Whenever we face such types of problems the key concept involved is to simplify the general formula of ${n^{th}}$ term of an A.P series. This will help you reach the right answer.


text:
# Can Animation Nodes extract data from dupli-instances?

By dupli-instances I mean dupli(verts/faces/particles/frames). I was thinking that once vertex snapping is working with duplies in 3d viewport, then you can somehow extract vertex location and poly's in Animation Nodes, like from normal mesh.

Is it possible or not?

I don't think the API provides such access. However, it is very easy to generate this information yourself based on the data already given by blender. For instance, vertex dupli-instances data can be generated as follows:

Similarly, we can do that for polygons, edges, particles, and frames.

• Thanks for the answer! I don't see Transform Mesh in my AN 2.1 of 2.79 Blender in Mesh section, only via search bar (moreover there is no "Join Meshes" option?). I assume this node is like "Instancer", but joins all meshes in one object with this checkbox checked? – Serge L Jan 2 '19 at 19:37
• @SergeL Not all nodes are available through menus, it will probably be added to the menu soon. The Join Meshes option appears when the input matrices are a list. Yes, when your input transformation is a list, it works like this. – Omar Emara Jan 2 '19 at 19:50


text:
# Reduction to single higher-order linear ODE

• June 30th 2012, 06:53 PM
fractal5
Reduction to single higher-order linear ODE
I need to reduce the following system to a single higher-order linear ODE for y

x'(t) - y'(t) + z(t) = 0
x(t) + y'(t) - z'(t) = 1
y(t) + z'(t) = t3- 1

I've tried setting ( z = y' - x' ) & (x = 1 - y' - z')
However on substituting these it ends up as a big mess and I can't go anywhere. Could you someone tell me what substitution or technique I should use to work this problem?

Thanks.
• July 1st 2012, 03:39 AM
BobP
Re: Reduction to single higher-order linear ODE
Can get you to a cubic, don't know if it's possible to do better

Differentiate eq(1), $x'' - y''+z'=0$ and substitute from eq(3), $x''-y''+(t^{3}-1-y)=0..........(4)$

Substitute for $z'$ in eq(2) also, $x+y'-(t^{3}-1-y)=1...........(5).$

Now differentiate $(5)$ twice and then subtract $(4)$ to eliminate the $x''$ term.

Note that you lose information during this process though, The 1 on the RHS of the second equation differentiates out and so could be any number at all.
• July 1st 2012, 09:55 AM
fractal5
Re: Reduction to single higher-order linear ODE
Yes that works, thanks a lot. I can't see a way of keeping the "1" unless I integrate the first equation and sub x(t) in the second. But I don't think that's possible. I believe this answer is sufficient. Thanks again :)


text:
# Why does a monopole operator break the global symmetry with topological current?

I am currently reading the paper "A Duality Web in 2+ 1 Dimensions and Condensed Matter Physics" by Seiberg et al, and on page 22 they add to the Lagrangian a monopole operator of the form $\phi^{\dagger}\mathcal{M}_{\hat b}$. Firstly, is it perhaps a typo that the $\phi$ is unhatted? Should it be hatted so that it is charged under U(1)$_\hat b$ ? Secondly, how exactly does this operator break the global symmetry whose current is the topological current $d\hat b$? I have been trying to understand this under the light of "Generalized Global Symmetries", and if I understand correctly, this would constitute a 1-form global symmetry. However, I could not find in that paper a section which would explain why a monopole of this form would break the symmetry. I would be very grateful if someone could shed a little bit of light on this for me. Thank you!

Gauge theories are often equipped with higher form "electric" and "magnetic" global symmetries. Coupling such theories to electrically or magnetically charged sources explicitly breaks the corresponding symmetry (either partially or completely).

Let me first review how this works for the more familiar case of $\mathrm{U}(1)$ gauge theories in 4d. So consider a 1-form abelian gauge field $A$ with field strength $F=\mathrm{d}A$ on a 4-manifold $M$. Start with the pure gauge theory, with action

$$S \propto \int_M F \wedge \star F.$$

(We don't actually need to talk about an action, but it can make things more transparent in simple examples.) The equation of motion and Bianchi identity say that

$$\mathrm{d} \star F = 0 \quad\text{and}\quad \mathrm{d} F = 0.$$

In the quantum theory, these are operator equations. That means we have two different 2-form conserved currents $j= F$ and $\tilde j = \star F$, which satisfy $\mathrm{d} \star j = \mathrm{d} \star \tilde j=0$. Each of these is a $\mathrm{U}(1)$ 1-form global symmetry, often called "electric" ($\mathrm{U(1)_E}$) and "magnetic" ($\mathrm{U(1)_M}$), respectively. They are called 1-form symmetries because the charged objects, Wilson lines and 't Hooft lines, are supported on 1-manifolds. (Whereas for ordinary 0-form symmetries the charged objects are local operators). You can think of them as the worldlines of probe electric charges and magnetic monopoles. The $\mathrm{U(1)_E}$ and $\mathrm{U(1)_M}$ charges themselves are obtained by integrating $\star j$ and $\star \tilde j$ over 2-spheres that link these lines, $Q = \oint_{S^2} \star F$ and $\tilde Q = \oint_{S^2} F$. Of course, these just measure the electric and magnetic charges of the particle whose worldline they surround.

In these variables, a Wilson line simply takes the form $W_q(C) = e^{iq\oint_C A}$. The electric 1-form symmetry corresponds to the invariance of the action under the shift $A \to A + \lambda$, where $\lambda$ is a flat gauge field $(\mathrm{d}\lambda = 0),$ and clearly $W_q(C)$ transforms under this symmetry. The Wilson line inserts a source in the equation of motion, $\mathrm{d}\star F = q \delta_C$. The 't Hooft line is similarly the holonomy of the dual gauge field $\hat A$, and the magnetic 1-form symmetry would likewise correspond to shifting $\hat A$ by a flat gauge field if we wrote the theory in the dual variables. In terms of the original variables, the 't Hooft operator $H_m(C)$ corresponds to a prescription to delete $C$ from $M$ and demand that $\oint_{S^2} F = 2\pi m$, where $S^2$ is a sphere linking $C$. Equivalently, the 't Hooft operator inserts a source in the Bianchi identity, $\mathrm{d} F = 2\pi m \delta_C$.

So far we have discussed the pure gauge theory. Suppose now we couple it to electrically charged matter (say to a field with charge 1). The charged matter enters the equation of motion as a source, $\mathrm{d} \star F = \star j_E$, and explicitly breaks the electric 1-form symmetry. Similarly, coupling the theory to a monopole operator explicitly breaks the magnetic 1-form symmetry.

Hopefully now you can see the answer to your original question. The authors are considering a 3d theory with abelian gauge fields $b$ and $\hat b$. As ever, in the absence of magnetically charged matter, the Bianchi identities imply the existence of conserved currents $\star \mathrm{d}b$ and $\star \mathrm{d} \hat b$. Note that since we are in three dimensions these are ordinary 0-form global symmetries. So the theory has two $\mathrm{U(1)}$ ordinary global symmetries (both "magnetic" in the language above). Now they couple the theory to a monopole operator for $\hat b$. This introduces a magnetic source in the Bianchi identity for $\mathrm{d}\hat b$, and explicitly breaks the corresponding $\mathrm{U(1)}$ symmetry.

(I don't think $\phi^\dagger \mathcal{M}_{\hat b}$ is a typo. They say that $\mathcal{M}_{\hat b}$ carries charge one under the $b$ gauge symmetry and therefore multiply by $\phi^\dagger$ to make a gauge invariant operator.)


text:
# What is the difference between plasmodium causing malaria and plasmodium mentioned in slime moulds?

Plasmodium that causes malaria is different from plasmodial slime mould.
Plasmodium that causes malaria is parasitic in nature and belongs to phylum protozoa while the plasmodial slime mould was classified long back under fungi because it resembles fungi in many ways. Now it is placed under class myxogastria or myxomycetes of phylum Mycetozoa of kingdom protista.
Plasmodium is a single cell with one nucleus while as plasmodial slime mould consists of bag of cytoplasm with thousnads of nucleus.

• 10

plasmodium causing malaria is a parasitic protozoa whic causes malaria in human whereas the plasmodium mentioned in th slime moulds is there aggregation during there amoeboid stage . its plural form is plasmodia or pseudoplasmodium.

• 3
What are you looking for?