text:
# Find the radius of the circle?

Two Circle of an equal of an radii are drawn , without any overlap , in a semicircle of radius 2 cm.
If these are the largest possible circles that the semicircle can accomodate , then

what is the radius of each of the circles?

Thanks in advance.

-
How would you fit two radius-$0.5$ circles inside a semicircle of radius 1? –  Henning Makholm Apr 3 '12 at 15:37
@Henning I solved it considering a circle.I am sorry. –  vikiiii Apr 3 '12 at 15:40
If you're allowed to use coordinates, then it becomes slightly easy... –  Ｊ. Ｍ. Apr 3 '12 at 15:46
@J.M. ya.we can solve using any of the methods. –  vikiiii Apr 3 '12 at 15:50

## 3 Answers

This is a difficult problem if you are expected to give a full formal argument. However, it is intuitively quite reasonable to assume that the "best" circles will be tangent to the diameter of the semicircle, tangent to each other, and tangent to the circle of radius $2$. Under the assumption that these are indeed the best circles, we will find the answer. (Alternately, we could look at the problem with a full circle instead of a semicircle, and four small circles, and assume that the symmetrical configuration is best.)

Draw a picture, and concentrate on the small circle $\mathcal{K}$ on the right. Let $O$ be the centre of the semicircle, and let $C$ be the centre of $\mathcal{K}$. Let $T$ be the point where $\mathcal{K}$ is tangent to the semicircle.

Note that the line $OT$ is perpendicular to the common tangent line at $T$. Note also that the line $CT$ is perpendicular to the common tangent line at $T$. It follows that the line through $O$ and $T$ is the same line as the line through $C$ and $T$. In other words, the radius $OT$ of the semicircle passes through $C$.

Let $r$ be the radius of $\mathcal{K}$. Drop a perpendicular from $C$ to the point $P$ on the diameter of the semicircle. Note that $OP=r$. By the Pythagorean Theorem, $(OC)^2=(PO)^2+(PC)^2=2r^2$, so $OC=\sqrt{2}r$. It follows that $$2=OT=OC+CT=\sqrt{2}r +r.$$ Now we are finished. We have $r=\frac{2}{\sqrt{2}+1}$. It may be that in the answer given, the denominator was rationalized by multiplying top and bottom by $\sqrt{2}-1$. That gives the answer $r=2(\sqrt{2}-1)$.

Added: Thanks to David Mitra for the diagram!

-
$\frac{2}{\sqrt{2}-1}\approx 4.828$. It should probably be $1+\sqrt{2}$ in the denominator. –  example Apr 3 '12 at 17:04
@example: Thanks for pointing out the typo. Fixed! My fingers were looking forward to the rationalization of the denominator. –  André Nicolas Apr 3 '12 at 17:08
Would you mind if I added a diagram to your answer? –  David Mitra Apr 3 '12 at 17:29
@DavidMitra: Not at all, and thanks in advance. But if one does handwaving, as I do, then probably one should go all the way and handwave to the $4$ circle version. So the argument I give is not really worth illustrating. –  André Nicolas Apr 3 '12 at 17:35
I had already drawn it, but you posted first; so I'll just add it to your answer. –  David Mitra Apr 3 '12 at 17:40

Due to symmetry two circles in a semicircle is the same problem as one in a quatercircle or four in a full circle. If we look at a quatercircle originating at the origin, with radius $r$ and completely contained in the first quadrant, then the circle has to be centered at a point $(c,c)$, touching the x axis, the y axis and the quatercircle at $(r/\sqrt{2},r/\sqrt{2})$.

To find out how large the circle may be, without crossing the x and y axes, consider the distance from the center of this circle to one axis being equal to the distance to the point $(r/\sqrt{2},r/\sqrt{2})$ $$c=\sqrt{2\left(\frac{r}{\sqrt{2}}-c\right)^2}=\sqrt{2} \left(\frac{r}{\sqrt{2}}-c\right)$$ $$\Rightarrow c = \frac{r}{1+\sqrt{2}}$$

For $r=2\,\text{cm}$, $c\approx 0.83\,\text{cm}$.

-

By construction, the maximum radius of two circles of equal size in a circle of radius r is 1/2r. The maximum radius of 4 circles of equal size in a circle of radius x is 1/4r.

-
Have you got the right diagram - I think I can get $\frac r {1+\sqrt2}$ for four circles –  Mark Bennet Apr 3 '12 at 16:06


text:
lilypond-user
[Top][All Lists]

## Re: Making a lilypond-book -- IT WORKS...sort of

 From: Mats Bengtsson Subject: Re: Making a lilypond-book -- IT WORKS...sort of Date: Mon, 05 Jul 2004 15:42:49 +0200 User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040616

Jan Nieuwenhuizen wrote:

Mats Bengtsson writes:

Having had a look at the full files, I realize what's up,

Thanks looking into this, Mats, however

namely a missing feature in lilypond-book!

separate include directory for each \lilypondfile{...} or
\begin{lilypond}...\end{lilypond} directive.

I object to this feature request.  It doesn't seem intuitive (never
seen something like this) or necessary: there are several simple ways
to tackle this problem.  I think it makes a lot of sense that a file
name should be unique within a project.

Really? I think it makes sence to do as Will, namely to put the
cello part in a file called cello.ly. If you then have one separate
directory for each movement, it would just add redundancy to also
att the movement number to each file within the directory.
Compare to the normal form in database design, that tries to
remove such redundancy.

Also, I actually think that you have seen similar approaches in
recursive Makefile structures, for example, where the top level
makefile has to set some extra paths in order for the included
lower level makefiles to work.

Also, it means that the mvmt1/mvmt1.ly file will not work stand-alone

Why is that?

Assume that you have a lilypond-book document in the
directory main/ containing
\lilypondfile{mvmt1/mvmt1.ly}
Then, the file main/mvmt1/mvmt1.ly has to contain include directives
of the form
\include "mvmt1/piano.ly"
in order to work.
This means that it will search for main/mvmt1/mvmt1/piano.ly when
you run 'lilypond mvmt1.ly' in the directory main/mvmt1/.

I think this is a major difference to program development file
structures, where it's uncommon to have one and the same file
used both as a standalone top-level file and as an include file
in a larger project (maybe with the exception of Makefiles as
indicated above).

/Mats

format: plain


text:
# Magnetism, Orbits, Friction-Is there a relationship?

1. Jan 5, 2004

### timejim

I hope this is the right Thread for this discussion. I was wondering by what actions do Planetary Bodies, such as the Earth, continue in their orbits, millenia after millenia and so on, without decaying and being "sucked" into the Sun, in a rather short period of Time. Something doesn't add up to me. If the Sun has "Magnetic" force radiating outwards from it in all directions, why, as the Earth orbits the Sun, does not its Rotation slow down, and its orbit Decay, as it moves thru this "field of magnetic attraction?". Wouldn't the surrounding "fields", as it interacts with the Earths magnetic field, create a sort of "Magnetic" friction? Would this not cause the Earths' roattion to slow? If not, why not? Likewise, would the Earths orbit be affected by the slowing of the Earths rotation from the friction induced by the magnetic field? If you pass 2 magnets close to each other they react in a physical way, i.e., moving, twisting, etc. Wouldn't this be the case with regards to the Earth traveling thru these radiated magnetic fields from the Sun? Just asking, it does interest me, though.

2. Jan 5, 2004

### Integral

Staff Emeritus
When the solar system fromed it had a significant amount of spinning motion, this motion was transfered to the planets as they formed. Thus the orbital motion of the planets is due to initial angular Momentum of the solar system.

Gravity is a weak but far reaching force, at the distances involved in the solar system magnetic forces are very small, thus have no signifigant effect on planetary motion.

If the earths rotation about the sun does slow it will not cause it to fall into the sun, just the opposite, a lower orbital velocity will mean that it must move to a orbit FURTHER from the sun.

Janus?

3. Jan 5, 2004

### Jimmy

$$V_o = \sqrt{\frac{G M}{R}}$$

If you arrange that to solve for R:

$$R = \frac{G M}{V^2}$$

It would seem that if V decreases, R would increase. But the first formula is for determining the velocity one would need to maintain a circular orbit at a particular distance.

You would have to increase your velocity to reach a higher orbit and then decelerate to the new orbital velocity depending on the height of the new orbit. * see http://users.commkey.net/Braeunig/space/orbmech.htm [Broken]

If the earth were to stop dead in its tracks, it would fall into the sun.

Last edited by a moderator: May 1, 2017
4. Jan 5, 2004

### Staff: Mentor

The forces involved in the interaction of the magnetic fields are not big enough to be relevant to the orbits of the planets. They lose strength quickly with distance.

edit: can't think and type at the same time.

Last edited: Jan 6, 2004
5. Jan 5, 2004

### waynet

This thread kind of makes me wonder of something else that I have thought about. What about the expansion of the universe? If the stretching of space is uniform, would it have an effect on smaller scales like the solar system? Say for instance, if the universe had doubled in size the last five billion years, wouldn't it have a similar effect on expanding the solar system? Or do you think local gravity would completely overcome this force?

6. Jan 6, 2004

### timejim

Good thought. I wonder about this, too. If everything is expanding away, what about solar systems or even Galaxies. Eventually you would be alone in the Universe. Doesn't make sense to me, formulas or no formulas.

7. Jan 6, 2004

### Janus

Staff Emeritus
Actually, you would have to accelerate to match match the orbital velocity of the higher orbit.

Assuming you are moving from an orbit of radius R1 to an orbit of radius R2.

You increase your velocity at some point of orbit 1. This will put you in a new orbit. This new orbit will be an eliptical one, with its perhelion (closest distance to the Sun) being at orbit 1 and its aphelion(furthest distance to the Sun) being at orbit 2.

Essentially, any change in velocity you make at an particular point of an orbit does not effect the orbit at that point but changes the orbital distance of the point 180° away.

At perhelion, it will will be traveling much faster (by the amount of the added velocity) than the orbital velocity of orbit 1.

As it climbs out to aphelion it will lose velocity such that by the time it reaches orbit 2, it will be traveling much slower than orbital velocity of orbit 2.

At which point you would accelerate to add velocity to match orbit 2. (By adding velocity at aphelion you increase the distance of perheion. Increase it enough, and you raise the perhelion to the same distance as aphelion and you get a circular orbit. )

One formula for determining the velocity at aphelion of an eliptical orbit is

$$V_{a}= \sqrt{\frac{2GM}{(R_{p}+R_{a})}\frac{R_{p}}{R_{a}}}$$

$$R_{a}$$ is the distance of the aphelion
and
$$R_{p}$$ is the distance of the perhelion

To get the velocity at perhelion, just transpose the values for perhelion distance and aphelion distance in the formula.

The formula for determining how much velocity you need to add to orbit 1 in order to enter the eliptical orbit needed to reach orbit 2 is

$$\Delta V = V_{R_{2}}\left[ \sqrt{\frac{2R_{1}}{R_{1}+R_{2}}}-1 \right]$$

$$V_{R_{1}}$$ is the orbital velocity of orbit 1.

Last edited: Jan 6, 2004
8. Jan 6, 2004

### alexbib

How do you get to these equations?

edit:

Oh wait, you have m*ra*va=m*rp*vp because angular momentum is conserved, and 1/2mva^2+-GMm/ra=1/2mvp^2+-GMm/rp and you just solve these two equations for what you want. Is this right?

Last edited: Jan 6, 2004
9. Jan 6, 2004

### Jimmy

Thanks for that correction Janus. You made it very easy to understand. I guess that's why you're a mentor, eh? I'll definitely study those formulas.

Last edited: Jan 6, 2004
10. Jan 6, 2004

### krab

Given that space junk in insufficiently high orbit eventaully comes crashing to earth, your comments surprise me.

11. Jan 6, 2004

### alexbib

yeah, he's mistaken. At distance r, the earth always accelerate towards the sun at the same rate. If it is moving sufficiently fast(tengentially), sqrt(GM/r), the acceleration will only make it stay in orbit. However, if it is slower, it will fall into the sun. (centrifugal force not strong enough to cancel the sun's attraction, if you look at it along the earth to sun |distance| axis)

Last edited: Jan 6, 2004
12. Jan 6, 2004

### Jimmy

Well, everyone makes mistakes from time to time.

Actually, whether the earth would fall into the sun depends on how much the velocity decreased. It could just fall into an orbit with a higher eccentricity if the change in V was small enough.

13. Jan 6, 2004

### Janus

Staff Emeritus
Correct. In fact, the Earth would have to lose about 99% of its present orbital velocity of 30km/sec in order to hit the Sun.

