text:
Transformations are a part of life. We are constantly being changed by things changing around us.

--- S. Kassem

Transformations are important mathematical tools for computer graphics. Transforms basically are bijective linear maps (or bijective affine linear maps) from the standard two-dimensional space into itself, describing how points and objects can move from one place to another, or even shrink and grow.

Mathematics teaches us that we can describe linear maps with matrices. The actual transformation is nothing more than a matrix-vector multiplication. While we won't talk much about mathematics, please note that matrix multiplication is not commutative, thus changing the order of operations, whether you first translate and then rotate an object, or first rotate and then translate, does change the outcome.

Matrices are especially suitable for GPU parallelization, thus transforming geometries is often a lot faster than creating new geometries all the time. In this tutorial we will see how each transformation that Direct2D has to offer works in the field.

## Mathematical Basics

Each transformation can be written as an affine linear map (in the standard euclidean space): $\varphi_{A,v} := \mathbb{R}^2 \to \mathbb{R}^2$, $x \mapsto v + L(x)$, where $L$ is a linear map, and can thus be described by a matrix $A \in \mathbb{R}^{2 \times 2}$: $$\varphi_{A,v}(x) = v + A \cdot x.$$

The vector $v$ can be thought of as a translation vector, while the matrix $A$ is responsible for the linear transformations.

To work efficiently in the affine space, we write our two-dimensional vectors as follows: $$v = \begin{pmatrix}x\\y\\1\end{pmatrix}.$$ The first two elements contain the x and y coordinates of the point. The 1 is placed in the third element to make the math work out correctly. (ouch - there will be a real explanation about what is actually happening here in a later more advanced tutorial.)

An affine transformation matrix $A \in \mathbb{R}^{3 \times 2}$ is always of the following form: $$A:=\begin{pmatrix}a&b&0\\c&d&0\\e&f&1\end{pmatrix}.$$ Again, we will cover all the details in a later tutorial.

## Lost in Translation

A translation is, as the name indicates, a geometric transformation that moves every point of a figure or a space by the same distance in a given direction. Translations obviously do not change length or angles.

In affine space, a translation matrix $T \in \mathbb{R}^{3 \times 2}$ can be represented in the following form: $$T := \begin{pmatrix}1&0&t_x\\0&1&t_y\\0&0&1\end{pmatrix},$$where $t_x$ denotes the the amount to translate into the x-direction, and $t_y$ the distance to move along the y-direction.

Direct2D provides a translation matrix, the Matrix3x2F::Translation matrix, the only input being the distance to translate along the x-axis and y-axis.

As an example, let us translate the entire scene from the previous tutorial:

// definition
D2D_MATRIX_3X2_F translationMatrix;

// create translation matrix
translationMatrix = D2D1::Matrix3x2F::Translation(100, 50);

util::Expected<int> DirectXGame::render(double /*farSeer*/)
{
// clear the back buffer and the depth/stencil buffer
...

// translate the entire scene
d2d->devCon->SetTransform(translationMatrix);

// render the scene
d2d->devCon->BeginDraw();

// draw the sun
d2d->devCon->DrawGeometry(sun.Get(), d2d->blackBrush.Get());				// draw the sun flares

// draw the river
d2d->devCon->FillGeometry(river.Get(), d2d->blueBrush.Get());
d2d->devCon->DrawGeometry(river.Get(), d2d->brownBrush.Get(), 2);

// draw mountains
d2d->devCon->FillGeometry(mountains.Get(), d2d->greenBrush.Get());
d2d->devCon->DrawGeometry(mountains.Get(), d2d->brownBrush.Get(), 2);

if(FAILED(d2d->devCon->EndDraw()))
return std::runtime_error("Critical runtime error: Direct2D draw failed!");

// print FPS information
if (!d2d->printFPS(d2d->blackBrush).wasSuccessful())
return std::runtime_error("Failed to print FPS information!");

// update the constant buffers

// set the vertex buffer

// set primitive topology

// draw

// present the scene
if (!d3d->present().wasSuccessful())
return std::runtime_error("Failed to present the scene!");

// return success
return 0;
}

Now let us try to only translate the sun up a bit, we do that by adding an identity translation matrix:

// create translation matrix
translationMatrix = D2D1::Matrix3x2F::Translation(0, -125);

util::Expected<int> DirectXGame::render(double /*farSeer*/)
{
// clear the back buffer and the depth/stencil buffer
...

// render the scene
d2d->devCon->BeginDraw();

// translate the entire scene
d2d->devCon->SetTransform(translationMatrix);

// draw the sun
...

// no translation anymore
d2d->devCon->SetTransform(D2D1::Matrix3x2F::Identity());

// draw the river
...

// draw mountains
...

if(FAILED(d2d->devCon->EndDraw()))
return std::runtime_error("Critical runtime error: Direct2D draw failed!");

// print FPS information
...

// present the scene
...

// return success
return 0;
}

## Scaling

A second type of affine maps in the plane is the so called scaling map, which, obviously, scales everything in a given direction, with respect to a line in another direction (not necessarily perpendicular), combined with a translation that is not purely in the direction of scaling. In a generalized sense, those maps include the cases that the scale factor is zero, which makes it a projection, or negative; the latter includes reflections, and combined with a translation it includes glide reflections.

Scaling around the center point of a figure obviously scales that figure in both directions, if the point of scaling is not the center of a figure, one of the other cases mentioned above occur.

For a scaling map with the fixed point being the centre of the object to scale, the corresponding matrix is always in the following form: $$S:=\begin{pmatrix}s_x&0&0\\0&s_y&0\\0&0&1\end{pmatrix},$$ where $s_x$ defines the scale factor in x-direction and $s_y$ the scaling factor for the y-axis.

Direct2D offers the Matrix3x2F::Scale method to easily create scaling matrices:

static Matrix3x2F Scale(
FLOAT         x,
FLOAT         y,
D2D1_POINT_2F centerPoint = D2D1::Point2F()

The x and y floats define the scale factor for the x-axis and y-axis respectively. The centerPoint is the point around which the scaling is performed.

Let us learn by example again:

// definition
D2D_MATRIX_3X2_F scaleMatrix;

// creation
scaleMatrix = D2D1::Matrix3x2F::Scale(1.5, 1.5, D2D1::Point2F(400, 300));

util::Expected<int> DirectXGame::render(double /*farSeer*/)
{
// clear the back buffer and the depth/stencil buffer
...

// scale the scene
d2d->devCon->SetTransform(scaleMatrix);

// render the scene
...
}

## Rotations

A rotation is a circular movement of an object around a center of rotation, which is fixed under the rotation map.

A rotation matrix around the origin has the following form: $$R:=\begin{pmatrix}a&-b&0\\b&a&0\\0&0&1\end{pmatrix},$$with the condition that $a^2+b^2=1$, or, equivalently: $$R:=\begin{pmatrix}\cos(\varTheta)&-\sin(\varTheta)&0\\sin(\varTheta)&\cos(\varTheta)&0\\0&0&1\end{pmatrix},$$where $\varTheta$ is the rotation angle.

To rotate about an arbitrary point $(x,y)$, one would use the following matrix:
$$R:=\begin{pmatrix}\cos(\varTheta)&-\sin(\varTheta)&x(1-\varTheta)+y(\sin(\varTheta))\\sin(\varTheta)&\cos(\varTheta)&x(-\sin(\varTheta)+y(1-\cos(\varTheta))\\0&0&1\end{pmatrix}.$$

To create rotation matrices in Direct2D, we can use the Matrix3x2F::Rotation method:

static Matrix3x2F Rotation(
FLOAT         angle,
D2D1_POINT_2F centerPoint = D2D1::Point2F()
);

The angle defines the rotation angle in degrees. A positive angle creates a clockwise rotation, and a negative angle creates a counterclockwise rotation.
The centerPoint defines the point about which the rotation is performed.

Let us rotate the scene by 90 degrees around the centre of the screen:

rotate90CW = D2D1::Matrix3x2F::Rotation(90, D2D1::Point2F(400, 300));

util::Expected<int> DirectXGame::render(double /*farSeer*/)
{
// clear the back buffer and the depth/stencil buffer
...

// rotate the scene
d2d->devCon->SetTransform(rotate90CW);

// render the scene
...
}

## Shearing

A shear mapping is an affine linear map that displaces each point in a fixed direction, by an amount proportional to its signed distance from a line that is parallel to that direction.

Applying a shear map to a set of points of the plane will change all angles between them, except for straight angles, and the length of any line segment that is not parallel to the direction of displacement. Therefore it will usually distort the shape of a geometric figure, for example turning squares into non-square parallelograms, and circles into ellipses.

However shearing does preserve the area of geometric figures and the alignment and relative distances of collinear points.

To create a shear matrix, Direct2D offers the Matrix3x2F::Screw method:

static Matrix3x2F Skew(
FLOAT         angleX,
FLOAT         angleY,
D2D1_POINT_2F centerPoint = D2D1::Point2F()
);

The angle parameters define the x-axis and y-axis skew or shear angles. Both angles are measued in degrees; the x-axis angle counterclockwise from the y-axis and the y-axis angle is clockwise from the x-axis. The centerPoint is the point about which the shearing is done.

Thus, setting angleX to 30 degrees would shear the object counterclockwise away from the y-axis, which will appear as a distortion of the object toward the positive direction of the x-axis.

Let us try this out and shear the entire scene:

// definition
D2D_MATRIX_3X2_F skewMatrix;

// creation
skewMatrix = D2D1::Matrix3x2F::Skew(45, 0); // centre being the origin of the screen

util::Expected<int> DirectXGame::render(double /*farSeer*/)
{
// clear the back buffer and the depth/stencil buffer
...

// render the scene
d2d->devCon->BeginDraw();

// skew the river
d2d->devCon->SetTransform(skewMatrix);

...
}

## Transforming Geometries

I created a few standard transformations in the Direct2D class to have easy access to the most useful transformation maps.

So far we have set the transformations to apply to the entire render target, now we want to learn how to transform single geometries, as now that we know how the transformations that Direct2D offers us actually work, we can have another look at the primitive unit geometries we created in the previous tutorial. Those unit geometries are enough to create any cube, rectangle, parallelogram, circle or ellipse that we want, by simply transforming them as desired.

The problem is that geometries are immutable, thus there is no SetTransform method available for them. We actually have to create a new, transformed geometry using the ID2D1TransformedGeometry interface.

To create an ID2D1TransformedGeometry, we call the ID2D1Factory::CreateTransformedGeometry method:

virtual HRESULT CreateTransformedGeometry(
[in]                 ID2D1Geometry            *sourceGeometry,
[in, optional] const D2D1_MATRIX_3X2_F        *transform,
[out]                ID2D1TransformedGeometry **transformedGeometry
) = 0;

#### ID2D1Geometry *sourceGeometry

The source geometry to transform.

#### const D2D1_MATRIX_3X2_F *transform

The transformation to apply to the source geometry.

#### ID2D1TransformedGeometry **transformedGeometry

When this method returns, this parameter contains the address of the pointer to the new transformed geometry object.

Please note that Like other resources, a transformed geometry inherits the resource space and threading policy of the factory that created it. The new geometry is as immutable as the source geometry was. Also note that when stroking a transformed geometry with the DrawGeometry method, the stroke width is not affected by the transform applied to the geometry.

Let us learn by example once again. We will create a larger (scaled) version of the unit rectangle we created in a previous tutorial:

// definition
Microsoft::WRL::ComPtr<ID2D1TransformedGeometry> transformedRectangle;

// initialize graphics
util::Expected<void> DirectXGame::initGraphics()
{
// set transformation
d2d->matrixScaling = D2D1::Matrix3x2F::Scale(100, 100);

// return success
return {};
}

util::Expected<int> DirectXGame::render(double /*farSeer*/)
{
// clear the back buffer and the depth/stencil buffer
d3d->clearBuffers();

d2d->devCon->BeginDraw();

d2d->devCon->DrawGeometry(transformedRectangle.Get(), d2d->redBrush.Get(), 5);

d2d->devCon->EndDraw();

// print FPS information
...
}

Now to scale and translate the rectangle, we concatenate two transformation matrices. Let $R$ be a rectangle, $\tau$ a translation map, $s$ a scaling map and $M_\tau$, $M_s$ the corresponding matrices, then obviously $R_s := s(R)$ is a scaled rectangle and $R_{\tau \circ s} := \tau(R_s) = \tau(s(R))$ is the translated scaled rectangle. The corresponding transformation matrix for the affine map $\tau \circ s$ is $M_\tau \cdot M_s$.

Direct2D however, thinks differently about matrices than most mathematicians. Direct2D does not read mathematics from right to left, but from left to right, which means that the matrices are transposed. The correct formula for the concatenated transformation matrix in Direct2D is thus: $$(M_\tau \cdot M_s)^t = M_s^t \cdot M_\tau^t,$$where $M_s^t$ and $M_\tau^t$ are the scaling and transformation matrices created by Direct2D.

This sounds complicated, but it actually isn't, let's see an example. We will translate the scaled rectangle from above to the centre of the screen:

// definitions
Microsoft::WRL::ComPtr<ID2D1TransformedGeometry> transformedRectangle;
D2D1::Matrix3x2F transformationMatrix;

// initialize graphics
util::Expected<void> DirectXGame::initGraphics()
{
// set transformation
d2d->matrixTranslation = D2D1::Matrix3x2F::Translation(350, 250);
d2d->matrixScaling = D2D1::Matrix3x2F::Scale(100, 100);

transformationMatrix = d2d->matrixScaling * d2d->matrixTranslation;

// return success
return {};
}

// render
util::Expected<int> DirectXGame::render(double /*farSeer*/)
{
// clear the back buffer and the depth/stencil buffer
d3d->clearBuffers();

d2d->devCon->BeginDraw();

d2d->devCon->DrawGeometry(transformedRectangle.Get(), d2d->redBrush.Get(), 5);

d2d->devCon->EndDraw();

// print FPS information
if (!d2d->printFPS(d2d->blackBrush).wasSuccessful())
return std::runtime_error("Failed to print FPS information!");

// set the vertex buffer

// set primitive topology

// draw

// present the scene
if (!d3d->present().wasSuccessful())
return std::runtime_error("Failed to present the scene!");

// return success
return 0;
}

## Brushes

Direct2D also allows brushes to be transformed, and since brushes are mutable, they offer a SetTransform method, thus everything works exactly as for transforming the entire render target.

Now we know the basics of a very important mathematical concept applied to 2D geometries. Transformations are a thing of beauty and they will surely come in handy in later tutorials and projects.


text:
# Linear Algebra for Least Square Lines for Data

Find the least-squares line for the data below by following the steps after the data.

Data Given

The year 1880 1910 1940 1970 2000

Global Mean Temperature 13.73O 13.72O 13.98O 14.00O 14.51O

A) Give the entries of A and bin Ax=b for this data.

For this part, I put A as v1=(1,1,1,1,1) and v2= (1880,1910,1940,1970,2000) and for b I have (13.73,13.72,13.98,14,14.51)

B) Give the equation whose solution will give the coefficients of the least-squares line.