This means it would take a greater velocity change (and thus energy expended) to cause the Earth to fall into the Sun than it would take to throw the Earth completely free of the Solar System. (about 41% of its present orbital velocity.)

Last edited: Jan 6, 2004
14. Jan 6, 2004

### Staff: Mentor

Surprisingly enough, thats atmospheric drag! In space!

15. Jan 6, 2004

### alexbib

Cool, thx for precising that! Sounds logical, as long as the orbit has a perigee higher than the sun's radius, it should not fall into the sun. (It'd probably get a bit too hot for comfort though )

16. Jan 6, 2004

### Jimmy

Thanks Janus. I wasn't sure about the exact numbers. In fact, I was going to asked what the maximum change in velocity would need to be for the Earth to fall into the sun.

Gee, I'm not sure which fate would be worse.

17. Jan 9, 2004

### Vanja

Simple solution

These I like best. Simple solutions to questions.
Check out http://www.geocities.com/terella1/ regarding planets and magnetism. Fact is that magnetic fields do not rotate with the planet.
May sound silly. But ... Just check it out!

Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook


text:
# Math Help - Dilation

1. ## Dilation

Given a dilation with the origin O (0, 0), by observation determine the scale factor "K."

2. Hello winsome
Originally Posted by winsome
Given a dilation with the origin O (0, 0), by observation determine the scale factor "K."
Take a point $A$ on the original shape. Join it to the origin $O$. Take the image $A'$ of this point on the new shape; join to $O$. The scale factor $k$ of the dilation is given by
$k = \dfrac{OA'}{OA}$
Grandad

3. Given a dilation with the origin O (0, 0), by observation determine the scale factor "K."
DO, K = (5, 0) (10, 0)
The dilation an expansion.

4. Try visualize it, you got two lines on the x-axis. One goes from 0 to 5, we call that l, and the other goes from 0 to 10 which we call m. How much 'longer' is m compared to l?


text:
# System of Nonlinear Equations

## Question

Find the value or values of that are solutions to this system of equations:

$x^2+y^2=5$$x+y=1$

## Solution

If the equations look familiar enough so that you can sketch them by hand, then doing so may help you get your arms around the problem. (The calculator provided for the exam does not have graphing capability, so if you want to see a graph you pretty much need to make it yourself. Learn more about it here.)

A very rough sketch will do. I think my sketch (left) is pretty crude. For this problem, the first equation is for a circle with center at the origin and radius equal to the square root of 5. The square root of 5 is about 2.2, so the circle goes through points (2.2, 0); (0, 2); (-2.2, 0); and (0, -2.2), approximately.

The second is for a line with a slope of -1 and intercepts at  $x=1$ and $y=1$. The solutions to the system lie at the points of intersection of the graphs, one in the second quadrant (where is negative and is positive) and the other in the fourth quadrant (where is positive and is negative).

The sketch is just to help you get your arms around the problem. If it doesn’t work for you, you can skip it — it’s not essential.

You can solve using substitution. If $x+y=1$ then $y=1-x$; substitute $1-x$ for $y$ in the equation $x^2+y^2=5.$

 $x^2+(1-x)^2=5$ $2x^2-2x-4=0$ Simplify: Multiply out, subtract 5 from each side, and collect like terms. $x^2-x-2=0$ Divide both sides by 2. $(x-2)(x+1)=0$ Factor $x=-1,&space;2$ Set each factor equal to 0 and solve.

That’s all you need to answer the question.

To check your answers, use the equation $y=1-x$ to find the y-values that correspond to the x-values you found, and then substitute x- and y-values into the equation $x^2+y^2=5.$

This question is about nonlinear systems of equations. (The whole system gets labeled nonlinear even though one of the equations is linear.)


text:
# CHEMISTRY: The Molecular Nature of Matter and Change 2016

## Educators

### Problem 1

What is the key difference between an element and a compound

Ahmed A.

### Problem 2

List two differences between a compound and a mixture.

Ahmed A.

### Problem 3

List two differences between a compound and a mixture.
(a) Calcium chloride, used to melt ice on roads, consists of two elements, calcium and chlorine, in a fixed mass ratio.
(b) Sulfur consists of sulfur atoms combined into octatomic molecules.
(c) Baking powder, a leavening agent, contains 26$\%$ to 30$\%$ sodium hydrogen carbonate and 30$\%$ to 35$\%$ calcium dihydrogen phosphate by mass.
(d) Cytosine, a component of DNA, consists of H, C, N, and O atoms bonded in a specific arrangement.

Ahmed A.

### Problem 4

Classify each substance in Problem 2.3 as an element, compound, or mixture, and explain your answers.

Ahmed A.

### Problem 5

Explain the following statement: The smallest particles unique to an element may be atoms or molecules.

Ahmed A.

### Problem 6

Explain the following statement: The smallest particles unique to a compound cannot be atoms.

Ahmed A.

### Problem 7

Can the relative amounts of the components of a mixture vary? Can the relative amounts of the components of a compound vary? Explain.

Ahmed A.

### Problem 8

The tap water found in many areas of the United States leaves white deposits when it evaporates. Is this tap water a mixture or a compound? Explain.

Ahmed A.

### Problem 9

Each scene below represents a mixture. Describe each one in terms of the number(s) of elements and/or compounds present.

Ahmed A.

### Problem 10

Samples of illicit “street” drugs often contain an inactive component, such as ascorbic acid (vitamin C). After obtaining a sample of cocaine, government chemists calculate the mass of vitamin C per gram of drug sample, and use it to track the drug’s distribution. For example, if different samples of cocaine obtained on the streets of New York, Los Angeles, and Paris all contain 0.6384 g of vitamin C per gram of sample, they very likely come from a common source. Do these street samples consist of a compound, element, or mixture? Explain.

Ahmed A.

### Problem 11

Why was it necessary for separation techniques and methods of chemical analysis to be developed before the laws of definite composition and multiple proportions could be formulated?

Ahmed A.

### Problem 12

To which classes of matter—element, compound, and/or mixture—do the following apply: (a) law of mass conservation; (b) law of definite composition; (c) law of multiple proportions?

Ahmed A.

### Problem 13

In our modern view of matter and energy, is the law of mass conservation still relevant to chemical reactions? Explain.

Ahmed A.

### Problem 14

Identify the mass law that each of the following observations demonstrates, and explain your reasoning:
(a) A sample of potassium chloride from Chile chitains the same percent by mass of potassium as one from Poland.
(b) A flashbulb contains magnesium and oxygen before use and magnesium oxide afterward, but its mass does not change.
(c) Arsenic and oxygen form one compound that is 65.2 mass $\%$ arsenic and another that is 75.8 mass $\%$ arsenic.

Ahmed A.

### Problem 15

Which of the following scenes illustrate(s) the fact that compounds of chlorine (green) and oxygen (red) exhibit the law of multiple proportions? Name the compounds.

Ahmed A.

Ahmed A.

### Problem 17

Does the percent by mass of each element in a compound depend on the amount of that element used to make the compound? Explain

Ahmed A.

### Problem 18

State the mass law(s) demonstrated by the following experimental results, and explain your reasoning:
Experiment $1 :$ A student heats 1.00 $\mathrm{g}$ of a blue compound and obtains 0.64 $\mathrm{g}$ of a white compound and 0.36 $\mathrm{g}$ of a colorless gas. Experiment $2 : \mathrm{A}$ second student heats 3.25 $\mathrm{g}$ of the same blue compound and obtains 2.08 $\mathrm{g}$ of a white compound and 1.17 $\mathrm{g}$ of a colorless gas.

Ahmed A.

### Problem 19

State the mass law(s) demonstrated by the following experimental results, and explain your reasoning:
Experiment $1 :$ A student heats 1.27 g of copper and 3.50 g of iodine to produce 3.81 $\mathrm{g}$ of a white compound; 0.96 $\mathrm{g}$ of iodine remains. Experiment $2 : \mathrm{A}$ second student heats 2.55 $\mathrm{g}$ of copper and 3.50 $\mathrm{g}$ of iodine to form 5.25 $\mathrm{g}$ of a white compound; 0.80 $\mathrm{g}$ of copper remains.

Ahmed A.

### Problem 20

Fluorite, a mineral of calcium, is a compound of the metal with fluorine. Analysis shows that a 2.76-g sample of fluorite contains 1.42 g of calcium. Calculate the (a) mass of fluorine in the sample; (b) mass fractions of calcium and fluorine in fluorite; (c) mass percents of calcium and fluorine in fluorite

Ahmed A.

### Problem 21

Galena, a mineral of lead, is a compound of the metal with sulfur. Analysis shows that a 2.34-g sample of galena contains 2.03 g of lead. Calculate the (a) mass of sulfur in the sample; (b) mass fractions of lead and sulfur in galena; (c) mass percents of lead and sulfur in galena.

Ahmed A.

### Problem 22

Magnesium oxide (MgO) forms when the metal burns in air.
(a) If 1.25 g of MgO contains 0.754 g of Mg, what is the mass ratio of magnesium to magnesium oxide?
(b) How many grams of Mg are in 534 g of MgO?

Ahmed A.

### Problem 23

Zinc sulfide (ZnS) occurs in the zinc blende crystal structure.
(a) If 2.54 g of ZnS contains 1.70 g of Zn, what is the mass ratio of zinc to zinc sulfide?
(b) How many kilograms of Zn are in 3.82 kg of ZnS?

Ahmed A.

### Problem 24

A compound of copper and sulfur contains 88.39 g of metal and 44.61 g of nonmetal. How many grams of copper are in 5264 kg of compound? How many grams of sulfur?

Ahmed A.

### Problem 25

A compound of iodine and cesium contains 63.94 g of metal and 61.06 g of nonmetal. How many grams of cesium are in 38.77 g of compound? How many grams of iodine?

Ahmed A.

### Problem 26

Show, with calculations, how the following data illustrate the law of multiple proportions:
Compound $1 : 47.5$ mass $\%$ sulfur and 52.5 mass $\%$ chlorine
Compound $2 : 31.1$ mass $\%$ sulfur and 68.9 mass $\mathscr{C}$ chlorine

Ahmed A.

### Problem 27

Show, with calculations, how the following data illustrate the law of multiple proportions:
Compound $1 : 77.6$ mass $\%$ xenon and 22.4 mass $\%$ fluorine
Compound $2 : 63.3$ mass $\%$ xenon and 36.7 mass $\%$ fluorine

Ahmed A.

### Problem 28

Dolomite is a carbonate of magnesium and calcium. Analysis shows that 7.81 g of dolomite contains 1.70 g of Ca. Calculate the mass percent of Ca in dolomite. On the basis of the mass percent of Ca, and neglecting all other factors, which is the richer source of Ca, dolomite or fluorite (see Problem 2.20)?

Ahmed A.

### Problem 29

The mass percent of sulfur in a sample of coal is a key factor in the environmental impact of the coal because the sulfur combines with oxygen when the coal is burned and the oxide can then be incorporated into acid rain. Which of the following coals would have the smallest environmental impact?

Ahmed A.

### Problem 30

Which of Dalton’s postulates about atoms are inconsistent with later observations? Do these inconsistencies mean that Dalton was wrong? Is Dalton’s model still useful? Explain.

Ahmed A.

### Problem 31

Use Dalton’s theory to explain why potassium nitrate from India or Italy has the same mass percents of K, N, and O.

Ahmed A.

### Problem 32

Thomson was able to determine the mass/charge ratio of the electron but not its mass. How did Millikan’s experiment allow determination of the electron’s mass?

Ahmed A.

### Problem 33

The following charges on individual oil droplets were obtained during an experiment similar to Millikan's. Determine a charge for the electron (in $\mathrm{C},$ coulombs $),$ and explain your answer: $-3.204 \times 10^{-19} \mathrm{C} ;-4.806 \times 10^{-19} \mathrm{C} ;-8.010 \times 10^{-19} \mathrm{C}$
$-1.442 \times 10^{-18} \mathrm{C}$

Ahmed A.

### Problem 34

Describe Thomson’s model of the atom. How might it account for the production of cathode rays?

Ahmed A.

### Problem 35

When Rutherford’s coworkers bombarded gold foil with a particles, they obtained results that overturned the existing (Thomson) model of the atom. Explain.

Ahmed A.

### Problem 36

Define atomic number and mass number. Which can vary without changing the identity of the element?

Ahmed A.

### Problem 37

Choose the correct answer. The difference between the mass number of an isotope and its atomic number is (a) directly related to the identity of the element; (b) the number of electrons; (c) the number of neutrons; (d) the number of isotopes.

Ahmed A.

### Problem 38

Even though several elements have only one naturally occurring isotope and all atomic nuclei have whole numbers of protons and neutrons, no atomic mass is a whole number. Use the data from Table 2.2 to explain this fact.

Ahmed A.

### Problem 39

Argon has three naturally occurring isotopes, $^{36} \mathrm{Ar},^{38} \mathrm{Ar}$ , and 40 Ar. What is the mass number of each isotope? How many protons, neutrons, and electrons are present in each?

Ahmed A.

### Problem 40

Chlorine has two naturally occurring isotopes, $^{35} \mathrm{Cl}$ and $^{37} \mathrm{Cl}$ What is the mass number of each isotope? How many protons, neutrons, and electrons are present in each?

Ahmed A.

### Problem 41

Do both members of the following pairs have the same number of protons? Neutrons? Electrons?
$$\text{(a)}\frac{16}{8} \mathrm{O} \text { and } \stackrel{17}{8} \mathrm{O}$$
$$\text{(b)}\stackrel{14}{6} \mathrm{C} \text { and } \frac{15}{7} \mathrm{N}$$
$$\text{(c)}\frac{60}{27} \mathrm{Co} \text { and } \frac{60}{28} \mathrm{Ni}$$

Ahmed A.

### Problem 42

Do both members of the following pairs have the same number of protons? Neutrons? Electrons?
$$\text{(a)}_{1}^{3} \mathrm{H} \text { and }_{2}^{3} \mathrm{He}$$
$$\text{(b)}\stackrel{14}{6} \mathrm{C} \text { and } \stackrel{15}{7} \mathrm{N}$$
$$\text{(c)}\stackrel{19}{9} \mathrm{F} \text { and } \stackrel{18}{9} \mathrm{F}$$

Ahmed A.

### Problem 43

Write the $\frac{A}{z} X$ notation for each atomic depiction:

Ahmed A.

### Problem 44

Write the $_{Z}^{A} X$ notation for each atomic depiction:

Ahmed A.

### Problem 45

Draw atomic depictions similar to those in Problem 2.43 for
$$_{22}^{48} \mathrm{Ti} ;(\mathrm{b})_{34}^{79} \mathrm{Se} ;(\mathrm{c}) \stackrel{11}{5} \mathrm{B}$$

Ahmed A.

### Problem 46

Draw atomic depictions similar to those in Problem 2.43 for
$$\frac{207 \mathrm{Pb}}{82} \mathrm{Pb} ;(\mathrm{b})^{9} \mathrm{Be} ;(\mathrm{c})_{33}^{7} \mathrm{As}$$

Ahmed A.

### Problem 47

Gallium has two naturally occurring isotopes, 69 $\mathrm{Ga}$ (isotopic mass $=68.9256$ amu, abundance $=60.11 \%$ ) and $^{n}$ Ga (isotopic mass $=70.9247$ amu, abundance $=39.89 \%$ ). Calculate the atomic mass of gallium.

Ahmed A.

### Problem 48

Magnesium has three naturally occurring isotopes, 24 $\mathrm{Mg}$ (isotopic mass $=23.9850$ amu, abundance $=78.99 \% ), 25 \mathrm{Mg}$ (isotopic mass $=24.9858$ amu, abundance $=10.00 \%$ ), and $^{26} \mathrm{Mg}$

Ahmed A.

### Problem 49

Chlorine has two naturally occurring isotopes, $^{35} \mathrm{Cl}$ (isotopic mass $=34.9689$ amu) and $^{37} \mathrm{Cl}(\text { isotopic mass }=36.9659 \text { amu). If }$ chlorine has an atomic mass of 35.4527 $\mathrm{amu}$ , what is the percent abundance of each isotope?

Ahmed A.

### Problem 50

Copper has two naturally occurring isotopes, $^{63} \mathrm{Cu}$ (isotopicmass $=62.9296$ amu) and of Cu (isotopic mass $=64.9278$ amu). If copper has an atomic mass of 63.546 amu, what is the percent abundance of each isotope?

Ahmed A.

### Problem 51

How can iodine $(Z=53)$ have a higher atomic number yet a lower atomic mass than tellurium $(Z=52) ?$

Ahmed A.

### Problem 52

Correct each of the following statements:
(a) In the modern periodic table, the elements are arranged in order of increasing atomic mass.
(b) Elements in a period have similar chemical properties.
(c) Elements can be classified as either metalloids or nonmetals.

Ahmed A.

Ahmed A.

### Problem 54

What are some characteristic properties of elements to the left of the elements along the "staircase"? To the right?

Ahmed A.

### Problem 55

The elements in Groups 1A(1) and 7A(17) are all quite reactive. What is a major difference between them?

Ahmed A.

Ahmed A.

Ahmed A.

### Problem 58

Fill in the blanks:
(a) The symbol and atomic number of the heaviest alkaline earth metal are _____________ and _________
(b) The symbol and atomic number of the lightest metalloid in Group 4 $\mathrm{A}(14)$ are $\longrightarrow$ and _________
(c) Group 1 $\mathrm{B}(11)$ consists of the coinage metals. The symbol and atomic mass of the coinage metal whose atoms have the fewest electrons are $\frac{\text { and }}{\text { and }}$
(d) The symbol and atomic mass of the halogen in Period 4 are_____and_____

Ahmed A.

### Problem 59

Fill in the blanks:
(a) The symbol and atomic number of the heaviest nonradioactive noble gas are_______ and_______
(b) The symbol and group number of the Period 5 transition element whose atoms have the fewest protons are_______
(c) The elements in Group 6 $\mathrm{A}(16)$ are sometimes called the chalcogens. The symbol and atomic number of the first metallic chalcogen are_____
(d) The symbol and number of protons of the Period 4 alkali metal atom are $\longrightarrow$ and_____

Ahmed A.

### Problem 60

Describe the type and nature of the bonding that occurs between reactive metals and nonmetals.

Ahmed A.

### Problem 61

Describe the type and nature of the bonding that often occurs between two nonmetals.

Ahmed A.

### Problem 62

How can ionic compounds be neutral if they consist of positive and negative ions?

Ahmed A.

### Problem 63

Given that the ions in LiF and in MgO are of similar size, which compound has stronger ionic bonding? Use Coulomb’s law in your explanation.

Ahmed A.

### Problem 64

Are molecules present in a sample of $\mathrm{BaF}_{2} ?$ Explain.

Ahmed A.

### Problem 65

Are ions present in a sample of $\mathrm{P}_{4} \mathrm{O}_{6} ?$ Explain.

Ahmed A.

### Problem 66

The monatomic ions of Groups 1A(1) and 7A(17) are all singly charged. In what major way do they differ? Why?

Ahmed A.

### Problem 67

Describe the formation of solid magnesium chloride (MgCl_s) from large numbers of magnesium and chlorine atoms.

Ahmed A.

### Problem 68

Describe the formation of solid magnesium chloride $\left(\mathrm{MgCl}_{2}\right)$ large numbers of potassium and sulfur atoms.

Ahmed A.

### Problem 69

Does potassium nitrate $\left(\mathrm{KNO}_{3}\right)$ incorporate ionic bonding, Does potassium nitrate $\left(\mathrm{KNO}_{3}\right)$ incorporate ionic bonding,

Ahmed A.

### Problem 70

What monatomic ions would you expect potassium (Z 5 19) and bromine (Z 5 35) to form?

Ahmed A.

### Problem 71

What monatomic ions would you expect radium (Z 5 88) and selenium (Z 5 34) to form?

Ahmed A.

### Problem 72

For each ionic depiction, give the name of the parent atom, its mass number, and its group and period numbers:

Ahmed A.

### Problem 73

For each ionic depiction, give the name of the parent atom, its mass number, and its group and period numbers:

Ahmed A.

### Problem 74

An ionic compound forms when lithium $(Z=3)$ reacts with oxygen $(Z=8) .$ If a sample of the compound contains $8.4 \times 10^{21}$ lithium ions, how many oxide ions does it contain?

Ahmed A.

### Problem 75

An ionic compound forms when calcium $(Z=20)$ reacts with iodine $(Z=53) .$ If a sample of the compound contains $7.4 \times 10^{21}$ calcium ions, how many iodide ions does it contain?

Ahmed A.

### Problem 76

The radii of the sodium and potassium ions are 102 pm and 138 pm, respectively. Which compound has stronger ionic attractions, sodium chloride or potassium chloride?

Ahmed A.

### Problem 77

The radii of the lithium and magnesium ions are 76 pm and 72 pm, respectively. Which compound has stronger ionic attractions, lithium oxide or magnesium oxide?

Ahmed A.

### Problem 78

What information about the relative numbers of ions and the percent mass of elements is in the formula $\mathrm{MgF}_{2} ?$

Ahmed A.

### Problem 79

How is a structural formula similar to a molecular formula? How is it different?

Ahmed A.

### Problem 80

Consider a mixture of 10 billion $\mathrm{O}_{2}$ molecules and 10 billion $\mathrm{H}_{2}$ molecules. In what way is this mixture similar to a sample containing 10 billion hydrogen peroxide $\left(\mathrm{H}_{2} \mathrm{O}_{2}\right)$ molecules? In what way is it different?

Ahmed A.

### Problem 81

For what type(s) of compound do we use Roman numerals in the names?

Ahmed A.

### Problem 82

For what type(s) of compound do we use Greek numerical prefixes in the names?

Ahmed A.

### Problem 83

For what type of compound are we unable to write a molecular formula?

Ahmed A.

### Problem 84

Give the name and formula of the compound formed from the following elements: (a) sodium and nitrogen; (b) oxygen and strontium; (c) aluminum and chlorine.

Ahmed A.

### Problem 85

Give the name and formula of the compound formed from the following elements: (a) cesium and bromine; (b) sulfur and barium; (c) calcium and fluorine.

Ahmed A.

### Problem 86

Give the name and formula of the compound formed from the following elements
$$_{12} \mathrm{L} \text { and }_{9} \mathrm{M} \quad \text { (b) }_{30} \mathrm{L} \text { and }_{16} \mathrm{M} \quad \text { (c) }_{17} \mathrm{L} \text { and }_{38} \mathrm{M}$$

Ahmed A.

### Problem 87

Give the name and formula of the compound formed from the following elements:
$$\begin{array}{ll}{\text { (a) }_{37} \mathrm{Q} \text { and }_{35} \mathrm{R}} & {\text { (b) }_{8} \mathrm{Q} \text { and }_{13} \mathrm{R}} & {\text { (c) }_{20} \mathrm{Q} \text { and }_{53} \mathrm{R}}\end{array}$$

Ahmed A.

### Problem 88

Give the systematic names for the formulas or the formulas for the names: (a) tin(IV) chloride; (b) FeBr; bromide; (d) $\mathrm{Mn}_{2} \mathrm{O}_{3}$

Ahmed A.

### Problem 89

Give the systematic names for the formulas or the formulas for the names: (a) $\mathrm{Na}_{2} \mathrm{HPO}_{4} ;(\mathrm{b})$ potassium carbonate dihydrate; (c) $\mathrm{NaNO}_{2} ;(\mathrm{d})$ ammonium perchlorate.

Ahmed A.

### Problem 90

Give the systematic names for the formulas or give the formulas for the names: (a) CoO; (b) mercury(I) chloride; (c) $\mathrm{Pb}\left(\mathrm{C}_{2} \mathrm{H}_{3} \mathrm{O}_{2}\right)_{2} \cdot 3 \mathrm{H}_{2} \mathrm{O} ;(\mathrm{d})$ chromic oxide.

Ahmed A.

### Problem 91

Give the systematic names for the formulas or the formulas for the names: (a) $\operatorname{Sn}\left(\mathrm{SO}_{3}\right)_{2} ;(\mathrm{b})$ potassium dichromate; $(\mathrm{c}) \mathrm{FeCO}_{3}$ (d) copper(II) nitrate.

Ahmed A.

### Problem 92

Correct each of the following formulas:
(a) Barium oxide is $\mathrm{BaO}_{2}$
(b) Iron(II) nitrate is $\mathrm{Fe}\left(\mathrm{NO}_{3}\right)_{3}$
(c) Magnesium sulfide is MnSO $_{3}$

Ahmed A.

### Problem 93

Correct each of the following names:
(a) Cul is cobalt (II) iodide
(b) $\mathrm{Fe}\left(\mathrm{HSO}_{4}\right)_{3}$ is iron(II) sulfate
(c) $\mathrm{MgCr}_{2} \mathrm{O}_{7}$ is magnesium dichromium heptaoxide

Ahmed A.

### Problem 94

Give the name and formula for the acid derived from each of the following anions:
(a) hydrogen carbonate
(b) $\mathrm{IO}_{4}^{-}$
(c) cyanide
(d) HS -

Ahmed A.

### Problem 95

Give the name and formula for the acid derived from each of the following anions:
(a) perchlorate
(b) $\mathrm{NO}_{3}^{-}$
(c) bromite
(d) $\mathrm{H}_{2} \mathrm{PO}_{4}^{-}$

Ahmed A.

### Problem 96

Many chemical names are similar at first glance. Give the formulas of the species in each set:
(a) Ammonium ion and ammonia
(b) Magnesium sulfide, magnesium sulfite, and magnesium sulfate
(c) Hydrochloric acid, chloric acid, and chlorous acid
(d) Cuprous bromide and cupric bromide

Ahmed A.

### Problem 97

Give the formulas of the compounds in each set:
(b) Lithium nitride, lithium nitrite, and lithium nitrate
(c) Strontium hydride and strontium hydroxide
(d) Magnesium oxide and manganese(\Pi) oxide

Ahmed A.

### Problem 98

Give the name and formula of the compound whose molecules consist of two sulfur atoms and four fluorine atoms

Ahmed A.

### Problem 99

Give the name and formula of the compound whose molecules consist of two chlorine atoms and one oxygen atom

Ahmed A.

### Problem 100

Correct the name to match the formula of the following compounds: (a) calcium(II) dichloride, $\mathrm{CaCl}_{2} ;$ (b) copper(\Pii) oxide, $\mathrm{Cu}_{2} \mathrm{O} ;(\mathrm{c})$ stannous tetrafluoride, $\mathrm{SnF}_{4} ;$ (d) hydrogen chloride acid, HCl.

Ahmed A.

### Problem 101

Correct the formula to match the name of the following compounds: (a) iron(II) oxide, $\mathrm{Fe}_{3} \mathrm{O}_{4} ;$ (b) chloric acid, $\mathrm{HCl} ;$ (c) mercuric oxide, $\mathrm{Hg}_{2} \mathrm{O} ;(\mathrm{d})$ potassium iodide, $\mathrm{P}_{2} \mathrm{I}_{3}$ .

Ahmed A.

### Problem 102

Write the formula of each compound, and determine itsmolecular (formula) mass: (a) ammonium sulfate; (b) sodium dihydrogen phosphate; (c) potassium bicarbonate

Ahmed A.

### Problem 103

Write the formula of each compound, and determine its molecular (formula) mass: (a) sodium dichromate; (b) ammonium perchlorate; (c) magnesium nitrite trihydrate.

Ahmed A.

### Problem 104

Calculate the molecular (formula) mass of each compound: (a) dinitrogen pentoxide; (b) lead(II) nitrate; (c) calcium peroxide.

Ahmed A.

### Problem 105

Calculate the molecular (formula) mass of each compound: (a) iron(II) acetate tetrahydrate; (b) sulfur tetrachloride; (c) potassium permanganate

Ahmed A.

### Problem 106

Give the number of atoms of the specified element in a formula unit of each of the following compounds, and calculate the molecular (formula) mass:
(a) Oxygen in aluminum sulfate, Al_{?} ( \mathrm { SO } _ { 4 } ) _ { 3 }
(b) Hydrogen in ammonium hydrogen phosphate, (NH $_{4} )_{2} \mathrm{HPO}_{4}$
(c) Oxygen in the mineral azurite, $\mathrm{Cu}_{3}(\mathrm{OH})_{2}\left(\mathrm{CO}_{3}\right)_{2}$

Ahmed A.

### Problem 107

Give the number of atoms of the specified element in a formula unit of each of the following compounds, and calculate the molecular (formula) mass:
(a) Hydrogen in ammonium benzoate, $\mathrm{C}_{6} \mathrm{H}_{5} \mathrm{COONH}_{4}$
(b) Nitrogen in hydrazinium sulfate, $\mathrm{N}_{2} \mathrm{H}_{6} \mathrm{SO}_{4}$
(c) Oxygen in the mineral leadhillite, $\mathrm{Pb}_{4} \mathrm{SO}_{4}\left(\mathrm{CO}_{3}\right)_{2}(\mathrm{OH})_{2}$

Ahmed A.

### Problem 108

Give the formula, name, and molecular mass of the following molecules:

Ahmed A.

### Problem 109

Give the formula, name, and molecular mass of the following molecules:

Ahmed A.

### Problem 110

Before the use of systematic names, many compounds had common names. Give the systematic name for each of the following:
(a) Blue vitriol, CuSO $_{4} \cdot 5 \mathrm{H}_{2} \mathrm{O}$
(b) Slaked lime, $\mathrm{Ca}(\mathrm{OH})_{2}$
(c) Oil of vitriol, $\mathrm{H}_{2} \mathrm{SO}_{4}$
(d) Washing soda, $\mathrm{Na}_{2} \mathrm{CO}_{3}$
(e) Muriatic acid, HCl
(f) Epsom salt, MgSO_ $\cdot 7 \mathrm{H}_{2} \mathrm{O}$
(g) Chalk, CaCO_ $_{3}$
(h) Dry ice, $\mathrm{CO}_{2}$
(i) Baking soda, NaHCO_{3}
(j) Lye, NaOH

Ahmed A.

### Problem 111

Each circle contains a representation of a binary compound. Determine its name, formula, and molecular (formula) mass.

Ahmed A.

### Problem 112

In what main way is separating the components of a mixture different from separating the components of a compound?

Ahmed A.

### Problem 113

What is the difference between a homogeneous and a heterogeneous mixture?

Ahmed A.

### Problem 114

Is a solution a homogeneous or a heterogeneous mixture? Give an example of an aqueous solution.

Ahmed A.

Ahmed A.

### Problem 116

Classify each of the following as a compound, a homogeneous mixture, or a heterogeneous mixture: (a) orange juice; (b) vegetable soup; (c) cement; (d) calcium sulfate; (e) tea.

Ahmed A.

### Problem 117

Which separation method is operating in each of the following procedures?
(a) Pouring a mixture of cooked pasta and boiling water into a colander
(b) Removing colored impurities from raw sugar to make refined sugar

Ahmed A.

### Problem 118

A quality-control laboratory analyzes a product mixture using gas-liquid chromatography. The separation of components is more than adequate, but the process takes too long. Suggest two ways, other than changing the stationary phase, to shorten the analysis time

Ahmed A.

### Problem 119

Helium is the lightest noble gas and the second most abundant element (after hydrogen) in the universe.
(a) The radius of a helium atom is $3.1 \times 10^{-11} \mathrm{m} ;$ the radius of its nucleus is $2.5 \times 10^{-15} \mathrm{m} .$ What fraction of the spherical atomic volume is occupied by the nucleus $\left(V \text { of a sphere }=\frac{4}{3} \pi r^{3}\right) ?$
(b) The mass of a helium- 4 atom is $6.64648 \times 10^{-24} \mathrm{g},$ and each of its two electrons has a mass of $9.10939 \times 10^{-28} \mathrm{g} .$ What fraction of this atom's mass is contributed by its nucleus?

Ahmed A.

### Problem 120

From the following ions (with their radii in pm), choose the pair that forms the strongest ionic bond and the pair that forms the weakest:
$$\begin{array}{llllll}{\text { Ion: }} & {\mathrm{Mg}^{2+}} & {\mathrm{Rb}^{+}} & {\mathrm{Rb}^{+}} & {\mathrm{Ba}^{2+}} & {\mathrm{Cl}^{2+}} & {\mathrm{Cl}^{-}} & {\mathrm{O}^{2-}} & {\mathrm{I}^{-}} \\ {\mathrm{Radius} :} & {72} & {138} & {152} & {135} & {181} & {140} & {220}\end{array}$$

Ahmed A.

### Problem 121

Give the molecular mass of each compound depicted below, and provide a correct name for any that are named incorrectly

Ahmed A.

### Problem 122

Polyatomic ions are named by patterns that apply to elements in a given group. Using the periodic table and Table $2.5,$ give the name of each of the following: (a) $\mathrm{SeO}_{4}^{2-} ;(\mathrm{b}) \mathrm{AsO}_{4}^{3-} ;$

Ahmed A.

Ahmed A.

Ahmed A.

### Problem 125

The number of atoms in 1 $\mathrm{dm}^{3}$ of aluminum is nearly the same as the number of atoms in 1 $\mathrm{dm}^{3}$ of lead, but the densities of these metals are very different (see Table 1.5$) .$ Explain.

Ahmed A.

### Problem 126

You are working in the laboratory preparing sodium chloride. Consider the following results for three preparations of the compound:
$$\begin{array}{l}{\text { Case } 1 : 39.34 \mathrm{g} \mathrm{Na}+60.66 \mathrm{g} \mathrm{Cl}_{2} \longrightarrow 100.00 \mathrm{g} \mathrm{NaCl}} \\ {\text { Case } 2 : 39.34 \mathrm{g} \mathrm{Na}+70.00 \mathrm{g} \mathrm{Cl}_{2}} & {\longrightarrow} \\ {100.00 \mathrm{g} \mathrm{NaCl}+9.34 \mathrm{gCl}_{2}}\end{array}$$
$$3 : 50.00 \mathrm{g} \mathrm{Na}+50.00 \mathrm{g} \mathrm{Cl}_{2} \longrightarrow_{82.43 \mathrm{g} \mathrm{NaCl}+17.57 \mathrm{g} \mathrm{Na}}$$

Ahmed A.

### Problem 127

Scenes A–I depict various types of matter on the atomic scale. Choose the correct scene(s) for each of the following:
(a) A mixture that fills its container
(b) A substance that cannot be broken down into simpler ones
(c) An element with a very high resistance to flow
(d) A homogeneous mixture
(e) An element that conforms to the walls of its container and
displays an upper surface
(f) A gas consisting of diatomic particles
(g) A gas that can be broken down into simpler substances
(h) A substance with a 2/1 ratio of its component atoms
(i) Matter that can be separated into its component substances by
physical means
(j) A heterogeneous mixture
(k) Matter that obeys the law of definite composition

Ahmed A.

### Problem 128

The seven most abundant ions in seawater make up more than 99% by mass of the dissolved compounds. Here are their abundances in units of mg ion/kg seawater: chloride 18,980; sodium 10,560; sulfate 2650; magnesium 1270; calcium 400; potassium 380; hydrogen carbonate 140.
(a) What is the mass % of each ion in seawater?
(b) What percent of the total mass of ions is sodium ion?
(c) How does the total mass % of alkaline earth metal ions compare with the total mass % of alkali metal ions?
(d) Which make up the larger mass fraction of dissolved components, anions or cations?

Ahmed A.

### Problem 129

The scenes on the next page represent a mixture of two monatomic gases undergoing a reaction when heated. Which mass law(s) is (are) illustrated by this change?

Ahmed A.

### Problem 130

When barium (Ba) reacts with sulfur (S) to form barium sulfide (BaS), each Ba atom reacts with an $\mathrm{S}$ atom. If 2.50 $\mathrm{cm}^{3}$ of Ba reacts with 1.75 $\mathrm{cm}^{3}$ of $\mathrm{S},$ are there enough Ba atoms to react with the S atoms $\left(d \text { of } \mathrm{Ba}=3.51 \mathrm{g} / \mathrm{cm}^{3} ; d \text { of } \mathrm{S}=2.07 \mathrm{g} / \mathrm{cm}^{3}\right) ?$

Ahmed A.

### Problem 131

Succinic acid (below) is an important metabolite in biological energy production. Give the molecular formula, molecular mass, and the mass percent of each element in succinic acid.

Ahmed A.

### Problem 132

Fluoride ion is poisonous in relatively low amounts: 0.2 $\mathrm{g}$ of $\mathrm{F}^{-}$ per 70 $\mathrm{kg}$ of body weight can cause death. Nevertheless, in order to prevent tooth decay, $\mathrm{F}^{-}$ ions are added to drinking water at a concentration of 1 $\mathrm{mg}$ of $\mathrm{F}^{-}$ ion per $\mathrm{L}$ of water. How many liters of fluoridated drinking water would a $70-\mathrm{kg}$ per-son have to consume in one day to reach this toxic level? How many kilograms of sodium fluoride would be needed to treat a $8.50 \times 10^{7}$ -gal reservoir?

Ahmed A.

### Problem 133

Antimony has many uses, for example, in infrared devices and as part of an alloy in lead storage batteries. The element has two naturally occurring isotopes, one with mass 120.904 amu, the other with mass 122.904 amu. (a) Write the $\frac{A}{2} \mathrm{X}$ notation for each isotope. (b) Use the atomic mass of antimony from the periodic table to calculate the natural abundance of each isotope.

Ahmed A.

### Problem 134

Dinitrogen monoxide $\left(\mathrm{N}_{2} \mathrm{O} ; \text { nitrous oxide ) is a greenhouse }\right.$
gas that enters the atmosphere principally from natural fertilizer breakdown. Some studies have shown that the isotope ratios of 15 $\mathrm{N}$ to 14 $\mathrm{N}$ and of 18 $\mathrm{O}$ to 16 $\mathrm{O}$ in $\mathrm{N}_{2} \mathrm{O}$ depend on the source, which can thus be determined by measuring the relative abundance of molecular masses in a sample of $\mathrm{N}_{2} \mathrm{O}$ .
(a) What different molecular masses are possible for $\mathrm{N}_{2} \mathrm{O}$ ?
(b) The percent abundance of 14 $\mathrm{N}$ is $99.6 \%,$ and that of 16 $\mathrm{O}$ is
99.8$\%$ . Which molecular mass of $\mathrm{N}_{2} \mathrm{O}$ is least common, and which is most common?

Ahmed A.

### Problem 135

Use the box color(s) in the periodic table below to identify the element(s) described by each of the following:
(a) Four elements that are nonmetals
(b) Two elements that are metals
(c) Three elements that are gases at room temperature
(d) Three elements that are solid at room temperature
(e) One pair of elements likely to form a covalent compound
(f) Another pair of elements likely to form a covalent compound
(g) One pair of elements likely to form an ionic compound with formula MX
(h) Another pair of elements likely to form an ionic compound with formula MX
(i) Two elements likely to form an ionic compound with formula M2X
(j) Two elements likely to form an ionic compound with formula MX2
(k) An element that forms no compounds
(l) A pair of elements whose compounds exhibit the law of multiple proportions

Ahmed A.

Ahmed A.

### Problem 137

Boron trifluoride is used as a catalyst in the synthesis of organic compounds. When this compound is analyzed by mass spectrometry ( see Tools of the Laboratory, p. 57 ), several different $1+$ ions form, including ions representing the whole molecule as well as molecular fragments formed by the loss of one, two, and three $\mathrm{F}$ atoms. Given that boron has two naturally occurring iso-
topes, 10 $\mathrm{B}$ and 11 $\mathrm{B}$ , and fluorine has one, 19 $\mathrm{F}$ , calculate the masses of all possible $1+$ ions.

Ahmed A.

Ahmed A.

Ahmed A.

### Problem 140

Nuclei differ in their stability, and some are so unstable that they undergo radioactive decay. The ratio of the number of neutrons to number of protons $(N / Z)$ in a nucleus correlates with its stability. Calculate the $N / Z$ ratio for $(a)^{144} \mathrm{Sm} ;(\mathrm{b})^{56} \mathrm{Fe}$ (c) 20 Ne; (d) 107 $\mathrm{Ag}$ . (e) The radioactive isotope 238 $\mathrm{U}$ decays in a series of nuclear reactions that includes another uranium isotope, 234 $\mathrm{U}$ , and three lead isotopes, $214 \mathrm{Pb}, 210 \mathrm{Pb}$ , and 206 $\mathrm{Pb}$ . How many neutrons, protons, and electrons are in each of these five isotopes?

Ahmed A.

Ahmed A.

### Problem 142

In the periodic table below, give the name, symbol, atomic number, atomic mass, period number, and group number of (a) the building-block elements (red), which occur in nearly every biological molecule, and (b) the macronutrients (green), which are either essential ions in cell fluids or are part of many
biomolecules.

Ahmed A.

### Problem 143

The block diagram below classifies the components of matter on the macroscopic scale. Identify blocks (a)–(d).

Ahmed A.


text:
## Question 4 2013 Practice Final

$E_{cell} = E_{cell}^{\circ}-\frac{RT}{nF}\ln Q$

Armani Dodson 1A
Posts: 24
Joined: Fri Jul 22, 2016 3:00 am

### Question 4 2013 Practice Final

How do they get n=4 for #4 on the 2013 practice final??

Shushanna S 3F
Posts: 24
Joined: Sat Jul 09, 2016 3:00 am

### Re: Question 4 2013 Practice Final

The iron goes from an oxidation state of 0 to +2 (and the oxygen goes from 0 to -2). And since there are two moles of iron and oxygen, 2*2electrons=4 electrons. Hope that helps!

Return to “Appications of the Nernst Equation (e.g., Concentration Cells, Non-Standard Cell Potentials, Calculating Equilibrium Constants and pH)”

### Who is online

Users browsing this forum: No registered users and 2 guests


text:
# Chapter 2 Electric field¶

## Example 2.1 Page no 47¶

In [5]:
#Given
V=1000
d=10.0*10**-3
m=4.8*10**-15
g=10
e=1.6*10**-19

#Calculation
E=V/d
q=m*g/E
n=q/e

#Result
print"The number of electrons on the drop ", n

The number of electrons on the drop  3.0

## Example 2.2 Page no 47¶

In [21]:
#Given
e=1.6*10**-19
E=3*10**4
m=9.0*10**-31
y1=4*10**-2
m2=1.67*10**-27

#Calculation
a=e*E/m
t=math.sqrt((2*y1)/a)
a2=e*E/m2
t2=math.sqrt((2*y1)/a2)

#Result
print"Time t1=", round(t*10**9,1)*10**-9,"S","\nTime t2=",round(t2*10**7,2)*10**-7,"S"

Time t1= 3.9e-09 S
Time t2= 1.67e-07 S

## Example 2.3 Page no 48¶

In [37]:
#Given
r=1                   #m
m=9*10**9
q=500*10**-6
r1=0.3               #m

#Calculation
E=m*q/r**2
E2=m*q/r1**2

#Result
print"(i) Electric field intensity from the centre of the sphere ",E*10**-6,"10**6","N/C"
print"(ii) Electric field intensity at the surface of the sphere is ",E2*10**-7,"10**7 N/C"

(i) Electric field intensity from the centre of the sphere  4.5 10**6 N/C
(ii) Electric field intensity at the surface of the sphere is  5.0 10**7 N/C

## Example 2.4 Page no 48¶

In [33]:
#Given
q=2*10**-8
E=2*10**4
m=80*10**-6
g=9.8

#Calculation
import math
a=q*E/(m*g)
b=math.atan(a)*180/3.14
T=(q*E/(math.sin(b*3.14/180.0)))*10**-4

#Result
print"The angle is ", round(b,0),"degree"
print"Tension in the thread of the pendulum is ", round(T*10**8,2),"*10**-4 N"

The angle is  27.0 degree
Tension in the thread of the pendulum is  8.8 *10**-4 N

## Example 2.5 Page no 48¶

In [53]:
#Given
m=9*10**9
r=0.707
q=5*10**-6

#Calculation
import math
E=m*q/r**2                    #along AO
E2=m*q/r**2                   #along BO
E3=m*q/r**2                   #along OD
E11=E+E2
E12=E2+E3
I=(2*E11*r)*10**-4

#Result
print"Electric field at the centre of the sphere is ",round(I,2),"*10**4 N/C"

Electric field at the centre of the sphere is  25.46 *10**4 N/C

## Example 2.6 Page no 49¶

In [6]:
#Given
q=5*10**-9
x=0.15                  #m
r=0.1                     #m
a=9*10**9

#Calculation
E=(a*q*x)/((r**2+x**2))**1.5

#Result
print"Intensity of the electric field is ", round(E,0),"N/C"

Intensity of the electric field is  1152.0 N/C

## Example 2.7 Page no 49¶

In [10]:
#Given
m=10**-3
F=1
v0=20
v=0

#Calculation
a=-F/m
s=v**2-v0**2/(2.0*a)

#Result
print"The distance is ", s,"m"

The distance is  0.2 m

## Example 2.9 Page no 50¶

In [13]:
#Given
m=9*10**9
q1=1/3.0*10**-7
r=5*10**-2
F=58.8*10**-3

#Calculation
q2=F*r**2/(q1*m)

#Result
print"Charge is ", q2,"C"

Charge is  4.9e-07 C

## Example 2.10 Page no 61¶

In [33]:
#Given
E=4*10**5                   #V/m
q=3.2*10**-19
a=2.4*10**-10

#Calculation
import math
p=q*a
W=p*E*(1-(math.cos(180*180/3.14)))

#Result
print"Work done is ", W

Work done is  2.79670959474e-23

## Example 2.11 Page no 61¶

In [45]:
#Given
q=16*10**-19
a=3.9*10**-12
E=10**5

#Calculation
p=q*a
U=-p*E

#Result
print"(i) The electric dipole moment ", p,"Cm"
print"(ii) Potential energy of dipole in the stable equilibrium position ",U,"J"

(i) The electric dipole moment  6.24e-30 Cm
(ii) Potential energy of dipole in the stable equilibrium position  -6.24e-25 J

## Example 2.12 Page no 61¶

In [51]:
#Given
q=20*10**-6
a=10**-2
m=9*10**9
r=0.1

#Calculation
p=q*a
E=m*2*p/r**3

#Result
print"Electric field intensity is ", E*10**-5,"*10**5  N/C"

Electric field intensity is  36.0 *10**5  N/C

## Example 2.13 Page no 62¶

In [55]:
#Given
E=4*10**5
q=1*10**-6
a=3*10**-2

#Calculation
t=q*a*E

#Result
print"Maximum torque on the dipole is ", t*10**2,"*10**-2 Nm"

Maximum torque on the dipole is  1.2 *10**-2 Nm

## Example 2.14 Page no 62¶

In [60]:
#Given
q=1*10**-6
a=2*10**-2
E=10**5

#Calculation
p=q*a
W=2*p*E

#Result
print"Work done in the rotation is ", W*10**3,"*10**-3 J"

Work done in the rotation is  4.0 *10**-3 J

## Example 2.15 Page no 62¶

In [65]:
#Given
q=2*10**-6
a=0.1
m=9*10**9
r=0.5

#Calculation
p=q*a
E=m*p/r**3

#Result
print"Electric field intensity is ",E*10**-4,"*10**4 N/C"

Electric field intensity is  1.44 *10**4 N/C

## Example 2.16 Page no 62¶

In [71]:
#Given
qa=2.5*10**-7
qb=-2.5*10**-7
a=15
b=15

#Calculation
q=qa+qb
C=(a+b)*10**-2
E=qa*C

#Result
print"Total charge is ", q,"\nElectric dipole moment of the system is ",E,"Cm"

Total charge is  0.0
Electric dipole moment of the system is  7.5e-08 Cm

## Example 2.17 Page no 63¶

In [27]:
#Given
p=2*10**-8
m=9*10**9
r=1.0

#Calculation
import math
b=3*math.cos(60*3.14/180.0)**2+1
a=p*math.sqrt(b)
E=(m*a)/r**3

#Result
print"Magnitude of electric intensity is", round(E,1),"N/C"

Magnitude of electric intensity is 238.2 N/C

## Example 2.18 Page no 63¶

In [89]:
#Given
p=5*10**-8
m=9*10**9
r=0.15

#Calculation
E=m*2*p/r**3
E1=m*p/r**3

print"(i) Electric field along AB is ", round(E*10**-5,2),"*10**5 N/C"
print"(ii) Electric field along BA is ", round(E1*10**-5,2),"*10**5 N/C"

(i) Electric field along AB is  2.67 *10**5 N/C
(ii) Electric field along BA is  1.33 *10**5 N/C


text:
# Test Suite¶

A test suite plays a vital role in open-source software use and development.

• For a PSI4 user, tests provide models of inputs that should work “as-is” and a searchable collection of syntax and capabilities. The test suite also allows high-quality development snapshots of the codebase to be built automatically for users.

• For a user who has PSI4 as part of a complex computational molecular software environment, a test suite alongside installed PSI4 can be used to show that the PSI4 piece is working.

• For a feature developer, adding tests provides confidence that you can leave your code untouched and still advertise that the feature works years later. With tests, proposed changes to PSI4 that break your code fall upon the change proposer to fix, rather than being merged silently and lying in wait for a concientious user to detect and report and then likely falling upon you to fix.

• For a general developer, the test suite allows confidence in refactoring, switching out underlying libraries, maintenance, and upgrading.

## CTest and pytest, PSIthon and PsiAPI¶

In designing a test, sometimes you want it to be a model input for the user in a single file or you don’t want a lot of psi4. or Python syntax cluttering the input. In this case, follow Adding PSIthon Test Cases to prepare as PSIthon (psi4 input.dat) for, roughly speaking, running through ctest. The PSIthon/CTest test suite occupies the whole of psi4/tests except psi4/tests/pytests.

At other times you want the test to check several variations of a template job or you want to test error handling or you want to focus on PsiAPI rather than PSIthon or you want to control the compute conditions with environment variables. In this case, follow Adding PsiAPI Test Cases to prepare as PsiAPI (import psi4) for, roughly speaking, running through pytest. The PsiAPI/pytest test suite occupies psi4/tests/pytests.

The above description sounds as if there are two disjoint test suites, and you have to run both ctest and pytest to fully test PSI4. This has indeed been the case until March 2022. The difficulty has been that (1) two test suites is unexpected so some developers don’t know to run both; and (2) there are important tests in the PSIthon suite that can’t be run on a PSI4 installation since CTest only works in a build directory. Now, by adding an extra file to the test directory (test_input.py), PSIthon tests can also be run through pytest. This hasn’t rolled out to all ~500 PSIthon tests (help wanted), but eventually PSI4 can be tested with a single command from a build or from an installation. Therefore, in designing a test, choose its mode based on whether PSIthon or PsiAPI suits it better and whether it’s a simple model for users (probably PSIthon) or for expert users (probably PsiAPI). Both will continue to work in future, and neither have limitations.

## Test Contents¶

• Most PSI4 tests will be integration tests focusing on non-regression of user input to answers, and we insist on having these. But if you find unit tests helpful, by all means add them to the test suite.

• Most tests should store reference results (from literature or another implementation or a carefully run PSI4 calculation), run quantum chemistry, then apply one or more of the Comparison Functions so that the test will fail if the answer is unexpected. The functions are the same in CTest and pytest, but in the former they are, for example, compare_matrices(refmat, mat, ...) while in the latter it’s asserted, like assert compare_matrices(refmat, mat, ...). The main advantage of the testing functions is that they provide helpful error printing upon failure. Deep down, they’re NumPy functions.

• In preparing the test case reference values, aim for the converged value rather than many digits from your computer under default convergence conditions. This will make the test more robust for different OS, different BLAS libraries, and variations in SCF cycles. Turn energy, density, amplitude, and geometry convergence criteria to very tight levels, and use these results for reference energies, reference geometries, reference cube files, etc.. Then, either remove or relax the convergence settings, if these are not a vital part of the test. In choosing the number of digits for compare_values() and other compare_* functions, select a number looser than the convergence set in the test or the default convergence for the calculation type (energy, gradient, etc.).

• Keep tests as short as possible without sacrificing coverage and variety. Under 30 seconds is a good aim.

To create a new test case, first make a folder in psi4/tests or, for an addon, a subfolder under the addon folder. Use hyphens, not spaces or underscores, in the directory name. Add the directory name to the list of tests in psi4/tests/CMakeLists.txt or, for an addon, tests/<addon>/CMakeLists.txt. The test directory will need at least two files, CMakeLists.txt and input.dat.

### CMakeLists.txt¶

This file adds the test case to the suite. It should have at least the following two uncommented lines:

include(TestingMacros)

# if extra files needed
# file(COPY grid.dat DESTINATION \${CMAKE_CURRENT_BINARY_DIR})

# if minutes long
# set_tests_properties(isapt1 PROPERTIES COST 300)

The labels specify which groups of tests include the test case for ctest -L label purposes. The psi label should always be added, but the other labels are test-specific. The method tested should always be included, and this is often sufficient. If adding a test for an already existing module, the labels for other tests of the module will suggest other labels to add. Labels have been added as developers needed, so they are not systematic or thorough. If you see labels to add or rename, please do.

A test requiring over 15 minutes should be labeled longtests. A short test under 30 seconds used for general bug checking should be labeled quicktests. A test that confirms PSI4 is operational should be labeled smoketests.

If a test needs extra input files like grid.dat or extra reference files for checking against, like fchk, specify these in the CMakeLists.txt as shown above. Such tests must be run through ctest and don’t usually work when run “by hand” from the objdir via stage/bin/psi4 ../tests/directory_name/input.dat.

If a test is multiple minutes long, load-balancing a parallel CTest run requires the test to be started early. Use the COST line as shown above to set a weighting to about the number of seconds the test takes.

### input.dat¶

The other necessary file is the input file itself, input.dat. The input file should be just a simple input file to run the test, with small additions.

#! RI-SCF cc-pVTZ energy of water, with Z-matrix input and cc-pVTZ-RI auxiliary basis.
#! Also a bit more to force a second line.

nucenergy = 8.801466202085710  #TEST
refenergy = -76.05098402733282  #TEST

molecule h2o {
symmetry c1
O
H 1 1.0
H 1 1.0 2 104.5
}

set {
basis cc-pVTZ
scf_type df
df_basis_scf cc-pVTZ-RI
e_convergence 10
}

thisenergy = energy("hf")

compare_values(nucenergy, h2o.nuclear_repulsion_energy(), 9, "Nuclear repulsion energy")  #TEST
compare_values(refenergy, thisenergy, 9, "Reference energy")  #TEST
compare_values(refenergy, variable('scf total energy'), 9, "Reference energy")  #TEST

Of those small modifications, first, note the special comment at the top (starting with the #! comment marker). This should be descriptive since it is inlined into the manual (unless !nosample in the comment) as a sample input.

Reference values are often assigned to variables for later use. The compare_values function (along with several relatives in psi4/psi4/driver/p4util/testing.py for comparing strings, matrices, etc.) checks that the computed values match these reference values to suitable precision. This function prints an error message and signals that the test failed to the make system, if the values don’t match. Any lines of the input associated with the validation process should be flagged with #TEST at the end of each line, so that they can be removed when copying from the tests to the samples directory.

### output.ref¶

When your test case is in final form, run it locally, rename the output to output.ref, and check it into the repository alongside input.dat. While this isn’t used for any testing machinery (except for the nearly decommissioned psi4/tests/psitest.pl for CC tests; full decommission expected by v1.6), it can be handy for users or developers to consult.

### test_input.py¶

Starting March 2022, one can also run tests designed as above for CTest through pytest. To bring the test to pytest’s notice, add a file to the directory named test_input.py. Below is an example for the psi4/tests/ci-property/test_input.py

from addons import *

@ctest_labeler("quick;ci;cas;properties;cart;noc1")
def test_ci_property():
ctest_runner(__file__, ["grid.dat"])

This file contains much the same information as the CMakeLists.txt. The def test_ci_property contains the name of the test, now with underscores rather than hyphens. def test_ identifies it to pytest as a test. That part of the function name and the name of the file, test_input.py are required, but no further registration with CMake is necessary. Most tests need only the simple form of the runner line ctest_runner(__file__). This uses QCEngine machinery to execute python psi4 input.dat. If additional input files are needed from the test directory, their names can be added to the the second argument list as shown above. Those additional input files do need to be registered in psi4/psi4/CMakeLists.txt.

Finally, the label string passed to CTest is here handed to pytest, with a few changes:

• psi added automatically, so exclude it when copying from CTest CMakeLists.txt

• cli added automatically to distinguish CTest origin from deliberate pytest origin, which have api added

• smoke used instead of CTest smoketests

• quick used instead of CTest quicktests

• long used instead of CTest longtests

• addon and <name-of-addon> added automatically when @uusing("<name-of-addon>") decorates the test or marks=using("<name-of-addon>") marks the test

CTest “labels” are called “marks” in pytest. Any new marks should be added to psi4/pytest.ini.

### Running for Debugging¶

• PSIthon tests that don’t need extra files to run are easily run from <objdir> via stage/bin/psi4 ../tests/<test-name>/input.dat, with the output appearing in ../tests/<test-name>/input.out.

• All PSIthon tests are runable through CTest, and output files appear in <objdir>/tests/<test-name>/output.dat and stdout results appear in <objdir>/Testing/Temporary/LastTest.log*.

To create a new test case, either create a new file or add to an existing file under psi4/tests/pytests.

• Test must be in the psi4/tests/pytests/ directory.

• Test file name must start with test_. This is how pytest knows to collect it.

• A test file may contain many tests, each of which is an ordinary Python function with name starting test_. This is how pytest knows to collect it.

• No registration required to bring a test to pytest’s attention.

• No registration required to bring a test to CMake’s attention. If a test needs additional files, register them in psi4/psi4/CMakeLists.txt.

A few notes on test contents:

• Import testing functions from utils and use Python assert: assert compare_values(expected, computed, ...).

• Don’t worry about cleaning up files or resetting options. A function in psi4/tests/pytests/conftest.py does this automatically between every test.

• Especially if using data or functions from outside a test, run a variety of tests at different pytest -n <N> levels to mix up test ordering. If tests fail that pass when run alone, you’ve got a function of the same name changing state or some similar correctable phenomenon.

A few notes on test labels:

• For every new test file, add pytestmark = [pytest.mark.psi, pytest.mark.api] at the top. This ensures that every test has the psi mark and every PsiAPI test has the api mark to contrast with PSIthon tests with cli mark.

• There are individual “marks” that can be added to whole tests or parts of parameterized tests so that they can be run by category (pytest -m <mark> vs. ctest -L <mark>) rather than just by name (pytest -k <name_fragment> vs. ctest -R <name_fragment>). Far more complicated logic is allowed than for CTest: pytest -m "dftd3 and not api and not long".

• The most important marks are “quick” and “long” that opt tests into the quick CI suite or out of the normal full suite. Mark with a decorator for the full test or the marks argument in a parameterized test. Search “mark” in the test suite for examples. Use “quick” freely for tests that cover functionality and are under 15s. Use “long” sparingly to winnow out the longest examples, particularly those over a minute.

### Running for Debugging¶

There are many ways to run pytest, How to test a Psi4 installation, and three different copies of the test file (i.e., psi4/tests/pytests/test_mp2.py, <objdir>/stage/lib/PYMOD_INSTALL_LIBDIR/psi4/tests/test_mp2.py, CMAKE_INSTALL_PREFIX/lib/PYMOD_INSTALL_LIBDIR/psi4/tests/test_mp2.py). But for developing a pytest test, you probably want to use the first so you can edit it in place rather than running cmake --build after each change.

• Easiest is from <objdir>, run pytest ../tests. Add any filters (-k test_name_fragment) or parallelism (-n <N> or -n auto if pytest-xdist installed) or print test names (-v) or print warnings (-rws).

• An important point is that because they’re PsiAPI, import psi4 is happening, so the <objdir> PSI4 module must be in PYTHONPATH. Also, any call to QCEngine is using which psi4, so the <objdir> PSI4 executable must be in PATH. The easiest way to prepare your local environment is to execute the printout of <objdir>/stage/bin/psi4 --psiapi.

• To see stdout output from an otherwise passing test, easiest to add assert 0 at its end to trigger failure.

• If stdout printing is insufficient, and you really need to see output.dat or other files, comment out their deletion in psi4/tests/pytests/conftest.py and run the single test, deleting the file each time (since it appends).

## Comparison Functions¶

### Plain Old Data¶

psi4.compare_values(expected, computed, atol_exponent, label[, *, **kwargs])
psi4.compare_values(expected, computed[, label, *, **kwargs])

Comparison function for float or float array-like data structures. See qcelemental.testing.compare_values() for details.

psi4.compare_arrays is an old comparison function for float NumPy arrays that is now an alias to this.

Handles both Psi4-style signatures ((expected, computed, atol_exponent, label); see atol_exponent parameter below) and QCA-style signatures ((expected, computed, label)).

Parameters:

atol_exponent (int or float) – Absolute tolerance (see formula in qcelemental.testing.compare_values() notes). Values less than one are taken literally; one or greater taken as decimal digits for comparison. So 1 means atol=0.1 and 2 means atol=0.01 but 0.04 means atol=0.04 Note that the largest expressable processed atol will be ~0.99.

qcelemental.testing.compare_values(expected, computed, label=None, *, atol=1e-06, rtol=1e-16, equal_nan=False, equal_phase=False, passnone=False, quiet=False, return_message=False, return_handler=None)[source]

Returns True if two floats or float arrays are element-wise equal within a tolerance.

Parameters:
Return type:
Returns:

• allclose (bool) – Returns True if expected and computed are equal within tolerance; False otherwise.

• message (str) – When return_message=True, also return passed or error message.

Notes

absolute(computed - expected) <= (atol + rtol * absolute(expected))

psi4.compare_integers(expected, computed[, label, *, **kwargs])

Comparison function for integers, strings, booleans, or integer array-like data structures. See qcelemental.testing.compare() for details.

psi4.compare_strings is an alias to this.

qcelemental.testing.compare(expected, computed, label=None, *, equal_phase=False, quiet=False, return_message=False, return_handler=None)[source]

Returns True if two integers, strings, booleans, or integer arrays are element-wise equal.

Parameters:
Return type:
Returns:

• allclose (bool) – Returns True if expected and computed are equal; False otherwise.

• message (str) – When return_message=True, also return passed or error message.

Notes

### Objects¶

psi4.compare_matrices(expected, computed, atol_exponent, label[, *, check_name=False, **kwargs])
psi4.compare_matrices(expected, computed[, label, *, check_name=False, **kwargs])

Comparison function for psi4.core.Matrix objects. Compares Matrix properties of name (optional through check_name), nirrep, symmetry, and number of rows and columns for each irrep. For comparing actual numerical contents, the matrices are serialized to NumPy array format and passed to qcelemental.testing.compare_recursive().

Handles both Psi4-style signatures ((expected, computed, atol_exponent, label); see atol_exponent parameter below) and QCA-style signatures ((expected, computed, label)).

Parameters:

atol_exponent (int or float) – Absolute tolerance (see formula in qcelemental.testing.compare_values() notes). Values less than one are taken literally; one or greater taken as decimal digits for comparison. So 1 means atol=0.1 and 2 means atol=0.01 but 0.04 means atol=0.04 Note that the largest expressable processed atol will be ~0.99.

qcelemental.testing.compare_recursive(expected, computed, label=None, *, atol=1e-06, rtol=1e-16, forgive=None, equal_phase=False, quiet=False, return_message=False, return_handler=None)[source]

Recursively compares nested structures such as dictionaries and lists.

Parameters:
Return type:
Returns:

• allclose (bool) – Returns True if expected and computed are equal within tolerance; False otherwise.

• message (str) – When return_message=True, also return passed or error message.

Notes

absolute(computed - expected) <= (atol + rtol * absolute(expected))

psi4.compare_vectors(expected, computed, atol_exponent, label[, *, check_name=False, **kwargs])
psi4.compare_vectors(expected, computed[, label, *, check_name=False, **kwargs])

Comparison function for psi4.core.Vector objects. Compares Vector properties of name (optional through check_name), nirrep, and dimension of each irrep. For comparing actual numerical contents, the vectors are serialized to NumPy array format and passed to qcelemental.testing.compare_recursive().

Handles both Psi4-style signatures ((expected, computed, atol_exponent, label); see atol_exponent parameter below) and QCA-style signatures ((expected, computed, label)).

Parameters:

atol_exponent (int or float) – Absolute tolerance (see formula in qcelemental.testing.compare_values() notes). Values less than one are taken literally; one or greater taken as decimal digits for comparison. So 1 means atol=0.1 and 2 means atol=0.01 but 0.04 means atol=0.04 Note that the largest expressable processed atol will be ~0.99.

psi4.compare_wavefunctions(expected, computed, atol_exponent, label[, *, check_name=False, **kwargs])
psi4.compare_wavefunctions(expected, computed[, label, *, check_name=False, **kwargs])

Comparison function for psi4.core.Wavefunction objects. Compares over 30 Wavefunction properties, including nirrep, nso, molecule geometry, basis set nbf, density matrices, gradient results, etc.

Handles both Psi4-style signatures ((expected, computed, atol_exponent, label); see atol_exponent parameter below) and QCA-style signatures ((expected, computed, label)).

Parameters:

atol_exponent (int or float) – Absolute tolerance (see formula in qcelemental.testing.compare_values() notes). Values less than one are taken literally; one or greater taken as decimal digits for comparison. So 1 means atol=0.1 and 2 means atol=0.01 but 0.04 means atol=0.04 Note that the largest expressable processed atol will be ~0.99.

psi4.compare_molrecs(expected, computed[, label, *, check_name=False, **kwargs])

Comparison function for psi4.core.Molecule.to_dict() objects. See qcelemental.testing.compare_molrecs() for details.

Note only QCA-style signature ((expected, computed, label)) available.

qcelemental.testing.compare_molrecs(expected, computed, label=None, *, atol=1e-06, rtol=1e-16, forgive=None, verbose=1, relative_geoms='exact', return_message=False, return_handler=None)[source]

Function to compare Molecule dictionaries.

Return type:

bool

Parameters:

### File Formats¶

psi4.compare_cubes(expected, computed[, label, *, check_name=False, **kwargs])

Comparison function for volumetric data in cube file format. Compares only the volumetric data, not the voxel data or molecular geometry or other header contents. The volumetric data is passed to qcelemental.testing.compare_values().

Note only QCA-style signature ((expected, computed, label)) available.

Parameters:
• expected – Reference cube file against which computed is compared. Read by numpy.genfromtxt() so expected can be any of file, str, pathlib.Path, list of str, generator.

• computed – Input cube file to compare against expected. Read by numpy.genfromtxt() so computed can be any of file, str, pathlib.Path, list of str, generator.

psi4.compare_fchkfiles(expected, computed, atol_exponent, label)[source]

Comparison function for output data in FCHK (formatted checkpoint) file format. Compares many fields including number of electrons, highest angular momentum, basis set exponents, densities, final gradient.

Note only Psi4-style signature ((expected, computed, atol_exponent, label)) available.

An older format description can be found here http://wild.life.nctu.edu.tw/~jsyu/compchem/g09/g09ur/f_formchk.htm It lists more fields (logical, character) that are not included in this test function. They should be covered by the string comparison. This function is only meant to work with PSI4’s FCHK files.

Parameters:
• expected (str) – Path to reference FCHK file against which computed is compared.

• computed (str) – Path to input FCHK file to compare against expected.

• atol_exponent (Union[int, float]) – Absolute tolerance for high accuracy fields – 1.e-8 or 1.e-9 is suitable. Values less than one are taken literally; one or greater taken as decimal digits for comparison. So 1 means atol=0.1 and 2 means atol=0.01 but 0.04 means atol=0.04 Note that the largest expressable processed atol will be ~0.99.

• label (str) – Label for passed and error messages.

psi4.compare_fcidumps(expected, computed, label)[source]

Comparison function for FCIDUMP files. Compares the first six below, then computes energies from MO integrals and compares the last four.

• ‘norb’ : number of basis functions

• ‘nelec’ : number of electrons

• ‘ms2’ : spin polarization of the system

• ‘isym’ : symmetry of state (if present in FCIDUMP)

• ‘orbsym’ : list of symmetry labels of each orbital

• ‘uhf’ : whether restricted or unrestricted

• ‘ONE-ELECTRON ENERGY’ : SCF one-electron energy

• ‘TWO-ELECTRON ENERGY’ : SCF two-electron energy

• ‘SCF TOTAL ENERGY’ : SCF total energy

• ‘MP2 CORRELATION ENERGY’ : MP2 correlation energy

Parameters:
psi4.compare_moldenfiles(expected, computed, atol_exponent=1e-07, label='Compare Molden')[source]

Comparison function for output data in Molden file format. Compares many fields including geometry, basis set, occupations, symmetries, energies.

Note only Psi4-style signature ((expected, computed, atol_exponent, label)) available.

A format description is found https://www3.cmbi.umcn.nl/molden/molden_format.html

Parameters:
• expected (str) – Path to reference Molden file against which computed is compared.

• computed (str) – Path to input Molden file to compare against expected.

• atol_exponent (Union[int, float]) – Absolute tolerance for high accuracy fields – 1.e-8 or 1.e-9 is suitable. Values less than one are taken literally; one or greater taken as decimal digits for comparison. So 1 means atol=0.1 and 2 means atol=0.01 but 0.04 means atol=0.04 Note that the largest expressable processed atol will be ~0.99.

• label (str) – Label for passed and error messages.

qcdb.compare_vibinfos(expected, computed, tol, label, verbose=1, forgive=None, required=None, toldict=None)[source]

Returns True if two dictionaries of vibration Datum objects are equivalent within a tolerance.

Parameters:
Returns:

allclose – Returns True if expected and computed are equal within tolerance; False otherwise.

Return type:

bool

### Extra QCA Functions¶

psi4.compare(expected, computed, label=None, *, equal_phase=False, quiet=False, return_message=False, return_handler=<function _psi4_true_raise_handler>)

Returns True if two integers, strings, booleans, or integer arrays are element-wise equal.

Parameters:
• expected (Union[int, bool, str, List[int], ndarray]) – int, bool, str or array-like of same. Reference value against which computed is compared.

• computed (Union[int, bool, str, List[int], ndarray]) – int, bool, str or array-like of same. Input value to compare against expected.

• label (str) – Label for passed and error messages. Defaults to calling function name.

• equal_phase (bool) – Compare computed or its opposite as equal.

• quiet (bool) – Whether to log the return message.

• return_message (bool) – Whether to return tuple. See below.

• return_handler (Callable) – Function to control printing, logging, raising, and returning. Specialized interception for interfacing testing systems.

Returns:

• allclose (bool) – Returns True if expected and computed are equal; False otherwise.

• message (str) – When return_message=True, also return passed or error message.

Return type:

Union[bool, Tuple[bool, str]]

Notes

psi4.compare_recursive(expected, computed, *args, **kwargs)

Comparison function for recursively comparing mixed-type and nested structures such as dictionaries and lists. See qcelemental.testing.compare_recursive() for details.


text:
# How do you find the intervals of increasing and decreasing using the first derivative given y=x/2+cosx?

Feb 9, 2018

The function is increasing $\iff x \in \left(\frac{\pi}{6} + 2 \pi k , 5 \frac{\pi}{6} + 2 \pi k\right)$
The function is constant $\iff x = \frac{\pi}{6} + 2 \pi k$ or $x = 5 \frac{\pi}{6} + 2 \pi k$
The function is decreasing $\iff x \in \mathbb{R} - \left[\frac{\pi}{6} + 2 \pi k , 5 \frac{\pi}{6} + 2 \pi k\right]$

#### Explanation:

If $y = \frac{x}{2} + \cos \left(x\right)$ then $y ' = \frac{1}{2} - \sin \left(x\right)$

if $y ' > 0$ then the function at that point is increasing.
If $y ' < 0$ then the function at that point is decreasing.
If $y ' = 0$ then the function at that point is constant.

The function $\sin \left(x\right)$ has a periodic behavior.

Lets construct a values table for the function $\sin \left(x\right)$
$x = 0 \implies \sin \left(x\right) = 0$
$x = \frac{\pi}{6} \implies \sin \left(x\right) = \frac{1}{2}$
$x = \frac{\pi}{4} \implies \sin \left(x\right) = \frac{\sqrt{3}}{2}$
$x = \frac{\pi}{2} \implies \sin \left(x\right) = 1$

We also know that $\sin \left(- x\right) = - \sin \left(x\right)$ and $\sin \left(\pi - \theta\right) = \sin \left(\theta\right)$

To the derivative has a positive value, we must have $\sin \left(x\right) > \frac{1}{2}$.

To have this we must have $\pi - \frac{\pi}{6} > x > \frac{\pi}{6}$
That means exactly the same as $5 \frac{\pi}{6} > x > \frac{\pi}{6}$

Because $\sin \left(x\right)$ is periodical, we could have

$5 \frac{\pi}{6} + 2 \pi k > x > \frac{\pi}{6} + 2 \pi k , k \in \mathbb{Z}$

The points where the derivative has the exactly value of zero is when $x = \frac{\pi}{6} + 2 \pi k \text{ or } x = 5 \frac{\pi}{6} + 2 \pi k$

So, now we have that:

For any $k \in \mathbb{Z}$ it's true that:
The function is increasing $\iff x \in \left(\frac{\pi}{6} + 2 \pi k , 5 \frac{\pi}{6} + 2 \pi k\right)$
The function is constant $\iff x = \frac{\pi}{6} + 2 \pi k$ or $x = 5 \frac{\pi}{6} + 2 \pi k$

So, we must have the function decreasing in all the other possible values

The function is decreasing $\iff x \in \mathbb{R} - \left[\frac{\pi}{6} + 2 \pi k , 5 \frac{\pi}{6} + 2 \pi k\right]$

We can see this in the graph of the function:
graph{y=x/2 + cos(x) [-8.21, 10.14, -3.56, 5.61]}

And here is the derivative:
graph{y=1/2 - sin(x) [-8.21, 10.14, -3.56, 5.61]}


text:
# Properties of translations

CCSS Math: HSG.CO.A.4
Learn and verify three important properties of geometrical translations.
When you translate something in geometry, you're simply moving it around. You don't distort it in any way. If you translate a segment, it remains a segment, and its length doesn't change. Similarly, if you translate an angle, the measure of the angle doesn't change.
These properties may seem obvious, but they're important to keep in mind later on when we do proofs. To make sure we understand these properties, let's walk through a few examples.

## Property 1: Line segments are taken to line segments of the same length.

Translate the following line segment by $\langle2,-7\rangle$.
What is the length of the source—the segment before the translation?
What is the length of the image—the segment after the translation?
In order to translate the segment by $\langle 2,-7 \rangle$, we move it two units to the right and seven units down.
By counting the number of units between the endpoints of the line segments, we see that both the source and the image are eight units long.
As you can see for yourself, the source and the image are both line segments with the same length. This is true for any line segment that goes under any translation.

## Property 2: Angles are taken to angles of the same measure.

Translate the following angle by $\langle 5,-6 \rangle$.
Has the measure of the angle changed after the translation?
In order to translate the angle by $\langle 5,-6 \rangle$, we move it five units to the right and six units down.
As the widget shows, the source angle's measure is 45$^\circ$, and the image angle's measure is 45$^\circ$ as well. Therefore, the measure of the angle has not changed.
As you can see for yourself, the source angle and the image angle have the same measure. This is true for any angle that goes under any translation.

## Property 3: Lines are taken to lines, and parallel lines are taken to parallel lines.

Translate the following pair of parallel lines by $\langle -4,3 \rangle$.
Are the two image lines parallel?
In order to translate the lines by $\langle -4,3 \rangle$, we move them four units to the left and three units up.


text:
Search
>> Home >> Products >> Stata Gift Shop >> Bookmarks >> Series 1

## Bookmarks: Series 1 details

 $2.50 in North America (Price includes shipping.) Buy $3.75 International (Price includes shipping.) Buy

#### André-Louis Cholesky

André-Louis Cholesky (1875–1918) was born near Bordeaux in France. He studied at the Ecole Polytechnique and then joined the French army. Cholesky served in Tunisia and Algeria and then worked in the Geodesic Section of the Army Geographic Service, where he invented his now-famous method. In the war of 1914–1918, he served in the Vosges and in Romania but after return to the Western front was fatally wounded. Cholesky’s method was written up posthumously by one of his fellow officers but attracted little attention until the 1940s.

#### Johann Carl Friedrich Gauss

Johann Carl Friedrich Gauss (1777–1855) was born in Braunschweig (Brunswick), now in Germany. He studied there and at Göttingen. His doctoral dissertation at the University of Helmstedt was a discussion of the fundamental theorem of algebra. He made many fundamental contributions to geometry, number theory, algebra, real analysis, differential equations, numerical analysis, statistics, astronomy, optics, geodesy, mechanics, and magnetism. An outstanding genius, Gauss worked mostly in isolation in Göttingen.

#### William Sealy Gosset

William Sealy Gosset (1876–1937) was born in Canterbury, England. He studied chemistry and mathematics at Oxford and obtained employment as a chemist with the brewers Guinness in Dublin. Gosset became very interested in statistical problems, which he discussed with Karl Pearson and later with Fisher and Neyman, and published several important papers under the pseudonym “Student”, including that on the test that usually bears his name.

#### Leslie Kish

Leslie Kish (1910–2000) was born in Poprad, Hungary, and entered the United States with his family in 1926. He worked as a lab assistant at the Rockefeller Institute for Medical Research and studied at the College of the City of New York, fighting in the Spanish Civil War before receiving his first degree in mathematics. Kish worked for the Bureau of the Census, the Department of Agriculture, the Army Air Corps, and finally the University of Michigan. He carried out pioneering work in the theory and practice of survey sampling, including design effects, balanced repeated replication, response errors, rolling samples and censuses, controlled selection, multipurpose designs, and small-area estimation.

#### Frank Wilcoxon

Frank Wilcoxon (1892–1965) was born in Ireland to American parents. After working in various occupations (including merchant seaman, oil-well pump attendant and tree surgeon), he settled in chemistry, gaining degrees from Rutgers and Cornell and employment from various companies. Working mainly on the development of fungicides and insecticides, Wilcoxon became interested in statistics in 1925 and made several key contributions to nonparametric methods. After retiring from industry, he taught statistics at Florida State until his death.


text:
# std::ranges::unique

< cpp | algorithm | ranges
 Defined in header  Call signature template< std::permutable I, std::sentinel_for S, class Proj = std::identity,           std::indirect_equivalence_relation>           C = ranges::equal_to > constexpr ranges::subrange unique( I first, S last, C comp = {}, Proj proj = {} ); (1) (since C++20) template< ranges::forward_range R, class Proj = std::identity,           std::indirect_equivalence_relation, Proj>>           C = ranges::equal_to > requires  std::permutable> constexpr ranges::borrowed_subrange_t unique( R&& r, C comp = {}, Proj proj = {} ); (2) (since C++20)
1) Eliminates all except the first element from every consecutive group of equivalent elements from the range [first, last) and returns a subrange [ret, last), where ret is a past-the-end iterator for the new end of the range.
Two consecutive elements *(i - 1) and *i are considered equivalent if std::invoke(comp, std::invoke(proj, *(i - 1)), std::invoke(proj, *i)) == true, where i is an iterator in the range [first + 1, last).
2) Same as (1), but uses r as the range, as if using as first, and ranges::end(r) as last.