I got A^tAx=A^tb

Matrix A^t* I have v1= (5,9700) and v2=(9700, 18,827,000) Matrix A^tb I have (96.94, 135,738,80)

C)Use some appropriate technology to find the coefficients of the least-squares line.

After plugging it in I have x to be (11,298.289 , -5.813)

Can anyone confirm if I did this entire problem correctly or if I missed something.

• You have to left-multiply both sides by $A^T$. This new equation will give you the least squares solution. Here’s a resource: math.mit.edu/~gs/linearalgebra/ila0403.pdf – DevrimA Apr 27 at 17:08
• But multiplying A*A^T (Year time transpose Year) I get a ridiculously big matrix with big numbers – user769545 Apr 27 at 17:10
• @Displayer123 you have the order backwards. "Left-multiply by $A$" means that you end up with $A^TA$. – Omnomnomnom Apr 27 at 17:14
• Oh duh, thanks! But it corrected to have A as 1 or 2 vectors? 1 vector just being the given data and 2 vectors being V1 as only 1's and V2 being the data given – user769545 Apr 27 at 17:16
• @displayer123 you can multiply A*A^T. The dimensions that don't match. You want to solve $A^{T}A \hat{x}=A^{T}b$ – DevrimA Apr 27 at 17:16

format: plain


text:
# Lesson 13

Experimenting

• Let’s do an experiment.

### 13.1: Satisfaction Test

The dot plots represent the satisfaction ratings for two similar products resulting from a survey given to 5 randomly selected people who use product A and to 5 randomly selected people who use product B. The satisfaction rating is based on a scale of 1 to 5, where 1 is not satisfied, 2 is somewhat satisfied, 3 is satisfied, 4 is very satisfied, and 5 is extremely satisfied.

1. Which product has a higher overall satisfaction rating? Explain your reasoning.
2. Do you think that 2 different random samples of 5 people would lead you to the same conclusion?

### 13.2: Randomizing Satisfaction

Your teacher will select 10 of your classmates to create a randomization distribution using the data from the warm-up.

1. Complete the table using the data from the activity.

trial group 1's mean group 2's mean (group 1's mean) minus (group 2's mean)
actual 4.4 3.6 0.8
1
2
3
4
5
6
7
8
9
10
2. Complete the dot plot to display the distribution of the differences of the means.

3. What information is represented in the dot plot?
4. In what percentage of the trials are the means from the two groups at least as far apart as the actual groupings from the warm-up?

Here are 2 lists of scores 5 individuals got on a memory test. List $$A$$ contains the scores of the 5 individuals when taking the test after listening to pop music. List $$B$$ contains the scores of the same 5 individuals (in the same order) when taking the test after listening to classical music.

• List A: 59, 28, 73, 58, 44
• List B: 75, 93, 13, 21, 70
1. Find the mean of list $$A$$, the mean of list $$B$$, and the difference mean of list $$A$$ minus mean of list $$B$$.
2. What does this difference of means represent in our context?
3. Create a third list, list $$C$$ which has 5 numbers each of which are the differences of a number in list $$A$$ and its corresponding number in list $$B$$. So for example, the first element of list $$C$$ is -16 since $$\text- 16=59-75$$. Find the mean of list $$C$$.
4. What does this means of differences represent in our context?
5. What is the connection between the difference of means and the mean of differences? Explain why this is true.

### 13.3: Get Ready to Experiment

Does counting while exercising affect your heart rate? Let’s think about how to design an experiment to find out.

1. For another lesson, the class will be divided into 2 groups. One group will do an exercise silently. The other group will count out loud while they do the exercise. Which of these methods would be good for dividing the class so the results are based only on the counting and heart rate rather than other factors? Explain your reasoning for each method suggested.
1. The athletes in the class are assigned to the counting group and the non-athletes are assigned to the silent group.
2. The teacher puts everyone’s name in a bag and draws half of the names. The names that are drawn are in the group that counts, and the others remain silent for the exercise.
3. The tallest half of the students are put in the counting group and the shortest half of the students are assigned to the silent group.
2. Do you think counting out loud will have an effect on heart rate? Explain your reasoning.
3. A treatment is the value of the variable that is changed between the two groups in an experiment. What is the treatment in this experiment?
4. How would you design an experiment to answer the question, “Does counting while exercising affect your heart rate?”

### Summary

Experiments provide a way to assess the effect of different experimental conditions on a response variable. It is important to design the experiment carefully to ensure that other variables that might have an effect on the response are accounted for.

One important aspect in experimental design is the use of randomness for separating subjects into groups for the experiment. The random assignments are used in order to create groups that are likely to be similar with respect to other variables that might affect the response.

For example, a researcher wants to study the question, “Does the size of the aquarium in which frogs are kept affect the size of the frogs?”

The researcher selects 20 young frogs to be used in the experiment. The frogs are then numbered and a random number generator is used to separate the frogs into two groups of 10. One group will be put in a 10 gallon aquarium to grow while the other group is placed in a 100 gallon tank to grow. The researcher will measure the size of the frogs based on their weight at the end of a year.

The size of the tank is one of the variables and a treatment is the value of the variable that is changed between the two groups in an experiment. In this experiment, there are two treatments—a smaller tank and a larger tank.

The researcher finds that the frogs in the smaller tank have a mean weight of 111.2 grams and the frogs in the larger tank have a mean weight of 169.3 grams. The difference of 58.1 grams seems large, but is it enough to say the tank size is the cause of the difference? Even if all the frogs were in the same tank, we expect there to be some variability in the weight of the frogs. A simulation can be used to estimate how much of the difference between the means occurs by chance.

In this kind of simulation, all the data is grouped together, then data is randomly redistributed among two groups, and the difference between the means of these new groups is computed. This process is repeated several times to create a randomization distribution: a distribution of the differences between the means for the treatment groups containing randomly redistributed data. The mean difference from the experiment is then compared to this distribution to determine whether or not it likely occurred by chance.

To investigate whether the tank size is the important factor in the difference or whether it is due to the chance ways the frogs were separated into treatment groups, we can use a simulation to examine what results we might expect from chance. For the moment, we assume the tank does not play a part in the size of the frogs, and we put all 20 frog weights into one group. We can separate the weights into two groups in a random way and determine the difference in mean weights between the groups.

Doing this many times will produce a distribution of weight differences that could be the result of how the frogs happened to be divided into groups. We can then compare the actual difference in mean weights from the treatment groups to the randomization distribution to determine if the 58.1 gram difference is unusual (which would suggest the tank size played an important role) or whether this is typical of what we might see from random assignment to groups.

Breaking the data into two groups randomly 30 times produces the histogram here.

Notice that, based on this distribution, the original difference of 58.1 grams would be very unusual based on what might be seen due to random assignment to groups. The researcher has evidence to support the hypothesis that tank size has an impact on the weight of frogs growing in it.

If the original difference had been about 15 grams, there would have been a case to be made that the difference observed might be due to random chance since 11 out of the 30 differences found from mixing the data randomly had a difference of at least 15 grams (in one direction or the other).

### Glossary Entries

• treatment

In an experiment where you are comparing two groups, one of which is being given a treatment and the other of which is the control group without any treatment, the treatment is the value of the variable that is changed for the treatment group.


text:
### COM.FREEZE_FLAGS

Controls flagging of samples that differ from the common-mode

#### Description:

If non-zero, the flags marking bolometers that differ from the common-mode are frozen after the specified number of iterations. this can help convergence. See parameter "com.corr_abstol" . Note - any initial iterations specified by parameter "ast.skip" are not included in the count of iterations. [0]
Type:
integer

#### SMURF Usage

SC2CLEAN, MAKEMAP, CALCQU


text:
# Example: Spin-flip excitation energies: SiH2¶

Download SiH2_spinflip.run

Calculation of the spin-flip excitation energies of the open shell molecule SiH2

$ADFBIN/adf << eor Title spin-flip excitation energies of SiH2 Atoms Zmatrix Si 0 0 0 H 1 0 0 1.5145 H 1 2 0 1.5145 92.68 End excitations lowest 20 end unrestricted charge 0 2 SFTDDFT FORCEALDA TDA Basis Type TZ2P End End input eor  In this example, the lowest 20 spin-flip excitation energies of SiH2 are calculated in a spin-unrestricted TDDFT calculation. In this case an excited state is used as reference, which means that there can also be a negative excitation energy, which is indeed the case. The electron configuration used in the SCF is $$(a_1)^1$$ $$(b_1)^1$$, with $$S_z=1$$, thus a $$^3 B_1$$ state, which is an excited state. The $$^1 A_1$$ state with electron configuration $$(a_1)^2$$ is lower in energy, and is the ground state. There is also an excited 1A1 state with electron configuration $$(b_1)^2$$. The transition from the ground 1A1 state to the excited 1A1 state is an excitation from the electron configuration $$(a_1)^2$$ to $$(b_1)^2$$. This transition is actually a double excitation, which means that some double excitations can be reached using spin-flip TDDFT with carefully selected reference states. In the MO → MO transitions part for the excitations of the output file, the spin of each molecular orbitals are also specified to help assign the spin state of the excited states. Note that in these spin-flip calculations the transitions are always from α spin-orbital to β or from β spin-orbital to α spin-orbital. For open-shell molecules, spin-flip transition can result in transition to the ground state with a different Sz value, while the symmetry of the transition density is A1. The excitation energy of this transition should be zero and this can be used to test the reliability of spin-flip TDDFT. Indeed the calculation of the spin-flip excitation energies of SiH2 shows one value which is close to zero and has a transition density of A1 symmetry. The 1A1 state with electron configuration $$(a_1)^2$$ can also be used in the calculation of the excitation energies. This is a closed shell configuration, in which case we do not need the spin-flip method. $ADFBIN/adf << eor
Title excitation energies of SiH2
Atoms Zmatrix
Si 0  0  0
H  1  0  0  1.5145
H  1  2  0  1.5145  92.68
End

excitations
lowest 20
end

Basis
Type TZ2P
End

End input
eor

The transition from the ground $$^1 A_1$$ state to the excited $$^1 A_1$$ state, which is an excitation from the electron configuration $$(a_1)^2$$ to $$(b_1)^2$$, can not be reached in this calculation, since it has mainly double excitation character. Of course, other excited $$^1 A_1$$ states can be reached.


text:
# Regrowing body parts: What are the costs?

Everybody has seen superpowers like superstrength, flying, and regeneration. While flying and superstrength are quite straightforward regarding the energy cost, regeneration is not.

In this question, I want to find the energy cost of this power. Let's assume an arm needs to be regrown. An average human arm weighs 4-6kg. (5kg for the purpose of this question.) Assuming all necessary atoms can be brought to the place they are needed to form an arm one way or the other there is still the energy cost of biochemically forming all the molecules. That is what I want to focus on.

How much energy has to be expended to form an arm from just the materials in their simplest or most common forms? (atoms, very basic gas molecules, etc.)
It can be assumed that H2O is already available as it is rather common on earth and in a human body. (And certainly more common than H2 for example)

Answers should account for as many different costs that occur and thus give an estimation as precise as possible of the total net energy cost of regrowing a limb assuming the required atoms are sufficiently available.

It can be assumed that excess energy of possible exothermic processes can be "gained" and reused for the rest of the energy requirements. (Though I do not think this will be in any case a relevant portion of the net energy cost.)

This question is a follow-up to my question "Energy cost of creating body parts from nothing but energy". That question showed clearly that the generation of matter by far exceeds the energy cost of biochemically putting a limb together.

I will post my own calculations as an answer. I am not certain about my math, my data, my conclusions or if I missed a few things, but wanted to include it for other people to improve upon and maybe save answerers some time, research and work.

This question asks for hard science. All answers to this question should be backed up by equations, empirical evidence, scientific papers, other citations, etc. Answers that do not satisfy this requirement might be removed. See the tag description for more information.