In practice, they may be implemented as function objects, or with special compiler extensions.

## Contents

### Parameters

 first, last - the range of elements to process r - the range of elements to process comp - the binary predicate to compare the projected elements proj - the projection to apply to the elements

### Return value

Returns {ret, last}, where ret is a past-the-end iterator for the new end of the range.

### Complexity

For nonempty ranges, exactly ranges::distance(first, last) - 1 applications of the corresponding predicate comp and no more that twice as many applications of any projection proj.

### Notes

Removing is done by shifting (by means of move assignment) the elements in the range in such a way that the elements that are not to be removed appear in the beginning of the range. Relative order of the elements that remain is preserved and the physical size of the container is unchanged. Iterators in [ret, last) (if any) are still dereferenceable, but the elements themselves have unspecified values (as per MoveAssignable post-condition).

A call to ranges::unique is sometimes followed by a call to a container’s erase member function, which erases the unspecified values and reduces the physical size of the container to match its new logical size. These two invocations together model the Erase–remove idiom.

### Possible implementation

 struct unique_fn { template S, class Proj = std::identity, std::indirect_equivalence_relation> C = ranges::equal_to> constexpr ranges::subrange operator() ( I first, S last, C comp = {}, Proj proj = {} ) const { first = ranges::adjacent_find(first, last, comp, proj); if (first == last) return {first, first}; auto i {first}; ++first; while (++first != last) if (!std::invoke(comp, std::invoke(proj, *i), std::invoke(proj, *first))) *++i = std::move(*first); return {++i, first}; }   template, Proj>> C = ranges::equal_to> requires std::permutable> constexpr ranges::borrowed_subrange_t operator() ( R&& r, C comp = {}, Proj proj = {} ) const { return (*this)(ranges::begin(r), ranges::end(r), std::move(comp), std::move(proj)); } };   inline constexpr unique_fn unique{};