• This is tangential to your question (hence I'm not entering it as an answer), but something to consider is that re-growth of a limb (as happens in newts) requires an entire collection of unique proteins ("matrix proteins") that direct the growth activity. Without these proteins, the growth is undirected and random (as with a cancer). I don't know whether it factors into your world/story, but it could present a limitation on the superpower. (Evil scientist yells triumphantly: "I've found it! This enzyme can prevent Newtman from regenerating! He's DONE FOR!!! BWAAA-HAHAHAHAHAHAHA!!!") – JDM-GBG Jul 29 '18 at 23:07
• @JDM-GBG good point, but in the scenario i envisioned not that relevant as the regeneration is magic. In that scenario magic is intended to be an extension of physics by allowing the control, transfer and transformation of energy with the mind. I want it to be as physics-based as possible (of course ignoring relativity and quantum mechanics), but classical physics and chemistry should be covered as good as possible. – ArtificialSoul Jul 30 '18 at 7:35
• OK, I get it -- a telekinetic power, exercised at the micro-level, right? Very cool idea! – JDM-GBG Jul 31 '18 at 10:25
• See I can, and I have, work out exactly how much and of what you need to do this, in terms of what elements it takes and what the most, reactively, efficient pathways are to getting them but I can't actually turn that into a hard number of how much energy it takes to run those pathways without knowing the efficiency of the power doing the gathering etc... elemental quantities and reaction energies just aren't enough to answer this question accurately. – Ash Aug 1 '18 at 13:45
• @Ash It is to be assumed that the power doing the gathering has no losses. It is all about the necessary costs. And also: the goal is to have an estimation. Of course the result is not going to be exact. I want to be sure of the order of magnitude. With my calculations it is about 50-100MJ, but i am not sure about my calculations, which is why my main question is if I have missed a major cost of energy. (And th results is also going to vary significantly depending on the person whose arm it is. Whether it's mostly fat, mostly bone or mostly muscle mass makes a difference.) – ArtificialSoul Aug 1 '18 at 14:16

The data source I used is Composition of the human body.
This clearly shows that proteins, water and lipids make up 97% of the mass of a human body and I will assume that we can get a rather precise estimate if we just account for those to not have to deal with all the other material within the human body. After all this is about getting a good estimate, not a precise calculation.

### Water

As stated before we can assume that H2O is readily available already so we can say there is no energy required to form this. That already accounts for 65% of the mass. So we have a total energy of $$E_{\text{H}_2\text{O}} = 0 \text{kJ}$$

### Proteins

I am having serious trouble finding data on enthalpy of proteins. The only thing I found was regarding enthalpy change in protein folding and binding with a value of $$H_\text{proteins}=4 \frac{\text{kcal}}{\text{mol}} \ \ (16.7\frac{\text{kJ}}{\text{mol}})$$ It is most certainly not referring to the right thing, but to at least have something to calculate with I will use this value, assuming the real value is of a similar magnitude. I put no certainty in that.

The average molecular length of a protein is 375 amino acids for humans. And an average amino acid weighs 110Da (so $110\frac{\text{g}}{\text{mol}}$) This results in an average molar weight of $$M_\text{protein}=41,250 \frac{\text{g}}{\text{mol}}$$. This assumes that the proteins are equally distributed in the body - which is probably false, but might give us a decent enough estimate.

$$m_{\text{arm}} = 5 \text{kg}$$ $$m_{\text{arm;proteins}} = 0.12 \times m_{\text{arm}} = 0.6 \text{kg}$$ $$n_\text{proteins} = m_{\text{arm}} / M_\text{arm;proteins} = 0.01455 \text{mol}$$ $$E = H_\text{proteins} \times n_\text{proteins} - \sum_i {H_\text{material i} \times n_\text{material i}} \ \ \text{(if we assume no byproducts)}$$ $$E_\text{proteins} = 243 \text{kJ} - \sum_i {H_\text{material i} \times n_\text{material i}}$$

I am uncertain what states of the starting materials to assume. Water ($−285.83 \frac{\text{kJ}}{\text{mol}}$), graphite ($0 \frac{\text{kJ}}{\text{mol}}$), nitrogen gas ($0 \frac{\text{kJ}}{\text{mol}}$) might work with possibly negligible additions or taking into account byproducts.

If we were to assume water as a base material we can see the energy needed would increase as the enthalpy of O2 and H2 are $0 \frac{\text{kJ}}{\text{mol}}$ of Oxygen would likely be a byproduct in formation of amino acids given this scenario and the enthalpy of formation of water is negative.

Since amino acid structures have about 2-4 Oxygen atoms it is fair to assume that you would need on average 3 H2O for a singular amino acid. With an average of 375 amino acids per protein $$n_{\text{H}_2\text{O}} = 375 \times 3 \times n_\text{proteins} = 16.369 \text{mol}$$. This gives us with the equation above $$E = H_\text{proteins} \times n_\text{proteins} - {H_{\text{H}_2\text{O}} \times n_{\text{H}_2\text{O}}} \ \ \text{(if we assume no byproducts with H \neq 0)} = 243 \text{kJ} - (-285.83 \frac{\text{kJ}}{\text{mol})} \times 16.369 \text{mol} = 4,922 \text{kJ}$$

If we take calorimetric values instead of all I tried to come up with reasonable data, we have 4 kcal per gram of proteins. This results in $$E_\text{proteins;calorimetric} = m_\text{arm;proteins} \times 4 \frac{\text{kcal}}{\text{g}} = 600g \times 4 \frac{\text{kcal}}{\text{g}} = 2400 \text{kcal} = 10,041kJ$$ So about twice as much as I had with the other data.

### Lipids

With lipids I am also having troubles finding good data, so I decided to use the calorimetric data which appearantly is between $38,702 \frac{\text{kJ}}{\text{kg}}$ and $39,748 \frac{\text{kJ}}{\text{kg}}$.
I will use $39,748 \frac{\text{kJ}}{\text{kg}}$ as an estimate of the energy used to build lipids, which is probably not correct entirely but might not be off by that much.

$$m_{\text{arm;lipids}} = 0.2 \times m_{\text{arm}} = 1 \text{kg}$$

$$E_\text{lipids} = m_{\text{arm;lipids}} \times 39,748 \frac{\text{kJ}}{\text{kg}} = 39,748 \text{kJ}$$

### Preliminary energy sum

Putting all the results together we reach an estiamated total of $$E_\text{total} = \sum_i{E_i} = 44.670 MJ$$ or if we take the calorimetric value for the proteins $$E_\text{total;cal.proteins} = 49.789 MJ$$

### A different result based on this answer by @Freedomjail

This may be a very basic answer but I found this link with some calorific values :

Bone and meat calorific values

This is an approximation but for this

mixture of meat and bone (the composition percentage is not specified) they measured a gross calorific value of 19.69 MJ.kg-1.

From what I recall, the calorific value is the energy gained by burning the material which is pretty similar to separate the molecules into single atoms or at least into some very smaller molecules. If so, this is the opposite of the energy needed to creates molecules from single atoms.

Now I was talking about a 5kg arm so taking that into account that would make 98MJ.

So we got estimates ranging from 44MJ to 98MJ.
According to a calorie calculator my recommended daily intake is 8140kJ (8.14MJ). This means the energy required would be 5.4-12 days worth of calorie intake.

• Initially I thought you were asking for the energy needed to make an arm using biochemical pathways (which would be a very cool question^^), but reading the comments about the 'magical micro scale telepathy' I think you're pretty safe by going with calorimetric values for tissue. – Nicolai Aug 1 '18 at 16:52
• @Nicolai The main issue with the biochemical regeneration is that there is no guiding force. You can't just do something to a lump of raw material and make it form an arm. So the idea if we were to assume a guiding mechanism, whether it'd be the body itself or supernatural powers, what would the energy requirement be? Because even if you can decide when to form which molecule, you still need to invest energy to form it. That is why I didn't include the description of the magic in the question. It is irrelevant to the idea. – ArtificialSoul Aug 1 '18 at 17:38
• Great answer! It got me thinking: Since you are probably going to need food to get that amount of energy, you might be able to save a lot of energy by using complex chemicals from food (especially meat) directly instead of building an arm from air, water and coal. – Matej Lieskovsky Aug 1 '18 at 18:18

I'll put my sources at the bottom of the piece:

That 5kg of arm is going to need 3250g of Oxygen, 900g of Carbon, 500g of Hydrogen, 150g of Nitrogen, and the rest is fiddly non-gases that'll need to be sourced elsewhere

We can atmospherically source most of that, but we'd need to strip about 7500 m3 of dry air to get enough hydrogen so if we assume 1% water vapour, about average at sea-level, then we can get away with taking some or all of the gases from only about 35m3 or 35,000 litres of air to get all the Carbon we need, we can get the Oxygen etc.. from that volume with relative ease.

We'll need to hit the ground, plants, and animals around us up for another 200g of solid elements, mostly Calcium and Phosphorus, that could be pretty messy but there you go.

Based on pigs, because they have about the same body chemistry and funnily enough no-one has this figure for people, we normally convert about 35% of what we eat into tissue, the end caloric value of a 5kg arm is about 23,500 food calories so we'd need 67,000 calories to support it's production. I make that 280MJ but that does assume a hugely wasteful natural metabolism, if we use more efficient direct conversion then your math is about right and it's only about 50MJ, a lot but not appallingly so.

Alternatively if there is an arm composed of everything we need to regrow it, already packaged up as proteins etc... lying on the ground, or otherwise detached but not yet at any great distance from the hero. Like in the bad guy's unsuspecting hand, procurement and processing gets a whole lot cheaper.

Composition of the body

Atmospheric composition

Atmospheric density

Food conversion rates


text:
Compute the basic effective sample size (ESS) estimate for a single variable as described in Gelman et al. (2013) with some changes according to Vehtari et al. (2021). For practical applications, we strongly recommend the improved ESS convergence diagnostics implemented in ess_bulk() and ess_tail(). See Vehtari (2021) for an in-depth comparison of different effective sample size estimators.

ess_basic(x, ...)

# S3 method for default
ess_basic(x, split = TRUE, ...)

# S3 method for rvar
ess_basic(x, split = TRUE, ...)

## Arguments

x

(multiple options) One of:

• A matrix of draws for a single variable (iterations x chains). See extract_variable_matrix().

• An rvar.

...

Arguments passed to individual methods (if applicable).

split

(logical) Should the estimate be computed on split chains? The default is TRUE.

## Value

If the input is an array, returns a single numeric value. If any of the draws is non-finite, that is, NA, NaN, Inf, or -Inf, the returned output will be (numeric) NA. Also, if all draws within any of the chains of a variable are the same (constant), the returned output will be (numeric) NA

as well. The reason for the latter is that, for constant draws, we cannot distinguish between variables that are supposed to be constant (e.g., a diagonal element of a correlation matrix is always 1) or variables that just happened to be constant because of a failure of convergence or other problems in the sampling process.

If the input is an rvar, returns an array of the same dimensions as the rvar, where each element is equal to the value that would be returned by passing the draws array for that element of the rvar to this function.

## References

Andrew Gelman, John B. Carlin, Hal S. Stern, David B. Dunson, Aki Vehtari and Donald B. Rubin (2013). Bayesian Data Analysis, Third Edition. Chapman and Hall/CRC.

Aki Vehtari, Andrew Gelman, Daniel Simpson, Bob Carpenter, and Paul-Christian Bürkner (2021). Rank-normalization, folding, and localization: An improved R-hat for assessing convergence of MCMC (with discussion). Bayesian Data Analysis. 16(2), 667-–718. doi:10.1214/20-BA1221

Aki Vehtari (2021). Comparison of MCMC effective sample size estimators. Retrieved from https://avehtari.github.io/rhat_ess/ess_comparison.html

## See also

Other diagnostics: ess_bulk(), ess_quantile(), ess_sd(), ess_tail(), mcse_mean(), mcse_quantile(), mcse_sd(), rhat_basic(), rhat(), rstar()

## Examples

mu <- extract_variable_matrix(example_draws(), "mu")
ess_basic(mu)
#> [1] 511.5225

d <- as_draws_rvars(example_draws("multi_normal"))
ess_basic(d\$Sigma)
#>          [,1]     [,2]     [,3]
#> [1,] 680.2791 446.2236 481.9080
#> [2,] 446.2236 522.0755 418.0690
#> [3,] 481.9080 418.0690 636.2592


text:
# Memory requirements of $k$-means clustering

Can anyone tell me the factors that affect the memory requirements of $k$-means clustering with a bit of explanation?

• $k$-means is NP-hard, so there is a lot of heuristics which significantly differ, also in resource consumption; are you interested in some specific algorithm? – user88 Jun 5 '11 at 20:57
• Are you referring to Lloyd's algorithm? If so, I believe the memory requirements for a standard implementation would be O(log k * n) because you would have to store a list of (point,cluster) pairs for the update step. Because k is usually small, my guess is you could usually get away with storing just a short for each point, but I haven't looked at any specific implementations. – rm999 Jun 6 '11 at 0:08
• You only really need intermediate storage of size $k$, if you're willing to store the data on disk and scan it in each pass. Of course, this is very slow, and so there are tradeoffs involved. What specifically were you looking for. – Suresh Venkatasubramanian Jun 7 '11 at 4:21

Algorithms like Lloyds can be implemented with $k\cdot(2\cdot d + 1)$ floating point values memory use only. MacQueens k-means algorithm should only need $k\cdot(d + 1)$ memory.

However, as most users will want to know which point belongs to which cluster, almost every implementation you'll find will use $O(n+k\cdot d)$ memory.

In other words, the memory use by k-means is essentially the output data size.

I recently came across a note of a scipy implementation of the k-means algorithm in scipy.cluster.vq.py

Notes
-----
This could be faster when number of codebooks is small, but it
becomes a real memory hog when codebook is large. It requires
N by M by O storage where N=number of obs, M = number of
features, and O = number of codes.


text:
# Evaluate using Special Integral Forms MCQ Quiz - Objective Question with Answer for Evaluate using Special Integral Forms - Download Free PDF

Last updated on Jan 6, 2023

## Latest Evaluate using Special Integral Forms MCQ Objective Questions

#### Evaluate using Special Integral Forms Question 1:

What is the value of $$\displaystyle \int_{-\pi/2}^{\pi/2}|\sin x|\:dx?$$

1. 2
2. 1
3. π
4. 0

Option 1 : 2

#### Evaluate using Special Integral Forms Question 1 Detailed Solution

Formula used :

Property of definite integral = $$\displaystyle \int_{-k}^{k}f(x)\:dx = 2\int _{0}^{k} f(x)dx$$ .... if f(-x) = f(x) or it is an even function      ---- (1)

Calculations :

Now, $$\int_{\frac{-π}{2}}^{\frac{π}{2}}|sin\space x|dx$$

$$\int_{\frac{-π}{2}}^{0}(-sin\space x)dx$$ + $$\int_{0}^{\frac{π}{2}}sin\space xdx$$

$$[\cos x]_{-\frac{π}{2}}^0 + [-\cos x]_0^{\frac{π}{2}}$$

= [ 1 - cos (-π/2)] - [cos(π/2) - cos 0]

= [1 - cos(π/2)] - [0 - 1]  (∵ cos (- x) = cos x)

= [1 - 0 ] - [- 1]

= 1 + 1

= 2

∴ The value of $$\displaystyle \int_{-π/2}^{π/2}|\sin x|\:dx \space is \ 2$$.

#### Evaluate using Special Integral Forms Question 2:

If $$\displaystyle \int_0^1 x^m(1-x)^n\:dx=K\displaystyle \int_0^1x^n(1-x)^m\:dx$$, what is the value of K?

1. 0
2. 1
3. -1
4. 2

Option 2 : 1

#### Evaluate using Special Integral Forms Question 2 Detailed Solution

Concept:

$$\displaystyle \int_p^q f(x)\:dx=\displaystyle \int_p^qf(p+q-x)\:dx$$

Calculation:

We have $$\displaystyle \int_0^1 x^m(1-x)^n\:dx=K\displaystyle \int_0^1x^n(1-x)^m\:dx$$

⇒  $$\displaystyle \int_0^1(1- x)^m(1-(1-x))^n\:dx=K\displaystyle \int_0^1x^n(1-x)^m\:dx$$

⇒  $$\displaystyle \int_0^1(1- x)^m\ x^n\:dx=K\displaystyle \int_0^1x^n(1-x)^m\:dx$$

Comparing both sides of the Equation,

K = 1

∴ The value of K = 1

#### Evaluate using Special Integral Forms Question 3:

The value of $$\displaystyle \int_{-1}^3\left[tan^{-1}\left(\frac{x}{x^2+1}\right)+tan^{-1}\left(\frac{x^2+1}{x}\right)\right]dx$$ is

1. π
2. $$\frac{\pi}{4}$$
3. $$\frac{\pi}{2}$$

Option 4 : 2π

#### Evaluate using Special Integral Forms Question 3 Detailed Solution

Given:

$$\displaystyle \int_{-1}^3\left[tan^{-1}\left(\frac{x}{x^2+1}\right)+tan^{-1}\left(\frac{x^2+1}{x}\right)\right]dx$$

Formula used :

$$tan^{-1}p+ cot^{-1}p = \frac{π}{2}$$        -----(1)

Calculations:

Using equation (1), we get

⇒ $$tan^{-1}p+ tan^{-1}\frac{1}{p} = \frac{π}{2}$$         -----(2)

Applying equation (2) in the given equation

⇒ $$\int_{-1} ^{3} \frac{π}{2} dx$$

⇒ $$\frac{π}{2} \int_1 ^3 1.dx$$

⇒ (π/2) [x]-13

⇒ $$\frac{π}{2}[3 - (-1)]$$

⇒ (π/2) × 4 = 2π

∴ The value of $$\displaystyle \int_{-1}^3\left[tan^{-1}\left(\frac{x}{x^2+1}\right)+tan^{-1}\left(\frac{x^2+1}{x}\right)\right]dx$$ is 2π.

#### Evaluate using Special Integral Forms Question 4:

$$\frac{1}{c}\displaystyle \int_{ac}^{bc}f\left(\frac{x}{c}\right)dx$$ is equal to

1. $$\frac{1}{c}\displaystyle \int_{a}^{b} f(x)dx$$
2. $$\displaystyle \int_{a}^{b} f(x)dx$$
3. $$c\displaystyle \int_{a}^{b} f(x)dx$$
4. $$\displaystyle \int_{ac^2}^{bc^2} f(x)dx$$

Option 2 : $$\displaystyle \int_{a}^{b} f(x)dx$$

#### Evaluate using Special Integral Forms Question 4 Detailed Solution

Formula used:

$$\frac{d}{dx}x^n=nx^{n-1}$$

Calculation:

Let,

$$I=\frac{1}{c}\displaystyle \int_{ac}^{bc}f\left(\frac{x}{c}\right)dx$$   ---(1)

Let x/c = t

⇒ dx = c dt

When x = ac ⇒ t = a

When x = bc ⇒ t = b

Hence, from equation (1)

$$I=\frac{1}{c}\displaystyle \int_{ac}^{bc}f\left(\frac{x}{c}\right)dx$$

$$\Rightarrow I=\frac{1}{c}\times c\displaystyle \int_{a}^{b}f\left(t\right)dt$$

$$\Rightarrow I=\displaystyle \int_{a}^{b}f\left(t\right)dt$$

$$\therefore I =\displaystyle \int_{a}^{b} f(x)dx$$

#### Evaluate using Special Integral Forms Question 5:

What is the area bounded by y = [x], where [⋅] is the greatest integer function, the x-axis and the lines x = -1.5 and x = -1.8?

1. 0.3 square unit
2. 0.4 square unit
3. 0.6 square unit
4. 0.8 square unit

Option 3 : 0.6 square unit

#### Evaluate using Special Integral Forms Question 5 Detailed Solution

TFormula used:

$$\rm \int x^{n} dx = \frac{x^{n + 1}}{n + 1} + C, n\neq 1$$

$$\rm \int_{a}^{b} f(x) dx = F(b) - F(a) \space, Where \rm \int f(x).dx = F(x) + C$$

Calculation:

Required Area = $$| \rm \int_{-1.8}^{-1.5} [x] dx |$$ , [∵ Area can never be negative]

Since, [x] represents G.I.F and  -1.8 < x < -1.5

So, The value of [x] for the given range will be - 2

⇒ Required Area = $$| \rm \int_{-1.8}^{-1.5} [x] dx | = | -2 \rm \int_{-1.8}^{-1.5} dx |$$

⇒ Required Area = 2 [-1.5 + 1.8]

⇒ Required Area = 0.6

∴ The required area is 0.6 square root.

## Top Evaluate using Special Integral Forms MCQ Objective Questions

#### Evaluate using Special Integral Forms Question 6

What is the value of $$\rm \int e^x \left(\dfrac{1}{x}- \dfrac{1}{x^2}\right)dx$$

1. $$\rm e^x ({1\over x^2})$$ + c
2. $$\rm e^x ({-1\over x^2})$$ + c
3. $$\rm e^x ({1\over x})$$ + c
4. $$\rm e^x ({-1\over x})$$ + c

Option 3 : $$\rm e^x ({1\over x})$$ + c

#### Evaluate using Special Integral Forms Question 6 Detailed Solution

Concept

$$\rm \int e^x \left(f(x)+f'(x)\right)dx$$  = ex f(x) + c

Calculation:

Let, $$\rm I=\int e^x \left(\dfrac{1}{x}- \dfrac{1}{x^2}\right)dx$$

Let f(x) = $$\rm 1\over x$$

⇒ $$\rm f'(x) = - {1\over x^2}$$

∴ $$\rm I=\int e^x \left(\dfrac{1}{x}- \dfrac{1}{x^2}\right)dx$$$$\rm \int e^x \left(f(x)+f'(x)\right)dx$$

ex f(x) + c

$$\rm e^x ({1\over x})$$ + c

Hence, option (3) is correct.

#### Evaluate using Special Integral Forms Question 7

$$\rm \int_0^1\frac{1}{\sqrt{4-x^2}}dx=$$

1. $$\frac\pi6$$
2. $$\frac\pi4$$
3. $$\frac\pi3$$
4. $$\frac\pi2$$

Option 1 : $$\frac\pi6$$

#### Evaluate using Special Integral Forms Question 7 Detailed Solution

Concept:

$$\rm \int\frac{1}{\sqrt{a^2-x^2}}dx=sin^{-1}(\frac xa)+c$$

Calculation:

Let, I = $$\rm \int_0^1\frac{1}{\sqrt{4-x^2}}dx$$

$$\rm \int_0^1\frac{1}{\sqrt{2^2-x^2}}dx$$

$$[\rm sin^{-1}(\frac x 2)]_0^1$$               (∵ $$\rm \int\frac{1}{\sqrt{a^2-x^2}}dx=sin^{-1}(\frac xa)+c$$)

$$\rm sin^{-1}(\frac 1 2)-sin^{-1}(0)$$

$$\frac\pi6$$

Hence, option (1) is correct.

#### Evaluate using Special Integral Forms Question 8

If $$\rm \int_{0}^{a} \frac{1}{1 + x^{2}}\: dx = \frac{\pi}{4}$$ then, find the value of a ?

1. 1
2. 2
3. 3
4. 4

Option 1 : 1

#### Evaluate using Special Integral Forms Question 8 Detailed Solution

Concept:

Integration Formula

$$\rm \int \frac{dx}{{1 + x^{2}}} = tan^{-1} x + C$$

Trigonometry Formula

tan($$\rm \frac{\pi}{4}$$) = 1

Calculation:

Given

⇒ $$\rm \int_{0}^{a} \frac{1}{1 + x^{2}}\: dx = \frac{\pi}{4}$$

⇒ $$\rm \left [tan^{-1}x \right ]_{0}^{a} = \frac{\pi }{4}$$

⇒ tan-1(a) - tan-1(0) = $$\rm \frac{\pi}{4}$$

⇒ tan-1(a) - 0 = $$\rm \frac{\pi}{4}$$

⇒ a = tan($$\rm \frac{\pi}{4}$$)

⇒ a = 1

The value of a is 1

Integral Formulas:

• ∫ dx = x + C
• ∫ a dx = ax+ C
• $$\rm \int x^{n} dx = \frac{x^{n + 1}}{n + 1} + C \: (n \neq -1)$$
• ∫ sin x dx = – cos x + C
• ∫ cos x dx = sin x + C
• ∫ sec2 x dx = tan x + C
• ∫ cosec2 x dx = - cot x + C
• ∫ sec x (tan x) dx = sec x + C
• ∫ cosec x ( cot x) dx = – cosec x + C
• ∫ (1/x) dx = ln |x| + C
• ∫ ex dx = e+ C
• $$\rm \int \frac{dx}{\sqrt{1 - x^{2}}} = sin^{-1} x + C$$
• $$\rm \int \frac{dx}{{1 + x^{2}}} = tan^{-1} x + C$$
• $$\rm \int \frac{dx}{x \sqrt{x^{2} - 1}} = sec^{-1} x + C$$
where C is the constant of integration.

#### Evaluate using Special Integral Forms Question 9

What is the area bounded by y = [x], where [⋅] is the greatest integer function, the x-axis and the lines x = -1.5 and x = -1.8?

1. 0.3 square unit
2. 0.4 square unit
3. 0.6 square unit
4. 0.8 square unit

Option 3 : 0.6 square unit

#### Evaluate using Special Integral Forms Question 9 Detailed Solution

TFormula used:

$$\rm \int x^{n} dx = \frac{x^{n + 1}}{n + 1} + C, n\neq 1$$

$$\rm \int_{a}^{b} f(x) dx = F(b) - F(a) \space, Where \rm \int f(x).dx = F(x) + C$$

Calculation:

Required Area = $$| \rm \int_{-1.8}^{-1.5} [x] dx |$$ , [∵ Area can never be negative]

Since, [x] represents G.I.F and  -1.8 < x < -1.5

So, The value of [x] for the given range will be - 2

⇒ Required Area = $$| \rm \int_{-1.8}^{-1.5} [x] dx | = | -2 \rm \int_{-1.8}^{-1.5} dx |$$

⇒ Required Area = 2 [-1.5 + 1.8]

⇒ Required Area = 0.6

∴ The required area is 0.6 square root.

#### Evaluate using Special Integral Forms Question 10

What is $$\mathop \smallint \limits_{ - 2}^2 {\rm{x\;dx}} - \mathop \smallint \limits_{ - 2}^2 \left[ {\rm{x}} \right]{\rm{dx}}$$ equal to, where [⋅] is the greatest integer function?

1. 0
2. 1
3. 2
4. 4

Option 3 : 2

#### Evaluate using Special Integral Forms Question 10 Detailed Solution

Concept:

1. If f(x) is periodic function with period T then,

• $$\mathop \smallint \nolimits_0^{{\rm{nT}}} {\rm{f}}\left( {\rm{x}} \right){\rm{dx}} = {\rm{n}}\mathop \smallint \nolimits_0^{\rm{T}} {\rm{f}}\left( {\rm{x}} \right){\rm{dx}},{\rm{\;n}} \in {\rm{Z}}$$
• $$\mathop \smallint \nolimits_{\rm{a}}^{{\rm{a}} + {\rm{\;nT}}} {\rm{f}}\left( {\rm{x}} \right){\rm{dx}} = {\rm{n}}\mathop \smallint \nolimits_0^{\rm{T}} {\rm{f}}\left( {\rm{x}} \right){\rm{dx}},{\rm{\;n}} \in {\rm{Z}},{\rm{\;a}} \in {\rm{R}}$$

2. Fractional part of x: This is the difference between x and its greatest integer part, [x]

• The fractional part of x is given by: {x} = x – [x]
• {x} = x for 0 ≤ x < 1
• Period of the fractional part of x is one.

Graph of the fractional part of x:

Calculation:

We have to find the value of $$\mathop \smallint \limits_{ - 2}^2 {\rm{x\;dx}} - \mathop \smallint \limits_{ - 2}^2 \left[ {\rm{x}} \right]{\rm{dx}}$$

$${\rm{Let\;I\;}} = \mathop \smallint \limits_{ - 2}^2 {\rm{x\;dx}} - \mathop \smallint \limits_{ - 2}^2 \left[ {\rm{x}} \right]{\rm{dx}} = {\rm{\;}}\mathop \smallint \limits_{ - 2}^2 {\rm{x}} - {\rm{\;}}\left[ {\rm{x}} \right]{\rm{\;dx}}$$

$$\Rightarrow {\rm{I}} = \mathop \smallint \limits_{ - 2}^2 \left\{ {\rm{x}} \right\}{\rm{\;dx}}$$                        (∵ x – [x] = {x})

As we know that period of {x} is one.

$$\Rightarrow {\rm{I}} = \mathop \smallint \limits_{ - 2}^2 \left\{ {\rm{x}} \right\}{\rm{\;dx}} = 4 \times \mathop \smallint \limits_0^1 {\rm{x\;dx}} = 4 \times {\rm{\;}}\left[ {\frac{{{{\rm{x}}^2}}}{2}} \right]_0^1 = {\rm{\;}}4 \times \left( {\frac{1}{2} - 0} \right) = 2$$

#### Evaluate using Special Integral Forms Question 11

The value of $$\mathop \smallint \limits_{ - \pi /2}^{\pi /2} x\cos xdx$$

1. π/2
2. π/4
3. 0

Option 4 : 0

#### Evaluate using Special Integral Forms Question 11 Detailed Solution

Concept:

Integral properties:

• $$\mathop \smallint \limits_{ - {\rm{a}}}^{\rm{a}} {\rm{f}}\left( {\rm{x}} \right){\rm{\;dx}} = \left\{ {\begin{array}{*{20}{c}} {2\mathop \smallint \limits_0^{\rm{a}} {\rm{f}}\left( {\rm{x}} \right){\rm{dx}},If\;f\left( { - {\rm{x}}} \right) = f\left( x \right)}\\ {0,\;If\;f\left( { - {\rm{x}}} \right) = - f\left( x \right)} \end{array}} \right.$$

Calculation:

To find: $$\mathop \smallint \limits_{ - {\rm{\pi }}/2}^{{\rm{\pi }}/2} {\rm{x}}\cos {\rm{xdx}}$$

Let f(x) = x cos x

Now, checking the function is odd or even

Put x = -x

⇒ f(-x) = (-x) cos (-x)

⇒ f(-x) = -x cos x (∵ cos (-x) = cos x)

So, f(x) = -f(x)

Hence, the given function is odd function.

And we know that, if f(x) is odd.

∴ $$\mathop \smallint \limits_{ - {\rm{a}}}^{\rm{a}} {\rm{f}}\left( {\rm{x}} \right){\rm{\;dx}} = 0$$

So, $$\mathop \smallint \limits_{ - {\rm{\pi }}/2}^{{\rm{\pi }}/2} {\rm{x}}\cos {\rm{xdx}} = 0$$

#### Evaluate using Special Integral Forms Question 12

What is the value of $$\rm \int e^x (\cos x - \sin x)dx$$

1. $$\rm e^x\cdot\cos x + c$$
2. $$\rm e^x\cdot\sin x + c$$
3. $$\rm -e^x\cdot\cos x + c$$
4. $$\rm- e^x\cdot\sin x + c$$

Option 1 : $$\rm e^x\cdot\cos x + c$$

#### Evaluate using Special Integral Forms Question 12 Detailed Solution

Concept

$$\rm \int e^x \left(f(x)+f'(x)\right)dx$$ = ex f(x) + c

Calculation:

Given: $$\rm \int e^x (\cos x - \sin x)dx$$

Let f(x) = cos x

⇒ f'(x) = - sin x

∴ $$\rm \int e^x (\cos x - \sin x)dx = \rm e^x\cdot \cos x + c$$

#### Evaluate using Special Integral Forms Question 13

$$\rm \int_{-\infty }^{\infty }\frac{dx}{2+x^{2}}$$ is ?

1. $$\frac{\pi}{2}$$
2. $$\frac{\pi}{4}$$
3. $$\frac{\pi}{\sqrt{2}}$$
4. 0

Option 3 : $$\frac{\pi}{\sqrt{2}}$$

#### Evaluate using Special Integral Forms Question 13 Detailed Solution

Concept:

Some standard integration formulae:

$$\rm \Rightarrow \int \frac{dx}{a^{2}+x^{2}}=\frac{1}{a}tan^{-1}\frac{x}{a}+c$$

$$\rm\Rightarrow \int \frac{dx}{x^{2}-a^{2}}=\frac{1}{2a}log\left | \frac{x-a}{x+a} \right |+c$$

$$\rm \Rightarrow \int \frac{dx}{a^{2}-x^{2}}=\frac{1}{2a}log\left | \frac{a+x}{a-x} \right |+c$$

Calculation:

$$\rm\int_{-\infty }^{\infty }\frac{dx}{2+x^{2}}\\=\int_{-\infty }^{\infty}\frac{dx}{\left ( \sqrt{2} \right )^{2}+x^{2}}$$

$$\rm=\frac{1}{\sqrt{2}}tan^{-1}\frac{x}{\sqrt{2}}\left.\begin{matrix} \\ \end{matrix}\right|_{-\infty }^{\infty }$$

$$\rm=\frac{1}{\sqrt{2}}\left ( tan ^{-1}\left ( \frac{\infty }{\sqrt{2}} \right )-tan^{-1}\left ( \frac{-\infty }{\sqrt{2}} \right )\right )$$

$$\rm=\frac{1}{\sqrt{2}}\left ( \frac{\pi}{2} -\left ( \frac{-\pi}{2} \right )\right )$$

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

∴  The correct option is 3

#### Evaluate using Special Integral Forms Question 14

If $$\mathop \smallint \limits_{ - 2}^5 {\rm{f}}\left( {\rm{x}} \right){\rm{dx}} = 4$$ and $$\mathop \smallint \limits_0^5 {\rm{( }}1 + {\rm{f}}\left( {\rm{x}} \right){\rm{)dx}} = 7$$ then what is $$\mathop \smallint \limits_{ - 2}^0 {\rm{f}}\left( {\rm{x}} \right){\rm{dx}}$$ equal to?

1. -3
2. 2
3. 3
4. 5

Option 2 : 2

#### Evaluate using Special Integral Forms Question 14 Detailed Solution

Concept:

Properties for definite Integral

• $$\mathop \smallint \nolimits_{\rm{a}}^{\rm{c}} {\rm{f}}\left( {\rm{x}} \right){\rm{dx}} = \mathop \smallint \nolimits_{\rm{a}}^{\rm{b}} {\rm{f}}\left( {\rm{x}} \right){\rm{dx}} + \mathop \smallint \nolimits_{\rm{b}}^{\rm{c}} {\rm{f}}\left( {\rm{x}} \right){\rm{dx\;}}$$

Calculation:

Given:

$$\mathop \smallint \limits_0^5 {\rm{\{ }}1 + {\rm{f}}\left( {\rm{x}} \right){\rm{)dx}} = 7$$

$$\Rightarrow \mathop \smallint \limits_0^5 {\rm{dx}} + \mathop \smallint \limits_0^5 {\rm{f}}\left( {\rm{x}} \right){\rm{dx}} = 7{\rm{\;}}$$

$$\Rightarrow \left[ {\rm{x}} \right]_0^5 + \mathop \smallint \limits_0^5 {\rm{f}}\left( {\rm{x}} \right){\rm{dx}} = 7$$

$$\Rightarrow \left( {5 - 0} \right) + \mathop \smallint \limits_0^5 {\rm{f}}\left( {\rm{x}} \right){\rm{dx}} = 7$$

$$\therefore \mathop \smallint \limits_0^5 {\rm{f}}\left( {\rm{x}} \right){\rm{dx}} = 2$$                          …. (1)

Now,

$$\mathop \smallint \limits_{ - 2}^5 {\rm{f}}\left( {\rm{x}} \right){\rm{dx}} = 4$$

$$\Rightarrow \mathop \smallint \limits_{ - 2}^0 {\rm{f}}\left( {\rm{x}} \right){\rm{dx}} + {\rm{\;}}\mathop \smallint \limits_0^5 {\rm{f}}\left( {\rm{x}} \right){\rm{dx}} = 4$$

From equation 1st, we get

$$\Rightarrow \mathop \smallint \limits_{ - 2}^0 {\rm{f}}\left( {\rm{x}} \right){\rm{dx}} + {\rm{\;}}2 = 4$$

$$\therefore \mathop \smallint \limits_{ - 2}^0 {\rm{f}}\left( {\rm{x}} \right){\rm{dx}} = 4 - 2 = 2$$

#### Evaluate using Special Integral Forms Question 15

If $$\rm \displaystyle\int_{0}^{a} \frac{1}{1 + x^{2}}\: dx = \frac{\pi}{4}$$ then, find the value of a ?

1. 1
2. 2
3. 3
4. 4
5. 5

Option 1 : 1

#### Evaluate using Special Integral Forms Question 15 Detailed Solution

Concept:

Integration Formula

$$\rm \int \frac{dx}{{1 + x^{2}}} = tan^{-1} x + C$$

Trigonometry Formula

tan($$\rm \frac{\pi}{4}$$) = 1

Calculation:

Given

⇒ $$\rm \int_{0}^{a} \frac{1}{1 + x^{2}}\: dx = \frac{\pi}{4}$$

⇒ $$\rm \left [tan^{-1}x \right ]_{0}^{a} = \frac{\pi }{4}$$

⇒ tan-1(a) - tan-1(0) = $$\rm \frac{\pi}{4}$$

⇒ tan-1(a) - 0 = $$\rm \frac{\pi}{4}$$

⇒ a = tan($$\rm \frac{\pi}{4}$$)

⇒ a = 1

The value of a is 1

Integral Formulas:

• ∫ dx = x + C
• ∫ a dx = ax+ C
• $$\rm \int x^{n} dx = \frac{x^{n + 1}}{n + 1} + C \: (n \neq -1)$$
• ∫ sin x dx = – cos x + C
• ∫ cos x dx = sin x + C
• ∫ sec2 x dx = tan x + C
• ∫ cosec2 x dx = - cot x + C
• ∫ sec x (tan x) dx = sec x + C
• ∫ cosec x ( cot x) dx = – cosec x + C
• ∫ (1/x) dx = ln |x| + C
• ∫ ex dx = e+ C
• $$\rm \int \frac{dx}{\sqrt{1 - x^{2}}} = sin^{-1} x + C$$
• $$\rm \int \frac{dx}{{1 + x^{2}}} = tan^{-1} x + C$$
• $$\rm \int \frac{dx}{x \sqrt{x^{2} - 1}} = sec^{-1} x + C$$

where C is the constant of integration.


text:
• ### Improved cosmological constraints from a joint analysis of the SDSS-II and SNLS supernova samples(1401.4064)

June 4, 2014 astro-ph.CO
We present cosmological constraints from a joint analysis of type Ia supernova (SN Ia) observations obtained by the SDSS-II and SNLS collaborations. The data set includes several low-redshift samples (z<0.1), all 3 seasons from the SDSS-II (0.05 < z < 0.4), and 3 years from SNLS (0.2 <z < 1) and totals \ntotc spectroscopically confirmed type Ia supernovae with high quality light curves. We have followed the methods and assumptions of the SNLS 3-year data analysis except for the following important improvements: 1) the addition of the full SDSS-II spectroscopically-confirmed SN Ia sample in both the training of the SALT2 light curve model and in the Hubble diagram analysis (\nsdssc SNe), 2) inter-calibration of the SNLS and SDSS surveys and reduced systematic uncertainties in the photometric calibration, performed blindly with respect to the cosmology analysis, and 3) a thorough investigation of systematic errors associated with the SALT2 modeling of SN Ia light-curves. We produce recalibrated SN Ia light-curves and associated distances for the SDSS-II and SNLS samples. The large SDSS-II sample provides an effective, independent, low-z anchor for the Hubble diagram and reduces the systematic error from calibration systematics in the low-z SN sample. For a flat LCDM cosmology we find Omega_m=0.295+-0.034 (stat+sys), a value consistent with the most recent CMB measurement from the Planck and WMAP experiments. Our result is 1.8sigma (stat+sys) different than the previously published result of SNLS 3-year data. The change is due primarily to improvements in the SNLS photometric calibration. When combined with CMB constraints, we measure a constant dark-energy equation of state parameter w=-1.018+-0.057 (stat+sys) for a flat universe. Adding BAO distance measurements gives similar constraints: w=-1.027+-0.055.
• ### First-year Sloan Digital Sky Survey-II (SDSS-II) supernova results: consistency and constraints with other intermediate-redshift datasets(0910.2193)

Oct. 12, 2009 astro-ph.CO
We present an analysis of the luminosity distances of Type Ia Supernovae from the Sloan Digital Sky Survey-II (SDSS-II) Supernova Survey in conjunction with other intermediate redshift (z<0.4) cosmological measurements including redshift-space distortions from the Two-degree Field Galaxy Redshift Survey (2dFGRS), the Integrated Sachs-Wolfe (ISW) effect seen by the SDSS, and the latest Baryon Acoustic Oscillation (BAO) distance scale from both the SDSS and 2dFGRS. We have analysed the SDSS-II SN data alone using a variety of "model-independent" methods and find evidence for an accelerating universe at >97% level from this single dataset. We find good agreement between the supernova and BAO distance measurements, both consistent with a Lambda-dominated CDM cosmology, as demonstrated through an analysis of the distance duality relationship between the luminosity (d_L) and angular diameter (d_A) distance measures. We then use these data to estimate w within this restricted redshift range (z<0.4). Our most stringent result comes from the combination of all our intermediate-redshift data (SDSS-II SNe, BAO, ISW and redshift-space distortions), giving w = -0.81 +0.16 -0.18(stat) +/- 0.15(sys) and Omega_M=0.22 +0.09 -0.08 assuming a flat universe. This value of w, and associated errors, only change slightly if curvature is allowed to vary, consistent with constraints from the Cosmic Microwave Background. We also consider more limited combinations of the geometrical (SN, BAO) and dynamical (ISW, redshift-space distortions) probes.
• ### A Measurement of the Rate of type-Ia Supernovae at Redshift $z\approx$ 0.1 from the First Season of the SDSS-II Supernova Survey(0801.3297)

July 21, 2008 astro-ph
We present a measurement of the rate of type Ia supernovae (SNe Ia) from the first of three seasons of data from the SDSS-II Supernova Survey. For this measurement, we include 17 SNe Ia at redshift $z\le0.12$. Assuming a flat cosmology with $\Omega_m = 0.3=1-\Omega_\Lambda$, we find a volumetric SN Ia rate of $[2.93^{+0.17}_{-0.04}({\rm systematic})^{+0.90}_{-0.71}({\rm statistical})] \times 10^{-5} {\rm SNe} {\rm Mpc}^{-3} h_{70}^3 {\rm year}^{-1}$, at a volume-weighted mean redshift of 0.09. This result is consistent with previous measurements of the SN Ia rate in a similar redshift range. The systematic errors are well controlled, resulting in the most precise measurement of the SN Ia rate in this redshift range. We use a maximum likelihood method to fit SN rate models to the SDSS-II Supernova Survey data in combination with other rate measurements, thereby constraining models for the redshift-evolution of the SN Ia rate. Fitting the combined data to a simple power-law evolution of the volumetric SN Ia rate, $r_V \propto (1+z)^{\beta}$, we obtain a value of $\beta = 1.5 \pm 0.6$, i.e. the SN Ia rate is determined to be an increasing function of redshift at the $\sim 2.5 \sigma$ level. Fitting the results to a model in which the volumetric SN rate, $r_V=A\rho(t)+B\dot \rho(t)$, where $\rho(t)$ is the stellar mass density and $\dot \rho(t)$ is the star formation rate, we find $A = (2.8 \pm 1.2) \times 10^{-14} \mathrm{SNe} \mathrm{M}_{\sun}^{-1} \mathrm{year}^{-1}$, $B = (9.3^{+3.4}_{-3.1})\times 10^{-4} \mathrm{SNe} \mathrm{M}_{\sun}^{-1}$.
• ### The Sloan Digital Sky Survey-II Supernova Survey: Search Algorithm and Follow-up Observations(0708.2750)

Oct. 19, 2007 astro-ph
The Sloan Digital Sky Survey-II Supernova Survey has identified a large number of new transient sources in a 300 sq. deg. region along the celestial equator during its first two seasons of a three-season campaign. Multi-band (ugriz) light curves were measured for most of the sources, which include solar system objects, Galactic variable stars, active galactic nuclei, supernovae (SNe), and other astronomical transients. The imaging survey is augmented by an extensive spectroscopic follow-up program to identify SNe, measure their redshifts, and study the physical conditions of the explosions and their environment through spectroscopic diagnostics. During the survey, light curves are rapidly evaluated to provide an initial photometric type of the SNe, and a selected sample of sources are targeted for spectroscopic observations. In the first two seasons, 476 sources were selected for spectroscopic observations, of which 403 were identified as SNe. For the Type Ia SNe, the main driver for the Survey, our photometric typing and targeting efficiency is 90%. Only 6% of the photometric SN Ia candidates were spectroscopically classified as non-SN Ia instead, and the remaining 4% resulted in low signal-to-noise, unclassified spectra. This paper describes the search algorithm and the software, and the real-time processing of the SDSS imaging data. We also present the details of the supernova candidate selection procedures and strategies for follow-up spectroscopic and imaging observations of the discovered sources.
• ### The Sloan Digital Sky Survey-II Supernova Survey: Technical Summary(0708.2749)

Aug. 21, 2007 astro-ph
The Sloan Digital Sky Survey-II (SDSS-II) has embarked on a multi-year project to identify and measure light curves for intermediate-redshift (0.05 < z < 0.35) Type Ia supernovae (SNe Ia) using repeated five-band (ugriz) imaging over an area of 300 sq. deg. The survey region is a stripe 2.5 degrees wide centered on the celestial equator in the Southern Galactic Cap that has been imaged numerous times in earlier years, enabling construction of a deep reference image for discovery of new objects. Supernova imaging observations are being acquired between 1 September and 30 November of 2005-7. During the first two seasons, each region was imaged on average every five nights. Spectroscopic follow-up observations to determine supernova type and redshift are carried out on a large number of telescopes. In its first two three-month seasons, the survey has discovered and measured light curves for 327 spectroscopically confirmed SNe Ia, 30 probable SNe Ia, 14 confirmed SNe Ib/c, 32 confirmed SNe II, plus a large number of photometrically identified SNe Ia, 94 of which have host-galaxy spectra taken so far. This paper provides an overview of the project and briefly describes the observations completed during the first two seasons of operation.
• ### The Cosmic Baryon Budget(astro-ph/9712020)

March 2, 1998 astro-ph
We present an estimate of the global budget of baryons in all states, with conservative estimates of the uncertainties, based on all relevant information we have been able to marshal. Most of the baryons today are still in the form of ionized gas, which contributes a mean density uncertain by a factor of about four. Stars and their remnants are a relatively minor component, comprising for our best-guess plasma density only about 17% of the baryons, while populations contributing most of the blue starlight comprise less than 5%. The formation of galaxies and of stars within them appears to be a globally inefficient process. The sum over our budget, expressed as a fraction of the critical Einstein-de Sitter density, is in the range $0.007\lsim\Omega_B\lsim 0.041$, with a best guess $\Omega_B\sim 0.021$ (at Hubble constant 70 km/s/Mpc). The central value agrees with the prediction from the theory of light element production and with measures of the density of intergalactic plasma at redshift $z\sim 3$. This apparent concordance suggests we may be close to a complete survey of the major states of the baryons.
• ### Confirmation of high deuterium abundance in QSO absorbers(astro-ph/9512004)

Dec. 19, 1995 astro-ph
We present a new analysis of a Keck spectrum of Q0014+813, with a new model of the $z=3.32$ absorbing cloud. We fit Lyman series absorption of the dominant HI components, including components identified with hydrogen and associated deuterium at two discrete velocities, with thermal line broadening of each species. The deuterium features are too narrow to be interlopers, and the good agreement in temperature and redshift with their hydrogen counterparts confirms the identification as deuterium. The abundance is measured to be $D/H$ $= 1.9 \pm 0.5$ and $1.9 \pm 0.4 \times 10^{-4}$ in the two components, with an independent lower limit of D/H $> 1.3 \times 10^{-4}$ for the sum, derived from the Lyman Limit opacity. The impact on cosmological theory is briefly discussed.


text:
# Difference between revisions of "1998 AHSME Problems/Problem 28"

## Solution

Let $\theta = \angle DAB$, so $2\theta = \angle CAD$ and $3 \theta = \angle CAB$. Then, it is given that $\cos 2\theta = \frac{AC}{AD} = \frac{2}{3}$ and

$\frac{BD}{CD} = \frac{AC(\tan 3\theta - \tan 2\theta)}{AC \tan 2\theta} = \frac{\tan 3\theta}{\tan 2\theta} - 1.$

Now, through the use of trigonometric identities, $\cos 2\theta = 2\cos^2 \theta - 1 = \frac{2}{\sec ^2 \theta} - 1 = \frac{1 - \tan^2 \theta}{1 + \tan ^2 \theta} = \frac{2}{3}$. Solving yields that $\tan^2 \theta = \frac 15$. Using the tangent addition identity, we find that $\tan 2\theta = \frac{2\tan \theta}{1 - \tan ^2 \theta},\ \tan 3\theta = \frac{3\tan \theta - \tan^3 \theta}{1 - 3\tan^2 \theta}$, and

$\frac{BD}{CD} = \frac{\tan 3\theta}{\tan 2\theta} - 1 = \frac{(3 - \tan^2 \theta)(1-\tan ^2 \theta)}{2(1 - 3\tan^2 \theta)} - 1 = \frac{(1 + \tan^2 \theta)^2}{2(1 - 3\tan^2 \theta)} = \frac{9}{5}$

and $\frac{CD}{BD} = \frac{5}{9} \Longrightarrow m+n = 14 \Longrightarrow \mathbf{(B)}$. (This also may have been done on a calculator by finding $\theta$ directly)

## Solution 2

Let $AC=2$ and $AD=3$. By the Pythagorean Theorem, $CD=\sqrt{5}$. Let point $P$ be on segment $CD$ such that $AP$ bisects $\angle CAD$. Thus, angles $CAP$, $PAD$, and $DAB$ are congruent. Applying the angle bisector theorem on $ACD$, we get that $CP=\frac{2\sqrt{5}}{5}$ and $PD=\frac{3\sqrt{5}}{5}$. Pythagorean Theorem gives $AP=\frac{\sqrt{5}\sqrt{24}}{5}$.

Let $DB=x$. By the Pythagorean Theorem, $AB=\sqrt{(x+\sqrt{5})^{2}+2^2}$. Applying the angle bisector theorem again on triangle $APB$, we have $$\frac{\sqrt{(x+\sqrt{5})^{2}+2^2}}{x}=\frac{\frac{\sqrt{5}\sqrt{24}}{5}}{\frac{3\sqrt{5}}{5}}$$ The right side simplifies to$\frac{\sqrt{24}}{3}$. Cross multiplying, squaring, and simplifying, we get a quadratic: $$5x^2-6\sqrt{5}x-27=0$$ Solving this quadratic and taking the positive root gives $$x=\frac{9\sqrt{5}}{5}$$ Finally, taking the desired ratio and canceling the roots gives $\frac{CD}{BD}=\frac{5}{9}$. The answer is $\fbox{(B) 14}$.

 1998 AHSME (Problems • Answer Key • Resources) Preceded byProblem 27 Followed byProblem 29 1 • 2 • 3 • 4 • 5 • 6 • 7 • 8 • 9 • 10 • 11 • 12 • 13 • 14 • 15 • 16 • 17 • 18 • 19 • 20 • 21 • 22 • 23 • 24 • 25 • 26 • 27 • 28 • 29 • 30 All AHSME Problems and Solutions


text:
RUS  ENG JOURNALS   PEOPLE   ORGANISATIONS   CONFERENCES   SEMINARS   VIDEO LIBRARY   PACKAGE AMSBIB
 General information Latest issue Forthcoming papers Archive Impact factor Subscription Guidelines for authors License agreement Submit a manuscript Search papers Search references RSS Latest issue Current issues Archive issues What is RSS

 Mat. Zametki: Year: Volume: Issue: Page: Find

 Quasirecognition by Prime Graph of $^2D_{n}(3^\alpha)$ where $n=4m+1\ge 21$ and $\alpha$ is OddA. Babai, B. Khosravi 323 Criteria for the Existence of an Invariant Measure for Groups of Homeomorphisms of the LineL. A. Beklaryan 335 On the Nonlinear Poisson Bracket Arising in Nonholonomic MechanicsA. V. Borisov, I. S. Mamaev, A. V. Tsiganov 340 On the Deformation Method of Study of Global Asymptotic StabilityG. E. Grishanina, N. G. Inozemtseva, M. B. Sadovnikova 350 Homogenization in the Problem of Long Water Waves over a Bottom Site with Fast OscillationsV. V. Grushin, S. Yu. Dobrokhotov 359 Ore Extensions of Hopf CoquasigroupsZh. Jiao, H. Meng 376 Almost Split Sequences of the Quantum Double of a Finite GroupJ. Dong, H. Chen 385 Analytic Wavelets in Multiply Connected Domains with Circular BoundariesG. A. Dubosarskij 400 Asymptotics of the Spectrum and Eigenfunctions of the Magnetic Induction Operator on a Compact Two-Dimensional Surface of RevolutionA. I. Esina, A. I. Shafarevich 417 $L_p$-Inequalities for Differences and Derivatives of Positive Order for Functions with Spectrum in the Ball or Spherical LayerN. L. Kudryavtsev 433 The Estermann Cubic Problem with Almost Equal SummandsZ. Kh. Rakhmonov 445 Prym Differentials on a Variable Compact Riemann SurfaceM. I. Tulina, V. V. Chueshev 457 Brief Communications Differential Equation for the Four-Point CorrelatorN. I. Vishnevskaya 475 On the Asymmetry of the Past and the Future of the Ergodic $\mathbb{Z}$-ActionI. Yaroslavtsev 479


text:
# Install Software with uuid not guid

This topic contains 5 replies, has 2 voices, and was last updated by  bvi1998 . 3 years, 11 months ago.

• Author
Posts
• #14730

bvi1998 .
Participant

Hi, We have automated the installation of servers, and now want to use DSC. Because the just built server will not yet have a static ip and therefore not in DNS right away, we will use the uuid of the server for its .mof. I have already scripted the DSC client configuration for the new server, but now I'm on to the installation of software via the pull server.

Here is what I want to do, but I'm not sure of how to do it:

– after the server has been built, I will run a configuration script called InstallSoftware using $computername and$uuid which I supply.
– the mof file is placed in a directory called c:\dsc, and is named servername.mof

But when I then copy the file to a uuid.mof (because I want the servername.mof to remain), the $computername and$uuid values are no longer valid, so the copy won't work. Also, I then cannot create the hashfile either.

So, how do I call the InstallSoftware config script with computername and uuid parameters, then be able to copy the file to another directory and create the checksum file?

Thanks!

• #14731

Don Jones
Keymaster

I don't think I'm following what you're doing or asking ;).

Why do you have two MOF files? You know you can only apply one MOF via DSC, right? But you have two?

If you have servername.mof in C:\DSC, then you'd start DSC by running "Start-DSCConfiguration -Path C:\DSC". However, that command is going to try and remote into the server via Remoting, because that's how it works, even though the MOF is local.

What hash file are you talking about?

I think you might need to be a little clearer about what all these moving parts are, and what you're trying to do.

If the concern is, "the server won't be able to resolve its own name via DNS, because it isn't in DNS yet," then just name the MOF localhost.mof. If you run Start-DSCConfiguration on that machine, it'll connect to itself and start configuring.

If the concern is, "I'm trying to do a file copy by $computername and$uuid are no longer in scope," then you need to fix that. Do your file copy while those variables are still in scope.

• #14733

Don Jones
Keymaster

OK. That makes it a lot clearer.

In Pull mode, yes, MOF files are given a GUID. It isn't a "fake" GUID, it's just a GUID. One or more nodes are then assigned to pull that GUID. That configuration is done in the nodes' LCM. And yes, the pull server does need a checksum – New-DscChecksum can create one if you just give it the path of a MOF file. You can actually have it easily produce checksums for every file in the folder, so you don't actually need to know the MOF file name ahead of time. Just checksum everything!

I'd have to see that InstallSoftware script, then, if you can attach it. I do exactly this same approach and it works perfectly.

• #14732

bvi1998 .
Participant

This is a pull server scenario.

From what I understand, on the PULL server, I need to create a .mof file with the guid, or a fake guid, so that the client server knows what to PULL.

I have already configured that uuid name on the client in the the DSC configuration locally on the new server. That's not an issue. The client knows what .mof file to look for.

Yep, I do know that I can only have one .mof file, and that is all I would have. The original file would be called servername.mof and the one that would be used might be called 76AAFD9B-9388-45DD-B464-217A336E358.mof. The servername.mof file will just be sitting in some directory, ignored. It's there for my own logging, if you will.

So, the new 76AAFD9B-9388-45DD-B464-217A336E358.mof file – I was under the impression I need a checksum file as well.

Yep I'm trying to do the file copy while the variables are still in scope, but they are not there. I run the script (configuration, let's say I'm adding a feature) by calling it with parameters.
For instance, ./installsoftware -computername servername -uuid 76AAFD9B-9388-45DD-B464-217A336E358. Within that script the servername.mof file is created.
I then have to rename it, or copy it with the 76AAFD9B-9388-45DD-B464-217A336E358.mof name. I then have to create the checksum. For some reason the $uuid parameter value is no longer available. Or, cannot I not call the configuration file as a script? In otherwords, I need to call these dsc configuration scripts as scripts at the PS command line. Perhaps I cannot do this? The bottom line I guess: How to call a configuration script from the command line using parameters. 🙂 Maybe that's the answer to all my issues.. Thanks ! • #14734 Don Jones Keymaster And my general approach looks like this...  [CmdletBinding()] Param([string]$guid) Configuration Whatever { Node DoesNotMatter { } } Whatever $oldfile = '.\whatever\doesnotmatter.mof'$newfile = ".\path\to\pull\$guid.mof" copy$oldfile $newfile new-dscchecksum$newfile

Something like that. Assuming you're doing the same thing, if it isn't working, happy to have a look. Just attach it as a TXT file, we don't take PS1 uploads.

• #14736

bvi1998 .
Participant

Ah, I think I have it, thanks for your help!

You must be logged in to reply to this topic.


text:
MathSciNet bibliographic data MR1357360 (97b:20057) 20F32 (57M07) Olʹshanskiĭ, A. Yu. ${\rm SQ}$${\rm SQ}$-universality of hyperbolic groups. (Russian) Mat. Sb. 186 (1995), no. 8, 119--132; translation in Sb. Math. 186 (1995), no. 8, 1199–1211 Article

For users without a MathSciNet license , Relay Station allows linking from MR numbers in online mathematical literature directly to electronic journals and original articles. Subscribers receive the added value of full MathSciNet reviews.


text:
• Effect of heavy quark symmetry on the mass difference ofB-system in minimal left right symmetric model

• Fulltext

https://www.ias.ac.in/article/fulltext/pram/046/01/0041-0050

• Keywords

Left right symmetry; gauge bosons

• Abstract

An estimation of the mass difference of$$B_d^0 - \bar B_d^0$$ system with heavy quark symmetry formalism is presented. The effective Hamiltonian describing the transition$$\bar hd \leftrightarrow h\bar d$$ (whereh=b forBd0-system) is considered in a manifest left right symmetric (MLRS) model along with contribution from neutral Higgs boson. We use the spin and flavor symmetry for heavy quarks to obtain the transition matrix element 〈Bd0|ℋeff(x)|$$\bar B_d^0$$d0〉 in terms of Isgur-Wise function. Assuming thatBd0 and$$\bar B_d^0$$ states are at rest, we find that Isgur-Wise function turns out to be unity. However using the experimental values of ΔMK and$$\Delta M_{B_4 }$$ as input, we find thatMR=835 GeV andMH⩾2·9 TeV.

• Author Affiliations

1. Physics Department, Utkal University, Bhubaneswar - 751 004, India

• Pramana – Journal of Physics

Current Issue
Volume 93 | Issue 5
November 2019

• Editorial Note on Continuous Article Publication

Posted on July 25, 2019


text:
# Pair trading strategy : how to use "PairTrading" package

October 25, 2011
By

(This article was first published on My Life as a Mock Quant in English, and kindly contributed to R-bloggers)

Mr.Ishikawa(my old friend) and I developed "PairTrading" package, and uploaded it on CRAN.
This article shows you how you can use it.

The pair trading is a market neutral trading strategy and gives traders a chance to profit regardless of market conditions. The idea of this strategy is quite simple.
1 : Select two stocks(or any assets) moving similarly
2 : Short out-performing stock, buy under-performing one
3 : If "spread"(price difference between two stocks) converge, close your position.

So, Let's start to explain how to use this package.
(This example is in PDF manual of this package)

0: Install & load package
You can install and load "PairTrading" package via CRAN in the same way as other packages.

> install.packages("PairTrading")> library(PairTrading)

1: Load sample data
We prepared sample stock price data in our package. You can load it by using "data" command.

> #load sample stock price data> data(stock.price)

2: Estimate parameters
Next, We extract two stock prices(from 31 Mar, 2008) and estimate parameters.

> #select 2 stocks> price.pair <- stock.price[,1:2]["2008-03-31::"]> #Estimate parameters & plot spread> reg <- EstimateParameters(price.pair, method = lm)

At the moment, we have only normal linear regression method to estimate parameters, but we will develop more sophisticated method in the future.The estimation result contains the following contents.

> str(reg)List of 3 $spread :An ‘xts’ object from 2008-03-31 to 2011-08-05 containing: Data: num [1:821, 1] 0.26 0.271 0.294 0.275 0.255 ... - attr(*, "dimnames")=List of 2 ..$ : NULL  ..$: chr "7203" Indexed by objects of class: [Date] TZ: xts Attributes: NULL$ hedge.ratio: num 0.285 $premium : num 6.34 The most important thing in this estimation is "spread", then we try to plot it. > plot(reg$spread)

And, you can check the stationarity of that by using "IsStationary" function.
This function return the result of two types unit root test.

> #check stationarity> IsStationary(reg$spread, 0.1) PP.test adf.test TRUE TRUE  ( augmented Dickey–Fuller test (ADF) and Phillips-Perron test) 3: Estimate parameters for back-test To run back-test, you have to estimate parameters historically by using "EstimateParametersHistorically"function. This function do something like "rolling regression" to estimate parameters. This point is different from "EstimateParameter" function. > #estimate parameters for back test> params <- EstimateParametersHistorically(price.pair, period = 180)> #create & plot trading signals> str(params)An ‘xts’ object from 2008-12-18 to 2011-08-05 containing: Data: num [1:642, 1:3] 0.065 0.0577 0.0396 0.0136 0.021 ... - attr(*, "dimnames")=List of 2 ..$ : NULL  ..$: chr [1:3] "spread" "hedge.ratio" "premium" Indexed by objects of class: [Date] TZ: xts Attributes: NULL 4: Create trading signal Next, you create trading singal using estimated spread. "Simple" function give a very simple trading strategy(If The spread is more(less) than specified value, you will buy(sell)) > #create & plot trading signals> signal <- Simple(params$spread, 0.05)> barplot(signal,col="blue",space = 0, border = "blue",xaxt="n",yaxt="n",xlab="",ylab="")> par(new=TRUE)> plot(params$spread) In this case, The trading signal is drawn as below. Last, you can check the performance of pair trading by using "Return" function. > #performance> return.pairtrading <- Return(price.pair, lag(signal), lag(params$hedge.ratio))> plot(100 * cumprod(1 + return.pairtrading))

In this case, our strategy seems to work correctly :-)

6: Conclusion and remarks
Pair trading is well-known trading strategy, and I introduced "PairTrading" package in this article.
We would like to modify this package to be more useful and fit in real-market.
If you have any suggestion, please let me know.

And we created a presentation slide to explain the basic concept of pair trading.
It may be useful for you to understand the basic concept of pair trading if you are interested in it.

Enjoy!

To leave a comment for the author, please follow the link and comment on his blog: My Life as a Mock Quant in English.

R-bloggers.com offers daily e-mail updates about R news and tutorials on topics such as: visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...

If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Comments are closed.


text:
Notes On Implications - CBSE Class 11 Maths
Implication: A compound statement formed using the connecting words "If - then..." is called an implication or a conditional statement. Now, the compound statement can be expressed as "if p, then q". If statement p is true, then statement q will be true. Such compound statements are called implications or conditional statements. It is formed using the connecting words "if-then." p implies q is represented as p ⇒ q. A compound statement, "if p, then q," is always true, except in the case when p is true and q is false, because a true statement cannot imply a false statement. Consider the statement 'If 3 is a factor of 9, then it is also a factor of 18.' The component statements are: p: 3 is a factor of 9. q: 3 is a factor of 18. Statement p ⇒ q : 3 is a factor of 9 implies that 3 is also a factor of 18. p ⇒ q can also be expressed as: • If p, then q. • ~q  if ~p. • p only if q. • p is necessary condition for q. • q is sufficient condition for p. Converse, inverse and contrapositive of an implication Consider an implication, p ⇒ q The converse of p ⇒ q is q ⇒ p. The inverse of p ⇒ q is ~p ⇒ ~q The contrapositive of p ⇒ q is ~q ⇒ ~p. Examples: 1) Converse, inverse and contrapositive of the implication — if two sides of a triangle are equal, then it is an isosceles triangle. The component statements are: p: Two sides of a triangle are equal. q: The triangle is isosceles. The implication of the statements is p ⇒ q. The conditional statement, p ⇒ q: If two sides of a triangle are equal, then it is an isosceles triangle. Converse: q ⇒ p: If a triangle is isosceles, then two of its sides are equal. Inverse: ~p ⇒ ~q: If two sides of a triangle are not equal, then it is not an isosceles triangle. Contrapositive: ~q ⇒ ~p: If a triangle is not isosceles, then two of its sides are not equal. 2) Implication: If the sides of a triangle are equal, then its angles are also equal. Converse: If the angles of a triangle are equal, then its sides are also equal. Here, both the statements are true. Such statements can also be expressed as — the sides of a triangle are equal if and only if its angles are equal. Such compound statements are called a bi-implication or bi-conditional. Bi-implication: A compound statement involving statements p and q, which is in the form of "p if and only if q," is called a bi-implication or bi-conditional. p if and only if q is represented by p ⇒ q. p if and only if q or p ⇒ q can also be expressed as: • q if and only if p • p iff q • p is a necessary and sufficient condition for, q and vice-versa If p and q have the same truth values (either true or false), then the bi-implication is true. If either p or q is false, then the bi-implication is false.