### Example

#include <algorithm>
#include <cmath>
#include <complex>
#include <iostream>
#include <vector>

struct id { int i; explicit id(int i) : i{i} {} };

void print(id i, const auto& v) {
std::cout << "@" << i.i << ": ";
std::ranges::for_each(v, [](auto const& e) { std::cout << e << ' '; });
std::cout << '\n';
}

int main()
{
// a vector containing several duplicate elements
std::vector<int> v{1, 2, 1, 1, 3, 3, 3, 4, 5, 4};

print(id{1}, v);

auto ret = std::ranges::unique(v);
// v now holds {1 2 1 3 4 5 4 x x x}, where 'x' is indeterminate
v.erase(ret.begin(), ret.end());
print(id{2}, v);

// sort followed by unique, to remove all duplicates
std::ranges::sort(v); // {1 1 2 3 4 4 5}
print(id{3}, v);

auto [first, last] = std::ranges::unique(v.begin(), v.end());
// v now holds {1 2 3 4 5 x x}, where 'x' is indeterminate
v.erase(first, last);
print(id{4}, v);

// unique with custom comparison and projection
std::vector<std::complex<int>> vc{ {1, 1}, {-1, 2}, {-2, 3}, {2, 4}, {-3, 5} };
print(id{5}, vc);

auto ret2 = std::ranges::unique(vc,
[](int x, int y) { return std::abs(x) == std::abs(y); }, // comp
[](std::complex<int> z) { return z.real(); }             // proj
);
vc.erase(ret2.begin(), ret2.end());
print(id{6}, vc);
}