#### Summary

Implication: A compound statement formed using the connecting words "If - then..." is called an implication or a conditional statement. Now, the compound statement can be expressed as "if p, then q". If statement p is true, then statement q will be true. Such compound statements are called implications or conditional statements. It is formed using the connecting words "if-then." p implies q is represented as p ⇒ q. A compound statement, "if p, then q," is always true, except in the case when p is true and q is false, because a true statement cannot imply a false statement. Consider the statement 'If 3 is a factor of 9, then it is also a factor of 18.' The component statements are: p: 3 is a factor of 9. q: 3 is a factor of 18. Statement p ⇒ q : 3 is a factor of 9 implies that 3 is also a factor of 18. p ⇒ q can also be expressed as: • If p, then q. • ~q  if ~p. • p only if q. • p is necessary condition for q. • q is sufficient condition for p. Converse, inverse and contrapositive of an implication Consider an implication, p ⇒ q The converse of p ⇒ q is q ⇒ p. The inverse of p ⇒ q is ~p ⇒ ~q The contrapositive of p ⇒ q is ~q ⇒ ~p. Examples: 1) Converse, inverse and contrapositive of the implication — if two sides of a triangle are equal, then it is an isosceles triangle. The component statements are: p: Two sides of a triangle are equal. q: The triangle is isosceles. The implication of the statements is p ⇒ q. The conditional statement, p ⇒ q: If two sides of a triangle are equal, then it is an isosceles triangle. Converse: q ⇒ p: If a triangle is isosceles, then two of its sides are equal. Inverse: ~p ⇒ ~q: If two sides of a triangle are not equal, then it is not an isosceles triangle. Contrapositive: ~q ⇒ ~p: If a triangle is not isosceles, then two of its sides are not equal. 2) Implication: If the sides of a triangle are equal, then its angles are also equal. Converse: If the angles of a triangle are equal, then its sides are also equal. Here, both the statements are true. Such statements can also be expressed as — the sides of a triangle are equal if and only if its angles are equal. Such compound statements are called a bi-implication or bi-conditional. Bi-implication: A compound statement involving statements p and q, which is in the form of "p if and only if q," is called a bi-implication or bi-conditional. p if and only if q is represented by p ⇒ q. p if and only if q or p ⇒ q can also be expressed as: • q if and only if p • p iff q • p is a necessary and sufficient condition for, q and vice-versa If p and q have the same truth values (either true or false), then the bi-implication is true. If either p or q is false, then the bi-implication is false.