Output:

@1: 1 2 1 1 3 3 3 4 5 4
@2: 1 2 1 3 4 5 4
@3: 1 1 2 3 4 4 5
@4: 1 2 3 4 5
@5: (1,1) (-1,2) (-2,3) (2,4) (-3,5)
@6: (1,1) (-2,3) (-3,5)

 ranges::unique_copy(C++20) creates a copy of some range of elements that contains no consecutive duplicates (niebloid)  ranges::adjacent_find(C++20) finds the first two adjacent items that are equal (or satisfy a given predicate) (niebloid)  ranges::removeranges::remove_if(C++20)(C++20) removes elements satisfying specific criteria (niebloid)  unique removes consecutive duplicate elements in a range (function template)  unique removes consecutive duplicate elements (public member function of std::list)  unique(C++11) removes consecutive duplicate elements (public member function of std::forward_list)


text:
# How to independently set the font properties of each component in section titles in ConTeXt?

I want to make two-line chapter titles such as this:

Chapter 1
Animals

I want to adjust the font properties of each line though. With this code, I expected it would set "Chapter 1" to roman, size "c" text and set "Animals" to sans serif, size "d" text:

\setuplabeltext[en][chapter=Chapter~]
\define[2]\placechapter{
\framed[align=raggedleft]{
{\rm #1} \crlf
{\tfd #2}
}
}

\starttext
\chapter{This is the title.}

This is some text.

\stoptext

Somehow though, the code is ignoring my font commands. How can I independently set the font properties of each line in a two-line section title?

-

This is because the style is already applied to #1 and #2, so effectively you are using \rm\ss\tfc, so the \ss overrides the \rm. Why not simply use textstyle and numberstyle keys.

\setuplabeltext[en][chapter=Chapter~]

\define[2]\placechapter
{\framed[strut=no, align=raggedleft]{#1\crlf #2}}


text:
## Calculus (3rd Edition)

The series $\sum_{n=2}^{\infty} \frac{(-1)^{n}}{n^{1 / 2}(\ln n)^{2}}$ converges.
For the series $\sum_{n=2}^{\infty} \frac{(-1)^{n}}{n^{1 / 2}(\ln n)^{2}}$, the positive term $b_n=\frac{1}{n^{1 / 2}(\ln n)^{2}}$, which is positive and decreasing. Evaluate the limit: $$\lim_{n\to \infty}b_n=\lim_{n\to \infty}\frac{1}{n^{1 / 2}(\ln n)^{2}}=\frac{1}{\infty}=0$$ Hence, using the alternating series test, the series $\sum_{n=2}^{\infty} \frac{(-1)^{n}}{n^{1 / 2}(\ln n)^{2}}$ converges.


text:
# Fully Truncated Simplices

### Barry Monson University of New Brunswick

#### Gordon Williams U. Alaska - Fairbanks

PDF

Minisymposium: POLYTOPES AND GRAPHS

Content: If you truncate an equilateral triangle $\{3\}$ to its edge midpoints you get another, smaller $\{3\}$. If you truncate a regular tetrahedron $\{3, 3\}$ to its edge midpoints, you get (a little unexpectedly) a regular octahedron $\{3, 4\}$. In higher ranks, the fully truncated n-simplex $\mathcal{T}_n$ is no longer regular, though it is uniform with facets of two types. We want to understand the minimal regular cover $\mathcal{R}_n$ of $\mathcal{T}_n$, which in turn means we need to understand its monodromy group $M_n := \mathrm{Mon}(\mathcal{T}_n)$. For $n\geq 4$, we know' that this group has Schl\"{a}fli type $\{3,12,3,\ldots,3\}$ and the impressive order $$\frac{[(n+1)!]^{n-1} \cdot (n-1)!}{2^{n-2}}$$ % I will discuss all this and report on the current state of my confusion amongst all this fun. (How can one call mathematics work'?)

Back to all abstracts