Previous
Next


text:
Precision Measurement of the B to X_s \gamma Photon Energy Spectrum, Branching Fraction, and Direct CP Asymmetry A_{CP}(B to X_{s+d}\gamma

Abstract : The photon spectrum in the inclusive electromagnetic radiative decays of the $B$ meson, $B \to X_{s} \gamma$ plus $B \to X_{d} \gamma$, is studied using a data sample of $(382.8 \pm 4.2) \times 10^6$ $\Upsilon(4S) \to B\overli\ ne{B}$ decays collected by the \babar\ experiment at SLAC. The spectrum is used to extract the branching fraction ${\cal B}(B \to X_{s} \gamma)=(3.21 \pm 0.33)\times 10^{-4}$ for $E_{\gamma}>1.8 \gev$ and the direct CP asymmetry $A_{CP}(B \to X_{s+d} \gamma)=0.057 \pm 0.063$. The effects of detector resolution and Doppler smearing are unfolded to measure the photon energy spectrum in the $B$ meson rest frame.
Document type :
Journal articles
Physical Review Letters, American Physical Society, 2012, 109, pp.191801. <10.1103/PhysRevLett.109.191801>

http://hal.in2p3.fr/in2p3-00717277
Contributor : Sabine Starita <>
Submitted on : Thursday, July 12, 2012 - 2:26:20 PM
Last modification on : Tuesday, October 11, 2016 - 3:21:33 PM

Citation

J. P. Lees, V. Poireau, V. Tisserand, D. Bernard, M. Verderi, et al.. Precision Measurement of the B to X_s \gamma Photon Energy Spectrum, Branching Fraction, and Direct CP Asymmetry A_{CP}(B to X_{s+d}\gamma. Physical Review Letters, American Physical Society, 2012, 109, pp.191801. <10.1103/PhysRevLett.109.191801>. <in2p3-00717277>

Metrics

Consultations de la notice