text:
# 7. Response functions¶

This notebook provides an overview of the response functions that are available in Pastas. Response functions describe the response of the dependent variable (e.g., groundwater levels) to an independent variable (e.g., groundwater pumping) and form a fundamental part in the transfer function noise models implemented in Pastas. Depending on the problem under investigation, a less or more complex response function may be required, where the complexity is quantified by the number of parameters. Response function are generally used in combination with a stressmodel, but in this notebook the response functions are studied independently to provide an overview of the different response functions and what they represent.

[7]:
import numpy as np
import pandas as pd
import pastas as ps

import matplotlib.pyplot as plt

ps.show_versions()
Python version: 3.7.8 | packaged by conda-forge | (default, Jul 31 2020, 02:37:09)
[Clang 10.0.1 ]
Numpy version: 1.18.5
Scipy version: 1.4.0
Pandas version: 1.0.5
Pastas version: 0.16.0b
Matplotlib version: 3.1.3

## 7.1. The use of response functions¶

Depending on the stress type (e.g., recharge, river levels or groundwater pumping) different response function may be used. All response functions that are tested and supported in Pastas are summarized in the table below for reference. The equation in the third column is the formula for the impulse response function ($$\theta(t)$$).

Name

Parameters

Formula

Description

FourParam

4 - A, n, a, b

$\theta(t) = At^{n-1} e^{-t/a -ab/t}$

Response function with four parameters that may be used for many purposes. Many other response function are a simplification of this function.

Gamma

3 - A, a, n

$\theta(t) = At^{n-1} e^{-t/a}$

Three parameter versino of FourParam, used for all sorts of stresses ($$b=0$$)

Exponential

2 - A, a

$\theta(t) = A e^{-t/a}$

Response function that can be used for stresses that have an (almost) instant effect. ($$n=1$$ and $$b=0$$)

Hantush

3 - A, a, b

$\theta(t) = At^{-1} e^{-t/a - ab/t}$

Response function commonly used for groundwater abstraction wells ($$n=0$$)

Polder

3 - a, b, c

$\theta(t) = At^{-3/2} e^{-t/a -b/t}$

Response function commonly used to simulate the effects of (river) water levels on the groundwater levels ($$n=-1/2$$)

DoubleExponential

4 - A, $$\alpha$$, $$a_1$$,$$a_2$$

$\theta(t) = A (1 - \alpha) e^{-t/a_1} + A \a$

lpha e^{-t/a_2}

Response Function with a double exponential, simulating a fast and slow response.

Edelman

1 - $$\beta$$

$\theta(t) = \text{?}$

The function of Edelman, describing the propagation of an instantaneous water level change into an adjacent half-infinite aquifer.

HantushWellModel

3 - A, a, b

$\theta(t) = \text{?}$

A special implementation of the Hantush well function for multiple wells.

Below the different response functions are plotted.

[19]:
# Default Settings
cutoff = 0.999
meanstress = 1
up = True

responses = {}
exp = ps.Exponential(up=up, meanstress=meanstress, cutoff=cutoff)
responses["Exponential"] = exp

gamma = ps.Gamma(up=up, meanstress=meanstress, cutoff=cutoff)
responses["Gamma"] = gamma

hantush = ps.Hantush(up=up, meanstress=meanstress, cutoff=cutoff)
responses["Hantush"] = hantush

polder = ps.Polder(up=up, meanstress=meanstress, cutoff=cutoff)
responses["Polder"] = polder

fourp = ps.FourParam(up=up, meanstress=meanstress, cutoff=cutoff)
responses["FourParam"] = fourp

DoubleExp = ps.DoubleExponential(up=up, meanstress=meanstress, cutoff=cutoff)
responses["DoubleExponential"] = DoubleExp

parameters = pd.DataFrame()

fig, [ax1, ax2] = plt.subplots(1,2, sharex=True, figsize=(10,3))

for name, response in responses.items():
p = response.get_init_parameters(name)
parameters = parameters.append(p)
ax1.plot(response.block(p.initial), label=name)
ax2.plot(response.step(p.initial), label=name)

ax1.set_title("Block response")
ax2.set_title("Step responses")
ax1.set_xlabel("Time [days]")
ax2.set_xlabel("Time [days]")
ax1.legend()
plt.xlim(0, 500)
plt.show()

### 7.1.1. Scaling of the step response functions¶

An important characteristic is the so-called “gain” of a response function. The gain is the final increase or decrease that results from a unit increase or decrease in a stress that continues infinitely in time (e.g., pumping at a constant rate forever). This can be visually inspected by the value of the step response function for large values of $$t$$ but can also be inferred from the parameters as follows:

• The FourParam, Gamma, and Exponential step functions are scaled such that the gain equals $$A$$

• The Hantush step function is scaled such that the gain equals AK$$_0(\sqrt{4b})$$

• The Polder function is scaled such that the gain equals $$\exp\left(-2\sqrt{b}\right)$$

• The gain of the Edelman function always equals 1, but this will take an infinite amount of time.

## 7.2. Comparison of the different response functions¶

The Gamma, Exponential, Polder, and Hantush response function can all be derived from the more general FourParam response function by fixing the parameters $$n$$ and/or $$b$$ to a specific value. The DoubleExponential, Edelman, and HantushWellModel cannot be written as some form of the FourParam function. Below the response function that are special forms of the four parameter function are are shown for different values of $$n$$ and $$b$$.

[3]:
A = 1
a = 50
b = 0.4
plt.figure(figsize=(16, 8))
for i, n in enumerate([-0.5, 1e-6, 0.5, 1, 1.5]):
plt.subplot(2, 3, i + 1)
plt.title(f'n={n:0.1f}')
fp = fourp.step([A, n, a, b], dt=1, cutoff=0.95)
plt.plot(np.arange(1, len(fp) + 1), fp, 'C0', label='4-param')
e = exp.step([A, a], dt=1, cutoff=0.95)
plt.plot(np.arange(1, len(e) + 1), e, 'C1', label='exp')
if n > 0:
g = gamma.step([A, n, a], dt=1, cutoff=0.95)
plt.plot(np.arange(1, len(g) + 1), g, 'C2', label='gamma')
h = hantush.step([A, a, b], dt=1, cutoff=0.95) / hantush.gain([A, a, b])
plt.plot(np.arange(1, len(h) + 1), h, 'C3', label='hantush')
p = polder.step([A, a, b], dt=1, cutoff=0.95) / polder.gain([A, a, b])
plt.plot(np.arange(1, len(p) + 1), p, 'C4', label='polder')
plt.xlim(0, 200)
plt.legend()
if n > 0:
print('fp, e, g, h, p:', fp[-1], e[-1], g[-1], h[-1], p[-1])
else:
print('fp, e, h, p:', fp[-1], e[-1], h[-1], p[-1])
plt.axhline(0.95, linestyle=':')
fp, e, h, p: 1.0000000000004374 0.9492071661351015 0.98123979275479 0.9830683612665702
fp, e, g, h, p: 0.9999999999999654 0.9492071661351015 0.9999973187391233 0.98123979275479 0.9830683612665702
fp, e, g, h, p: 0.9999999999999719 0.9492071661351015 0.9499564787512949 0.98123979275479 0.9830683612665702
fp, e, g, h, p: 0.9647133962871524 0.9492071661351015 0.9492071661351015 0.98123979275479 0.9830683612665702
fp, e, g, h, p: 0.9526242688459672 0.9492071661351015 0.9496689021401467 0.98123979275479 0.9830683612665702

## 7.3. Parameter settings¶

• up : This parameters determines whether the influence of the stress goes up or down, hence a positive or a negative response function. For example, when groundwater pumping is defined as a positive flux, up=False because we want the groundwater levels to decrease as a result of pumping.

• meanstress : This parameter is used to estimate the initial value of the stationary effect of a stress. Hence the effect when a stress stays at an unit level for infinite amount of time. This parameter is usually referred from the stress time series and does not have to be provided by the user.

• cutoff : This parameter determines for how many time steps the response is calculated. This reduces calculation times as it reduces the length of the array the stress is convolved with. The default value is 0.999, meaning that the response is cutoff after 99.9% of the effect of the stress impulse has occurred. A minimum of length of three times the simulation time step is applied.

The default parameter values for each of the response function are as follows:

[8]:
parameters
[8]:
initial pmin pmax vary name
Exponential_A 1 1e-05 100 True Exponential
Exponential_a 10 0.01 1000 True Exponential
Gamma_A 1 1e-05 100 True Gamma
Gamma_n 1 0.1 10 True Gamma
Gamma_a 10 0.01 1000 True Gamma
Hantush_A 1 0 100 True Hantush
Hantush_a 100 0.001 10000 True Hantush
Hantush_b 1 1e-06 25 True Hantush
Polder_A 1 0 2 True Polder
Polder_a 10 0.01 1000 True Polder
Polder_b 1 1e-06 25 True Polder
FourParam_A 1 0 100 True FourParam
FourParam_n 1 -10 10 True FourParam
FourParam_a 10 0.01 5000 True FourParam
FourParam_b 10 1e-06 25 True FourParam
DoubleExponential_A 1 0 100 True DoubleExponential
DoubleExponential_alpha 0.1 0.01 0.99 True DoubleExponential
DoubleExponential_a1 10 0.01 5000 True DoubleExponential
DoubleExponential_a2 10 0.01 5000 True DoubleExponential
Edelman_beta 1 0 1000 True Edelman

## 7.4. Comparison to classical analytical response functions¶

### 7.4.1. Polder step function compared to classic polder function¶

The classic polder function is (Eq. 123.32 in Bruggeman, 1999)

\begin{align}\begin{aligned} h(t) = \Delta h \text{P}\left(\frac{x}{2\lambda}, \sqrt{\frac{t}{cS}}\right)\\where P is the polder function.\end{aligned}\end{align}
[21]:
from scipy.special import erfc

def polder_classic(t, x, T, S, c):
X = x / (2 * np.sqrt(T * c))
Y = np.sqrt(t / (c * S))
rv = 0.5 * np.exp(2 * X) * erfc(X / Y + Y) + \
0.5 * np.exp(-2 * X) * erfc(X / Y - Y)
return rv

delh = 2
T = 20
c = 5000
S = 0.01
x = 400
x / np.sqrt(c * T)
t = np.arange(1, 121)
h_polder_classic = np.zeros(len(t))
for i in range(len(t)):
h_polder_classic[i] = delh * polder_classic(t[i], x=x, T=T, S=S, c=c)
#
A = delh
a = c * S
b = x ** 2 / (4 * T * c)
pd = polder.step([A, a, b], dt=1, cutoff=0.95)
#
plt.plot(t, h_polder_classic, label='Polder classic')
plt.plot(np.arange(1, len(pd) + 1), pd, label='Polder Pastas', linestyle="--")
plt.legend()
[21]:
<matplotlib.legend.Legend at 0x7fa6095148d0>

### 7.4.2. Hantush step function compared to classic Hantush function¶

The classic Hantush function is

\begin{align}\begin{aligned} h(r, t) = \frac{-Q}{4\pi T}\int_u ^\infty \exp\left(-y - \frac{r^2}{4 \lambda^2 y} \right) \frac{\text{d}y}{y}\\where\end{aligned}\end{align}
\begin{align}\begin{aligned} u=\frac{r^2 S}{4 T t}\\The parameters in Pastas are\end{aligned}\end{align}
$A = \frac{1}{4\pi T}$
$a = cS$
\begin{align}\begin{aligned} b = \frac{r^2}{4\lambda^2}\\where :math:\lambda^2=cT.\end{aligned}\end{align}
[23]:

def integrand_hantush(y, r, lab):
return np.exp(-y - r ** 2 / (4 * lab ** 2 * y)) / y

def hantush_classic(t=1, r=1, Q=1, T=100, S=1e-4, c=1000):
lab = np.sqrt(T * c)
u = r ** 2 * S / (4 * T * t)
F = quad(integrand_hantush, u, np.inf, args=(r, lab))[0]
return -Q / (4 * np.pi * T) * F

c = 1000 # d
S = 0.01 # -
T = 100 # m^2/d
r = 500 # m
Q = 20 # m^3/d
#
t = np.arange(1, 45)
h_hantush_classic = np.zeros(len(t))
for i in range(len(t)):
h_hantush_classic[i] = hantush_classic(t[i], r=r, Q=20, T=T, S=S, c=c)
#
a = c * S
b = r ** 2 / (4 * T * c)
ht = hantush.step([1, a, b], dt=1, cutoff=0.99) * (-Q / (2 * np.pi * T))
#
plt.plot(t, h_hantush_classic, label='Hantush classic')
plt.plot(np.arange(1, len(ht) + 1), ht, '--', label='Hantush Pastas')
plt.legend();
[ ]:


text:
acos

Returns the arccosine of a given angle for the nth repetition.
COPY/// acos(rad,n)
//
//  Returns the arccosine of a given angle for the nth repetition.
//
//      n           repetition, integer, real
//

format: plain


text:
This lesson is being piloted (Beta version)
If you teach this lesson, please tell the authors and provide feedback by opening an issue in the source repository

# Taxonomic Analysis with R

## Overview

Teaching: 40 min
Exercises: 20 min
Questions
• How can we know which taxa are in our samples?

• How can we compare depth-contrasting samples?

• How can we manipulate our data to deliver a message?

Objectives
• Manipulate data types inside your phyloseq object

• Extract specific information from taxonomic-assignation data

## Explore our samples at specific taxonomic levels

With the taxonomic assignment information that we obtained from Kraken we have measured diversity, and we have visualized the taxa inside each sample with Krona and Pavian, but Phyloseq allows us to make this visualization in a more flexible and personalized manner. So now we will take advantage of Phyloseq to make abundance plots of the taxa in our samples.

We will start our exploration at the Phylum level. In order to group all the OTUs that have the same taxonomy at a certain taxonomic rank, we will use the function tax_glom().

> percentages_glom <- tax_glom(percentages, taxrank = 'Phylum')
> View(percentages_glom@tax_table@.Data)

Figure 1. Taxonomic-data table after agglomeration at the phylum level.

Another phyloseq function is psmelt(), which melts phyloseq objects into a data.frame to manipulate them with packages like ggplot2 and vegan.

> percentages_df <- psmelt(percentages_glom)
> str(percentages_df)

'data.frame': 99 obs. of  5 variables:
$OTU : chr "1063" "1063" "1063" "2350" ...$ Sample   : chr  "JP4D" "JC1A" "JP41" "JP41" ...
$Abundance: num 85 73.5 58.7 23.8 19.1 ...$ Kingdom  : chr  "Bacteria" "Bacteria" "Bacteria" "Bacteria" ...
$Phylum : chr "Proteobacteria" "Proteobacteria" "Proteobacteria" "Bacteroidetes" ...  Now, let’s create another data frame with the original data. This will help us to compare the absolute with the relative abundance and have a more complete picture of our samples. > absolute_glom <- tax_glom(physeq = merged_metagenomes, taxrank = "Phylum") > absolute_df <- psmelt(absolute_glom) > str(absolute_df)  'data.frame': 99 obs. of 5 variables:$ OTU      : chr  "1063" "1063" "2350" "1063" ...
$Sample : chr "JP4D" "JP41" "JP41" "JC1A" ...$ Abundance: num  116538 41798 16964 12524 9227 ...
$Kingdom : chr "Bacteria" "Bacteria" "Bacteria" "Bacteria" ...$ Phylum   : chr  "Proteobacteria" "Proteobacteria" "Bacteroidetes" "Proteobacteria" ...

With these objects and what we have learned regarding R data structures and ggplot2, we can proceed to compare them with a plot. First, let’s take some steps that will allow us to personalize our plot making it accesible for color-blindness. We will create a color palette. With colorRampPalette we will choose 8 colors from the Dark2 palette and make a “ramp” with it, that is, convert those 8 colors to the number of colors needed to have one for each phylum in our data frame. For this we need to have our Phylum column in the factor structure.

> absolute_df$Phylum <- as.factor(absolute_df$Phylum)
> phylum_colors_abs<- colorRampPalette(brewer.pal(8,"Dark2")) (length(levels(absolute_df$Phylum)))  Now, let´s create the figure for the data with absolute abundances (i.e absolute_plot object) > absolute_plot <- ggplot(data= absolute_df, aes(x=Sample, y=Abundance, fill=Phylum))+ geom_bar(aes(), stat="identity", position="stack")+ scale_fill_manual(values = phylum_colors_abs)  With the position="stack" command, we are telling the ggplot function that the values must stack each other for each of the samples. In this way, we will have all of our different categories (OTUs) stacked in one bar and not each in a separate one. For more info position_stack Next, we will create the figure for the representation of the relative abundance data, and ask RStudio to show us both plots thanks to the | function from the library patchwork: > percentages_df$Phylum <- as.factor(percentages_df$Phylum) > phylum_colors_rel<- colorRampPalette(brewer.pal(8,"Dark2")) (length(levels(percentages_df$Phylum)))
> relative_plot <- ggplot(data=percentages_df, aes(x=Sample, y=Abundance, fill=Phylum))+
geom_bar(aes(), stat="identity", position="stack")+
scale_fill_manual(values = phylum_colors_rel)
> absolute_plot | relative_plot

Figure 2. Taxonomic diversity of absolute and relative abundance.

At once, we can denote the difference between the two plots and how processing the data can enhance the display of important results. However, it is noticeable that we have too many taxa to adequately distinguish the color of each one of them, less of the ones that hold the greatest abundance. In order to change that, we will use the power of data-frames and R. We will change the identification of the OTUs whose relative abundance is less than 0.2%:

> percentages_df$Phylum <- as.character(percentages_df$Phylum) # Return the Phylum column to be of type character
> percentages_df$Phylum[percentages_df$Abundance < 0.5] <- "Phyla < 0.5% abund."
> unique(percentages_df$Phylum)  [1] "Proteobacteria" "Bacteroidetes" "Actinobacteria" "Firmicutes" "Cyanobacteria" [6] "Planctomycetes" "Verrucomicrobia" "Phyla < 0.5 abund"  Let’s ask R to display the figures again by re-running our code: > percentages_df$Phylum <- as.factor(percentages_df$Phylum) > phylum_colors_rel<- colorRampPalette(brewer.pal(8,"Dark2")) (length(levels(percentages_df$Phylum)))
> relative_plot <- ggplot(data=percentages_df, aes(x=Sample, y=Abundance, fill=Phylum))+
geom_bar(aes(), stat="identity", position="stack")+
scale_fill_manual(values = phylum_colors_rel)
> absolute_plot | relative_plot

Figure 3. Taxonomic diversity of absolute and relative abundance with corrections.

## Going further, let’s take an interesting lineage and explore it thoroughly

As we have already reviewed, Phyloseq offers a lot of tools to manage and explore data. Let’s take a look deeply at a function that we already use, but now with guided exploration. The subset_taxa command is used to extract specific lineages from a stated taxonomic level, we have used it to get rid of the reads that do not belong to bacteria with merged_metagenomes <- subset_taxa(merged_metagenomes, Kingdom == "Bacteria").

We are going to use it now to extract a specific phylum from our data, and explore it at a lower taxonomic level: Genus. We will take as an example the phylum Cyanobacteria (certainly, this is a biased and arbitrary decision, but who does not feel attracted to these incredible microorganisms?):

> cyanos <- subset_taxa(merged_metagenomes, Phylum == "Cyanobacteria")
> unique(cyanos@tax_table@.Data[,2])

[1] "Cyanobacteria"

Let’s do a little review of all that we saw today: Transformation of the data; Manipulation of the information; and plotting:

> cyanos_percentages <- transform_sample_counts(cyanos, function(x) x*100 / sum(x) )
> cyanos_glom <- tax_glom(cyanos_percentages, taxrank = "Genus")
> cyanos_df <- psmelt(cyanos_glom)
> cyanos_df$Genus[cyanos_df$Abundance < 10] <- "Genera < 10.0 abund"
> cyanos_df$Genus <- as.factor(cyanos_df$Genus)
> genus_colors_cyanos<- colorRampPalette(brewer.pal(8,"Dark2")) (length(levels(cyanos_df$Genus))) > plot_cyanos <- ggplot(data=cyanos_df, aes(x=Sample, y=Abundance, fill=Genus))+ geom_bar(aes(), stat="identity", position="stack")+ scale_fill_manual(values = genus_colors_cyanos) > plot_cyanos  Figure 5. Diversity of Cyanobacteria at genus level inside our samples. ## Exercise 1: Taxa agglomeration With the following code, in the dataset with absolute abundances, group together the phyla that have small amount of reads, in order to have a better visualization of the data. Remember to check the data classes inside your data frame. According to the ColorBrewer package it is recommended not to have more than 9 different colors in a plot. What is the correct order to run the next chunks of code? Compare your graphs with your partners’. Hic Sunt Leones! (Here be Lions!): A) absolute_df$Phylum <- as.factor(absolute_df$Phylum) B) absolute_plot <- ggplot(data= absolute_df, aes(x=Sample, y=Abundance, fill=Phylum))+ geom_bar(aes(), stat="identity", position="stack")+ scale_fill_manual(values = phylum_colors_abs) C) absolute_$Phylum[absolute_$Abundance < 300] <- "Minoritary Phyla" D) phylum_colors_abs<- colorRampPalette(brewer.pal(8,"Dark2")) (length(levels(absolute_df$Phylum)))

E) absolute_df$Phylum <- as.character(absolute_df$Phylum)

## Solution

By grouping the samples that have less than 300 reads, we can get a more decent plot. Certainly, this will be difficult, since each of our samples has a contrasting number of reads.

E) absolute_df$Phylum <- as.character(absolute_df$Phylum)

C) absolute_df$Phylum[absolute_$Abundance < 300] <- "Minoritary Phyla"

A) absolute_df$Phylum <- as.factor(absolute_df$Phylum)

D) phylum_colors_abs<- colorRampPalette(brewer.pal(8,"Dark2")) (length(levels(absolute_df$Phylum))) B) absolute_plot <- ggplot(data= absolute_df, aes(x=Sample, y=Abundance, fill=Phylum))+ geom_bar(aes(), stat="identity", position="stack")+ scale_fill_manual(values = phylum_colors_abs) Show your plots: absolute_plot | relative_plot ## Exercise 2: Recap of abundance plotting Match the chunk of code with its description and put them in the correct order to create a relative abundace plot at the genus level of a particular phylum. がんばって! (ganbatte; good luck): Description Command Plot the relative abundance at the genus levels. plot_proteo Convert all the genera that have less than 3% of abundance into only one label. proteo_percentages <- transform_sample_counts(proteo, function(x) >x*100 / sum(x) ) Make just one row that groups all the observations of the same genus. proteo <- subset_taxa(merged_metagenomes, Phylum == "Proteobacteria") Create a phyloseq object only with the reads assigned to a certain phylum. unique(proteo@tax_table@.Data[,2]) Show the plot. proteo_glom <- tax_glom(proteo_percentages, taxrank = "Genus") Transform the phyloseq object to a data frame. plot_proteo <- ggplot(data=proteo_df, aes(x=Sample, y=Abundance, fill=Genus))+ geom_bar(aes(), stat="identity", position="stack")+ scale_fill_manual(values = genus_colors_proteo) Convert the Genus column into the factor structure. proteo_df$Genus[proteo_df$Abundance < 3] <- "Genera < 3% abund" Look at the phyla present in your phyloseq object. proteo_df <- psmelt(proteo_glom) Convert the abundance counts to relative abundance. genus_colors_proteo<- colorRampPalette(brewer.pal(8,"Dark2")) (length(levels(proteo_df$Genus)))
Make a palette with the appropriate colors for the amount of genera. proteo_df$Genus <- as.factor(proteo_df$Genus)

## Solution

# Create a phyloseq object only with the reads assigned to a certain phylum.
proteo <- subset_taxa(merged_metagenomes, Phylum == "Proteobacteria")
# Look at the phyla present in your phyloseq object
unique(proteo@tax_table@.Data[,2])
# Convert the abundance counts to relative abundance
proteo_percentages <- transform_sample_counts(proteo, function(x) x*100 / sum(x) )
# Make just one row that groups all the observations of the same genus.
proteo_glom <- tax_glom(proteo_percentages, taxrank = "Genus")
# Transform the phyloseq object to a data frame
proteo_df <- psmelt(proteo_glom)
# Convert all the genera that have less than 3% of abundance into only one label
proteo_df$Genus[proteo_df$Abundance < 3] <- "Genera < 3% abund"
# Convert the Genus column into the factor structure
proteo_df$Genus <- as.factor(proteo_df$Genus)
# Make a palette with the appropriate colors for the amount of genera
genus_colors_proteo<- colorRampPalette(brewer.pal(8,"Dark2")) (length(levels(proteo_df\$Genus)))
# Plot the relative abundance at the genus levels
plot_proteo <- ggplot(data=proteo_df, aes(x=Sample, y=Abundance, fill=Genus))+
geom_bar(aes(), stat="identity", position="stack")+
scale_fill_manual(values = genus_colors_proteo)
# Show the plot
plot_proteo

## Key Points

• Depths and abundances can be visualized using phyloseq

• The library phyloseq lets you manipulate metagenomic data in a taxonomic specific perspective.


text:
# Need align and equation to center with respect to nested items [duplicate]

I want my equation and align environments to center with respect to nested indents, but they only seem to center with respect to the full page width. Here is some example code:

\documentclass[12pt]{amsart}
\usepackage{geometry, amsthm}
\geometry{letterpaper, margin=1in}

\begin{document}

\begin{enumerate}
\item First level
\begin{enumerate}
\item Second Level
\begin{enumerate}
\item Third level\\
\begin{center}
$x<y$ % Centered inside nested items
\end{center}
\begin{equation*}
x < y % Centered in whole page
\end{equation*}
\end{enumerate}
\end{enumerate}
\end{enumerate}

\end{document}

This is the resulting document:

Placing the equation/align inside a center doesn't work. How do I get the align and equation environments to center with respect to nested indents?

• Welcome to TeX.SE! one way is to enclosed equation into minipage: \begin{minipage}{\linewidth} \begin{equation*} x < y \end{minipage} Sep 2 '19 at 17:30
• The centering of display equations on the full text width is a design decision applicable to all AMS document classes. If you are submitting a paper for publication by the AMS, you can expect a change to your requested style to be overruled. This is not to say that your preference is "bad", only that publishers do have a traditional style that they adhere to, and the document classes they provide support that style. Sep 2 '19 at 18:59
• Thank you for the comments. I was looking for a way to make parts of an assignment look more elegant, and will take caution when not adhering to AMS standards regarding submitted papers. Sep 2 '19 at 20:09
• Just add \renewcommand{\fullwidthdisplay}{} to your document preamble, see the answer to the question marked as duplicate. You should not use the proposed answers here, that have side effects. Sep 2 '19 at 22:05

You can redefine the equation environment so that it would automatically adjust to the current \linewidth (thanks to @Zarko's comment) using the etoolbox package.

\documentclass[12pt]{amsart}
\usepackage{geometry, amsthm}
\geometry{letterpaper, margin=1in}
\usepackage{etoolbox}
\BeforeBeginEnvironment{equation*}{\begin{minipage}{\linewidth}}
\AfterEndEnvironment{equation*}{\end{minipage}}

\begin{document}
Not in an environment:
\begin{center}
$x<y$
\end{center}
\begin{equation*}
x < y
\end{equation*}

\begin{enumerate}
\item First level
\begin{center}
$x<y$
\end{center}
\begin{equation*}
x < y
\end{equation*}
\begin{enumerate}
\item Second Level
\begin{center}
$x<y$
\end{center}
\begin{equation*}
x < y
\end{equation*}
\begin{enumerate}
\item Third level
\begin{center}
$x<y$
\end{center}
\begin{equation*}
x < y
\end{equation*}
\end{enumerate}
\end{enumerate}
\end{enumerate}
\end{document}

• Very nice. I need to study environments but this solution is elegant in that you only need to make one change. Sep 2 '19 at 18:53

Displayed equation(s) always consider text width, meanwhile \begin{center} ... \end{center} width of environment, where it is. Similar feature for displayed equation you can obtain with enclosing it in minipage with width of environment, where it is. This is done with using \linewidth for width of minipage.

Edit: Use of minipage for equation may lead to some unexpected problems. See edited code:

\documentclass[12pt]{amsart}
\usepackage{geometry}
\usepackage{amsmath}
\usepackage{xcolor}

\begin{document}

\begin{enumerate}
\item First level
\begin{enumerate}
\item Second Level
\begin{enumerate}
\item Third level
\begin{center}
$x<y$ % Centered inside nested items
\end{center}
\begin{minipage}{\linewidth}\color{red}
\begin{equation*}
x < y % Centered in whole page
\end{equation*}
\end{minipage}

However, writing text immediately after equation in minipage and reducing width of the equation can lead to some unexpected problems, specially when equations are longer and numbered. For example:

\begin{minipage}{\linewidth}\color{red}
\begin{align}
\sin(x_{\mathrm{deg}})
& = \frac{\pi}{180} x - \Bigl(\frac{\pi}{180}\Bigr)^{3}
\frac{x^{3}}{3!}  + \Bigl(\frac{\pi}{180}\Bigr)^{5}
\frac{x^{5}}{5!}  - \Bigl(\frac{\pi}{180}\Bigr)^{7}
\frac{x^{7}}{7!} + \cdots .
\end{align}
\end{minipage}
\end{enumerate}
\end{enumerate}
\end{enumerate}
\end{document}

(red lines indicate text area margins)

Note:

• this solution works only, if the whole equation(s) (in any math environments provided by amsmath or similar packages) has enough space on page. This is important since minipage cannot be breaking between pages and consequently it can introduce unwanted white space in your list.
• from image of edited example is clearly seen problems with vertical spaces around equation
• you also need to car, that minipage always start in new line of text (as it is done im edited MWE).
• Thank you, this is perfect. The context on minipage is also appreciated. Sep 2 '19 at 18:25
• @AdamMair, see edited answer. This solution has some serious limitations. I would rather stick with standard way of writing of equations. Sep 2 '19 at 18:45


text:
# Homework Help: Angular momentum quantum number and angle

1. Mar 15, 2010

### leviathanX777

1. The problem statement, all variables and given/known data
What are the possible values for the magnetic quantum number ml for an electron whose orbital quantum number is l = 4? What are the allowed values of the angles between L and the zaxis in this case?

2. Relevant equations

3. The attempt at a solution

Is Ml equal to four for the first part? Because the angular momentum quantum number is equal to four?

I have no idea for the second part. I don't have the gradient of the magnetic field of the z-component and don't have any distance or velocity values.
1. The problem statement, all variables and given/known data

2. Relevant equations

3. The attempt at a solution

2. Mar 15, 2010

### gabbagabbahey

How exactly is this equation relevant? The problem is in regard to an electron orbiting a nucleus, not an electron moving through an inhomogeneous magnetic field as in the Stern-Gerlach experiment.

Open your textbook up and read the section on hydrogen like atoms and angular momentum. The allowed values of $m_l$ for any given value of $l$ will be clearly stated in your text.

If $\theta$ is the angle between $\mathbf{L}$ and the z-axis, then $L_z\equiv \mathbf{L}\cdot \textbf{k}=|\mathbf{L}|\cos\theta[/tex]. So, in terms of operators, you would expect $$\hat{L_z}^2=\hat{L}^2\cos^2\hat{\theta}$$ Where the hat is to denote that we are talking about operators here. (i.e. $$\hat{\theta}$$ is an operator whose value upon measurement corresponds to the angle between $\mathbf{L}$ and the z-axis) What are the allowed values when you measure [tex]\hat{L_z}^2$ for an electron in the state $l=4$?

Last edited: Mar 15, 2010


text:
# Conformal mapping, Hamiltonian methods and integrability of surface dynamics

Presented by:
Pavel Lushnikov
Date:
Tuesday 1st October 2019 - 14:00 to 15:00
Venue:
INI Seminar Room 2
Abstract:
A Hamiltonian formulation of the time dependent potential flow of ideal
incompressible fluid with a free surface is considered in two dimensional
(2D) geometry. It is well known that the dynamics of small to moderate
amplitudes of surface perturbations can be reformulated in terms of the
canonical Hamiltonian structure for the surface elevation and Dirichlet
boundary condition of the velocity potential. Arbitrary large
perturbations can be efficiently characterized through a time-dependent
conformal mapping of a fluid domain into the lower complex half-plane. We
reformulate the exact Eulerian dynamics through a non-canonical nonlocal
Hamiltonian system for the pair of new conformal variables. The
corresponding non-canonical Poisson bracket is non-degenerate, i.e. it
does not have any Casimir invariant. Any two functionals of the conformal
mapping commute with respect to the Poisson bracket. We also consider a
generalized hydrodynamics for two components of superfluid Helium which
has the same non-canonical Hamiltonian structure. In both cases the fluid
dynamics is fully characterized by the complex singularities in the upper
complex half-plane of the conformal map and the complex velocity.
Analytical continuation through the branch cuts generically results in the
Riemann surface with infinite number of sheets. An infinite family of
solutions with moving poles are found on the Riemann surface. Residues of
poles are the constants of motion. These constants commute with each other
in the sense of underlying non-canonical Hamiltonian dynamics which
provides an argument in support of the conjecture of complete Hamiltonian
integrability of surface dynamics.
The video for this talk should appear here if JavaScript is enabled.
If it doesn't, something may have gone wrong with our embedded player.
We'll get it fixed as soon as possible.


text:
⚠Our tutors found the solution shown to be helpful for the problem you're searching for. We don't have the exact solution yet.

# Solution: Vector A⃗ vec{A} has components Ax = 1.45 cm, Ay = 2.20 cm; vector B⃗ vec{B}has components Bx= 4.00 cm, By= -3.60 cm.Find the x-component of the vector sum A⃗ + B⃗.Find the y-component of the vector sum A⃗ + B⃗.Find the magnitude of A⃗ + B⃗.Find the direction of  A⃗ + B⃗. (Let the direction be the angle that the vector makes with the +x-axis, measured counterclockwise from that axis.)Find the x-component of the vector difference A⃗ − B⃗.Find the y-component of the vector difference A⃗ − B⃗.Find the magnitude of A⃗ − B⃗.Find the direction of A⃗ − B⃗.

###### Problem

Vector A⃗ has components A= 1.45 cm, Ay = 2.20 cm; vector B⃗ has components Bx= 4.00 cm, By= -3.60 cm.

Find the x-component of the vector sum A⃗ + B⃗.

Find the y-component of the vector sum A⃗ + B⃗.

Find the magnitude of A⃗ + B⃗.

Find the direction of  A⃗ + B⃗. (Let the direction be the angle that the vector makes with the +x-axis, measured counterclockwise from that axis.)

Find the x-component of the vector difference A⃗B⃗.

Find the y-component of the vector difference A⃗B⃗.

Find the magnitude of A⃗B⃗.

Find the direction of A⃗B⃗.


text:
Nikt nie może uniknąć zakochania. Stieg Larsson

## Wartości funkcji trygonometrycznych wybranych kątów

W tabli poniżej przedstawiono wartości funkcji trygonometrycznych wybranych kątów przedstawionych w radianach i stopniach.

 $$\alpha$$ $$\text{sin} \: \alpha$$ $$\text{cos} \: \alpha$$ $$\text{tg} \: \alpha$$ $$\text{ctg} \: \alpha$$ $$\text{radiany}$$ $$\text{stopnie}$$ $$0$$ $$0$$ $$0$$ $$1$$ $$0$$ $$-$$ $$\dfrac{\pi}{12}$$ $$15$$ $$\dfrac{\sqrt{6} - \sqrt{2}}{4}$$ $$\dfrac{\sqrt{6} + \sqrt{2}}{4}$$ $$2 - \sqrt{3}$$ $$2 + \sqrt{3}$$ $$\dfrac{\pi}{10}$$ $$18$$ $$\dfrac{\sqrt{5} - 1}{4}$$ $$\dfrac{\sqrt{10 + 2 \sqrt{5}}}{4}$$ $$\dfrac{\sqrt{25 - 10 \sqrt{5}}}{5}$$ $$\sqrt{5 + 2 \sqrt{5}}$$ $$\dfrac{\pi}{8}$$ $$22 \dfrac{1}{2}$$ $$\dfrac{\sqrt{2 - \sqrt{2}}}{2}$$ $$\dfrac{\sqrt{2 - \sqrt{2}}}{2}$$ $$\sqrt{2} -1$$ $$\sqrt{2} + 1$$ $$\dfrac{\pi}{6}$$ $$30$$ $$\dfrac{1}{2}$$ $$\dfrac{\sqrt{3}}{2}$$ $$\dfrac{\sqrt{3}}{3}$$ $$\sqrt{3}$$ $$\dfrac{\pi}{4}$$ $$45$$ $$\dfrac{\sqrt{2}}{2}$$ $$\dfrac{\sqrt{2}}{2}$$ $$1$$ $$1$$ $$\dfrac{\pi}{3}$$ $$60$$ $$\dfrac{\sqrt{3}}{2}$$ $$\dfrac{1}{2}$$ $$\sqrt{3}$$ $$\dfrac{\sqrt{3}}{3}$$ $$\dfrac{5}{12} \pi$$ $$75$$ $$\dfrac{\sqrt{6} + \sqrt{2}}{4}$$ $$\dfrac{\sqrt{6} - \sqrt{2}}{4}$$ $$2 + \sqrt{3}$$ $$2 - \sqrt{3}$$ $$\dfrac{\pi}{2}$$ $$90$$ $$1$$ $$0$$ $$-$$ $$0$$ $$\pi$$ $$180$$ $$0$$ $$-1$$ $$0$$ $$-$$ $$\dfrac{3}{2} \pi$$ $$270$$ $$-1$$ $$0$$ $$-$$ $$0$$ $$2 \pi$$ $$360$$ $$0$$ $$1$$ $$0$$ $$-$$
$$\dfrac{\sqrt{2 - \sqrt{2}}}{2}$$

Potrzebujesz pomocy? Przejrzyj ogłoszenia korepetytorów z matematyki na http://e-korepetycje.net/


text:
CHIP: Multiple OP_RETURNs for Bitcoin Cash

# CHIP: Multiple OP_RETURNs for Bitcoin Cash

This CHIP was included in HF-20210515.

    Title: Multiple OP_RETURNs for Bitcoin Cash
First Submission Date: 2021-03-12
Owner: Benjamin Scherrey @proteusguy on Telegram
Authors: Benjamin Scherrey
Earlier concept - Jonathan Silverblood
Technical spec - BigBlockIfTrue
Type: Technical
Is consensus change: No
Status: FINAL
Last Edit Date: 2021-05-17

## Discussions

CHIP Discussion at Bitcoincashresearch.org

Issues/PRs for this CHIP

Our team is available for chat on the ActorForth gitter.

## Summary

We propose to make presence of multiple OP_RETURN outputs qualify as standard transactions subject to the existing 223 byte limit for OP_RETURNs across all outputs of the transaction. We are silent in this proposal as to whether or not the 223 byte limit is the correct one for BCH but are content to leave that alone in order to improve the chances of getting consensus for this change for the May 2021 fork. This makes the impact on nodes and miners as minimal and risk-free as possible while allowing developers to use OP_RETURN in a manner that justifies its core benefit - experimentation of new features/protocol updates without breaking existing systems or stressing the block chain with extraneous UTXOs which is an undesirable alternative option should this improvement not be accepted.

## Motivation and Benefits

Quite early in Bitcoin history, attempts to inject miscellaneous data into the block chain were made that made correct parsing and identification of transactions more difficult but, most importantly, bloated the UTXOs with superfluous data that potentially had a very real negative impact on operators of nodes, miners, and wallet users. The introduction of OP_RETURN with a restricted size limit that was deemed unspendable by the protocol was the compromise that protected everyone’s interests. Allowing this data to be inserted but then also ignored by all who didn’t care about it gave BCH developers an excellent tool in which to try out development ideas and protocol improvements in an isolated manner without introducing backwards or forward incompatibilities. Perhaps more importantly, it gave the entire BCH community an experimental model that allowed a natural maturity for protocol proposals to mature informed by actual use on the block chain rather than depend entirely on theoretical opinions on how such a protocol change might impact the BCH chain. SLP is an excellent example of such a circumstance where, after considerable efforts and real-life trials have been made, has resulted in serious proposals such as OP_GROUP to be able to be realistically considered for incorporation into the core protocol with significantly less risk than would otherwise have been possible.

The primary limitation of OP_RETURN is that the protocol standard only allows for one instance of an OP_RETURN output per transaction which means developers who want to build on top of other OP_RETURN utilizing capabilities must either create complex parsing scripts or divide their efforts across multiple transactions. Both of these options introduce incredible complexity and often are simply not viable for demonstrating a real-world use case for how the feature would behave on the BCH chain should it be incorporated into the core protocol.

This proposal aims to correct this minor oversight in order to bring the full potential of OP_RETURN’s experimental expressiveness to the BCH chain without incurring any additional trade-offs that were part of its original design.

The benefits of this proposal also reach users and businesses in drastically reducing foodprint when dealing with several OP_RETURN for their given use cases. Users will be able to use OP_RETURN space more efficiently, pack information in fewer transactions, use less space in mined blocks and save fees while mempool will see fewer congestions –for this specific cause.

## Specification

The only technical elements we’ve identified are changes to the existing node systems to remove the limit of a single OP_RETURN and to enforce the existing size limit for OP_RETURN based outputs across all aggregate OP_RETURN outputs in the transaction.

Formally, we set the rules as follows:

• An OP_RETURN output is an output with a locking script consisting of the OP_RETURN opcode followed by zero or more data pushes.
• A transaction is non-standard if the total byte size of the locking scripts of all OP_RETURN outputs is greater than 223.
• While the BIP113 median time is less than 1621080000 (2021-05-15T12:00:00Z), a transaction is also non-standard if the number of OP_RETURN outputs is greater than one.

Some remarks:

• The size of the locking script is not just the raw data size, but includes the OP_RETURN opcode and the data push opcodes. In case of a single OP_RETURN output, only up to 220 bytes of data can be stored, because you need 1 byte for the OP_RETURN opcode, 1 byte for the OP_PUSHDATA1 opcode, and 1 byte for the length of the data. More bytes are lost if there is more than one data push operation, e.g. when the 4-byte prefix guideline is followed.
• In case of a single OP_RETURN output, the rules are identical to the status quo.
• In the extreme case, the rules imply a maximum of 223 OP_RETURN outputs, because the locking script of every OP_RETURN output is at least one byte (the OP_RETURN opcode itself).

## Current Implementations

Both implementations introduce "oversize-op-return" as a new standardness error code, besides the existing "multi-op-return" error which becomes obsolete after multiple OP_RETURN outputs are allowed. In both implementations, the number 223 used in the rules can be overridden with the -datacarriersize=<n> command-line option.

## Implementation Costs and Risks

Evaluating the changes required across the popular nodes demonstrates that the impact in terms of lines of code affected are minor and isolated. For Bitcoin Unlimited there’s an existing check that only one OP_RETURN exists which can be removed. A mechanism for counting the aggregate size of all the OP_RETURNs is quite simple to introduce in the same source file. Unit tests would be approximately twice the implementation size which we find typical of well designed C++ code.

APIs that want to support multiple OP_RETURN are also easy to modify.

## Ongoing Costs and Risks

After the initial changes are made to the core node systems no ongoing costs are anticipated. Risks are restricted to other non-standard experimental development code that may depend/demand that there only be a single OP_RETURN but, unless the code serves some purpose such as a linter or tx compliance tool, it’s unlikely that such code was appropriate in the first place.

Presently the SLP specification requires its OP_RETURN to be at vout[0]. Any protocol code seeking to co-exist with SLP would want to ensure that it be in a later output to appear in the transaction in order to prevent accidental conflicts. We recommend that OP_RETURN based protocols no longer specify a positional requirement for their data but, instead, establish another mechanism for identifying which OP_RETURN belongs to them.

Now that the limit of a single OP_RETURN has been removed, future well behaved development utilizing OP_RETURN would no longer be designed with such a presumption in mind.

### Design & Implementation Process Timeline

2020-09-21 Initial comment on bitcoincashresearch.org.

2020-10-14 Trial implementation of proposal on Bitcoin Unlimited node. (note: this doesn’t implement aggregate size limit)

2020-10-?? Trial modifications to a test fork of the Javascript bch-js API and the python Bitcash API libraries (currently in a private repo) completed.

2021-03-21 This CHIP created.

2021-03-24 Proposed completion for PRs to public Bitcoin Unlimited, Bitcoin Cash Node, bch-js API, and Bitcash API projects to support this CHIP. Basically T+9 days after proposal is approved.

2021-03-13 Flowee PR, 2 support implemented by Tom Zander.

2021-03-14 BCHN PR support implemented by BigBlockIfTrue.

2021-03-25 Bitcoin Unlimited PR support implemented by Nicolai Skye.

2021-05-15 Deployment to BCH Mainnet Chain

## Evaluation of Alternatives

Alternatives to this proposal amount to restating original alternatives to OP_RETURN (such as the multi-sig data hack), introducing complex parsing requirements to OP_RETURN outputs, or dividing OP_RETURN dependent submissions across multiple transactions. All are more complex and risky than this proposal.

Jonathan Silverblood identified 3 other alternative proposals considered in 2020, BUIP149: Delimited OP_RETURNs, BUIP139, and BUIP140.

BUIP149 puts multiple OP_RETURNs in a single output and requires complex parsing scripts and potentially could collide with existing protocols using OP_RETURNs already including SLP. It also proposes to change the maximum size of OP_RETURN data in a transaction. Community efforts to incorporate this option are significantly higher than this CHIP.

BUIP139 is actually quite similar to this CHIP except it proposes that there be some fixed limit to the number of OP_RETURNs. One reason why BUIP139 should be considered inferior is because it makes it more difficult to change the op_return max bytes in the future, as it would magnify the impact, for example:

If BUIP139 took place, and was set to 4 op_returns / transaction, then if we want to change the byte size it now has to be an even number of 4. If we naively increase by 10 bytes, then a total of 40 more bytes can be used, rather than the 10 byte intended.

BUIP140 is similar to this CHIP but was just not taken forward. Major difference is that it debates or introduces the explicit possibility of increasing the total size of OP_RETURN data but does not require it.

Without the aggregate size consideration, the future impact of changing the legal sizes of OP_RETURN becomes more profound and possibly difficult to predict but saves tx creators from having to track a total across all OP_RETURNs. The opinion of the author is that the days of being able to consider parts of transactions independent of others are long gone so this is not a meaningful shortcoming. Size reductions would be profound and dangerous changes and are unlikely to be practical to deploy. Size increases should be based on empirical demonstrations of value through experimental apps that push these limits while demonstrating real value to the BCH ecosystem. Regardless of the ultimate size, having that quantity come from a shared pool helps allow OP_RETURN based protocols to be expressed naturally in a manner more closely resembling what their ultimate core protocol implementations would look like rather than having to perform hacks to fit within a per-OP_RETURN limit that would necessarily be smaller. Again these are future considerations outside of the direct scope of this CHIP.

## Statements

### Full node developers

from Tom Zander, owner Flowee

This change will have little to no cost on our ecosystem while enabling more usecases to be added over time, to be developed without touching consensus rules in the traditional permissionless manner. I fully support this proposal and have code ready to ship for this.

This is a simple and logical change that provides more flexibility for OP_RETURN users without affecting the trade-offs associated with the limit. The proposal has been implemented in a BCHN change request and a majority of BCHN maintainers supports activating this change on 15 May 2021.

While this CHIP arrived at a fairly late moment, we believe that sufficient awareness has been raised such that it can nevertheless be activated in May provided all major full node clients can implement it by then.

from Benjaim Scherrey

My company, Biggest Fan Productions, has developed a protocol that utilizes SLP NFTs & FTs to perform on-chain tracked open call auctions for assets such as concert tickets. To fully be able to represent the state of the auction in a trustless manner it requires an additional OP_RETURN to be allowed in BCH transactions. This is notice of my support and personal interest in this CHIP.

### Miners and pools

I have sought out contacts for such organizations and have received no responses. Appreciate any follow up on contacting these entities.

### Wallets and clients

I have sought out contacts for such organizations and have received few responses. Appreciate any follow up on contacting these entities.

An ElectronCash SLP wallet dev had no strong opinion on this CHIP (or the CHIP process) and registered no objection when asked.

### Application Developers

from Jonathan Silverblood:

I believe multiple OP_RETURNs should be adopted, it is highly valuable as it makes it possible for OP_RETURN based protocols to work together to create value. I also believe that counting the aggregate number of bytes is in line with the intent of the original functionality.

from Joey Masterpig

I would like to add my support to this proposal as a Stakeholder. Founder of the upcoming SLP NFT game enter-the-sphere.com . Co-Founder of Spice Token, and a Director of the SLP Foundation.

I believe having multiple_opreturns will add some interesting possibilities for NFTs for Enter The Sphere, our token solution needs to be as competitive as possible, and anything that expands the chance of something innovative being done on SLP, is something I support.

As I understand, implementation of this change will allow multiple assets to be on a single tx, something that can be very useful for pairing NFTs with other assets. A function that allows us to link NFT items with other assets easier than current.

This is my personal opinion and support as a non-technical stakeholder, this is not a technical endorsement nor have i reviewed deeply about whether these changes have cons on a technical basis (as far as I understand there is none).

Stoyan Zhekov, bch-js developer

I think Multiple OP_RETURN CHIP will provide a way for better NFTs - both NFT (SLP) payload and BCP payload can be parts of one transaction, which will reduce the number of queries to retrieve the external content.

### Users

from Leandro Di Marco

I see this initiative with great value for users, who will engage with the OP_RETURN resource more efficiently. And while such optimization would seem samll at the moment, it will surely become more relevant as Bitcoin Cash grows in adoption.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS”
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


text:
## Integrate

$$\int\frac{x^2}{(15+6x-9x^2)^\frac{3}{2}}\mathrm{d}x\hspace{2mm}=\hspace{2mm}\int\frac{x^2}{\left(16-9(x-\frac{1}{3})^{2}\right)^{\frac{3}{2}}}\mathrm{d}x$$

$$\operatorname{Let}\hspace{2mm} u = x-\frac{1}{3}$$

$$= \int\frac{(u+\frac{1}{3})^{2}}{(16-9u^{2})^{\frac{3}{2}}}\mathrm{d}u$$

$$\operatorname{Let}\hspace{2mm} u = \frac{4}{3}\sin\theta,\hspace{2mm}\mathrm{d}u = \frac{4}{3}\cos\theta\mathrm{d}\theta$$

$$= \int\frac{(\frac{4}{3}\sin\theta+\frac{1}{3})^{2}}{(16-16\sin^{2}\theta)^{\frac{3}{2}}}\cdot\frac{4}{3}\cos\theta\mathrm{d}\theta\hspace{2mm}=\hspace{2mm}\frac{4}{27\cdot64}\int\frac{(4\sin\theta+1)^{2}}{\cos^{3}\theta}\cos\theta\mathrm{d}\theta$$

After expanding the numerator and simplifying, we have

$$\frac{1}{432}\int(16\tan^{2}\theta+8\sec\theta\tan\theta+\sec^{2}\theta)\mathrm{d}\theta$$

Using the proper Pythagorean Identity, putting in terms of secant and tangent,

$$= \frac{1}{432}\int(17\sec^{2}\theta+8\sec\theta\tan\theta-16)\mathrm{d}\theta$$

$$= \frac{17}{432}\tan\theta+\frac{1}{54}\sec\theta-\frac{1}{27}\theta+C$$

$$= \frac{17}{432}\cdot\frac{3u}{\sqrt{16-9u^{2}}}+\frac{1}{54}\cdot\frac{4}{\sqrt{16-9u^{2}}}-\frac{1}{27}\sin^{-1}\left(\frac{3u}{4}\right)+C$$

$$= \frac{17}{432}\cdot\frac{3(x-\frac{1}{3})}{\sqrt{16-9(x-\frac{1}{3}^{2})}}+\frac{1}{54}\cdot\frac{4}{\sqrt{16-9(x-\frac{1}{3}^{2})}}-\frac{1}{27}\sin^{-1}\left(\frac{3(x-\frac{1}{3})}{4}\right)+C$$

$$= \frac{17}{432}\cdot\frac{3x-1}{\sqrt{15+6x-9x^{2}}}+\frac{1}{54}\cdot\frac{4}{\sqrt{15+6x-9x^{2}}}-\frac{1}{27}\sin^{-1}\left(\frac{3x-1}{4}\right)+C$$


text:
# The eroaldl Alar wavefunction of hyctegen atom TQ" Wncrc ra; ) 4,-5} pm (the' Bohr radius Cakculate the probability that

###### Question:

The eroaldl Alar wavefunction of hyctegen atom TQ" Wncrc ra; ) 4,-5} pm (the' Bohr radius Cakculate the probability that the electron be found somewhere within Sma Pphere of rAds | ( pII centered the nuclus Now suppose that the same sphere locatedat r-& What 15 the prohability that the electron is inside 1t?

#### Similar Solved Questions

##### Writing a Mechanism for Starch Phosphorylase Write a reasonable chemical mechanism for the starch phosphorylase reaction (Figure 7.22 )
Writing a Mechanism for Starch Phosphorylase Write a reasonable chemical mechanism for the starch phosphorylase reaction (Figure 7.22 )...
##### Short Answer: Answer 2 out of the 5 pts eachWhat are the different stages of the cell cycle; in order? What occurs each stage? Draw cell with chromosome number of 2n-4 at the start of meiosisDraw the same cell as it would appear at the end of meiosis ! (2 pts) Draw the same cell as it would appear at the end of meiosis pts)For the following sequence of DNA, determine thecomplementary DNA sequence (1 pt); the mRNA sequence that would be transcribed from this gene (2 pts) and the subsequent protei
Short Answer: Answer 2 out of the 5 pts each What are the different stages of the cell cycle; in order? What occurs each stage? Draw cell with chromosome number of 2n-4 at the start of meiosis Draw the same cell as it would appear at the end of meiosis ! (2 pts) Draw the same cell as it would appear...
##### An object is imaged on to a photographic sensor using a thin positive lens. The distance...
An object is imaged on to a photographic sensor using a thin positive lens. The distance between the object and its image is 18 cm, such that the image size is half the size of the object. (a) Determine the distance between the lens and the image on the photographic sensor. (b) A glass plate having ...
##### Two equal charges are situated on the x axis at 40.0 cm on either side of...
Two equal charges are situated on the x axis at 40.0 cm on either side of the origin as shown in the figure below. Location A is on the perpendicular bisector at a distance of 26.0 cm from the origin on the y axis. (Assume that the +x axis is directed to the right and the +y axis is directed up.) (a...
##### 5.30 * 105 + 1.34 X 1083.27 XI1O +5.330 X 105| 3.28 *"10'6.05 X 106 5.30 X 105 (1.34 x 103
5.30 * 105 + 1.34 X 108 3.27 XI1O +5.330 X 105| 3.28 *"10' 6.05 X 106 5.30 X 105 (1.34 x 103...
Question Determine the equation of the parabola whose graph is given below: 4 5 6 Sorry, that'$incorrect. Try again? f() Basic B... 1 answer ##### Game Theory Eco 405 Homework 2 Due February 20, 2020 1. Find all the Nash equilibria... Game Theory Eco 405 Homework 2 Due February 20, 2020 1. Find all the Nash equilibria you can of the following game. LCDR T 0,1 4,2 1,1 3,1 M 3,3 0,6 1,2 -1,1 B 2.5 1.7 3.8 0.0 2. This question refers to a second-price, simultaneous bid auction with n > 1 bidders. Assume that the bidders' valu... 5 answers ##### Determine the constants (denoted by capital letters) so that each equation is an identity. For Exercises 1– 6, do each problem in two ways: (a) use the equating-the-coefficients theorem, as in Example 1; and (b) use the convenient-values method that was explained after Example 1. For the remainder of the exercises, use either method (or a combination).$rac{8 x+3}{(x+3)^{2}}= rac{A}{x+3}+ rac{B}{(x+3)^{2}}$ Determine the constants (denoted by capital letters) so that each equation is an identity. For Exercises 1– 6, do each problem in two ways: (a) use the equating-the-coefficients theorem, as in Example 1; and (b) use the convenient-values method that was explained after Example 1. For the remainder... 5 answers ##### At 400 Â°C, a 5.00-L vessel contained an equilibrium mixture with[H2]=[I2]=0.00221 M and [HI]= 0.01562 M. A valveis opened, and 0.0100 mol of HI(g) was added. Find the newequilibrium concentrations of the three gases. At 400 Â°C, a 5.00-L vessel contained an equilibrium mixture with [H2]=[I2]=0.00221 M and [HI]= 0.01562 M. A valve is opened, and 0.0100 mol of HI(g) was added. Find the new equilibrium concentrations of the three gases.... 5 answers ##### 3. Let X1, A > 0Xn be i.i.d_ random variables with the density function with parameter1<2 < el/A_ f(r;A) = 3 & elsewhereWrite down the log-likelihood function lik(A). Graph it_ Find the maximum likelihood estimate of A 3. Let X1, A > 0 Xn be i.i.d_ random variables with the density function with parameter 1<2 < el/A_ f(r;A) = 3 & elsewhere Write down the log-likelihood function lik(A). Graph it_ Find the maximum likelihood estimate of A... 5 answers ##### 9. Use Table 8.1 to find the level of confidence (as percent) that would accompany each of the following confidence intervalsa) sample proportion  1.0 standard ertorb) sample proportion + 1.28 standard errorssample proportion  0.52 standard errorssample proportion + 2.05 standard errorssample proportion$ 1.75 standard errors
9. Use Table 8.1 to find the level of confidence (as percent) that would accompany each of the following confidence intervals a) sample proportion  1.0 standard ertor b) sample proportion + 1.28 standard errors sample proportion  0.52 standard errors sample proportion + 2.05 standard errors sample...
##### Full configuration Condensed configuration Ion configurationFor 4 elements of your choice but not Na
Full configuration Condensed configuration Ion configuration For 4 elements of your choice but not Na...
##### 2. Lactic acid is an important pharmaceutical product that is manufactured by the fermentation of glucose:...
2. Lactic acid is an important pharmaceutical product that is manufactured by the fermentation of glucose: C6H1206 → CsHO Lactic acid has a melting point of 17°C so one way to separate it from the water and unreacted glucose that makes up part of the biomass is to drop the temperature below...
##### For the following figures, determine the one(s) to which Grcen's Theorem can be applied , If the theorem can be applied , describe how. If it cannot, describe what would have to be done instead to evaluate line integral around the region Or to find the area of the region. If the curve; C , must be sub-divided, be sure to label each part and note direction_R 2i:iii(v8722
For the following figures, determine the one(s) to which Grcen's Theorem can be applied , If the theorem can be applied , describe how. If it cannot, describe what would have to be done instead to evaluate line integral around the region Or to find the area of the region. If the curve; C , must...


text:
Programming

In this major section I will be mostly talking about programming basics, programming for games and some engine or tools programming.

C++

Most games are written in C++ and in this section you will find a lot about writing your own projects in C++ from the project structure and dependency management to using ready made engines or building your custom engine.

ANSI C

ANSI C is mostly used for building libraries and system programming but you can easily write games in C too. Most low level libraries are written in C and there are some easy ones like raylib that you can use to create games. It is a lot simpler than C++ and you can start from here.

CMake

I have a lot of tutorials on CMake for managing your builds. It can be used with both C and C++ so it has its own section.

Notations

Before we begin with the more complex stuff I want to note on the different coloring sections that you may notice along the way in this section.

Notes

Notes are distinguishable by the thick orange line on the left of the note.

This is a quote. I would mainly use it to cite something, to make a side note, to mark next good reads, etc.

Note: Comments will use this style too

Code

Code will be distinguishable by a thick blue line on the left and a gray background. The font used inside of the code block is also monospace to keep things nice and clean.

#include <iostream>

int main() {
// This is a code block
// It will contain code examples that are easy to copy
// It also has syntax highlighting
return 0;
}

Notes and comments can also contain code inside. You will also notice that the font I use uses programming ligatures which would affect how some combination of characters are shown like the double == and arrows ->, =>

An example of ligatures would be double equals which produces a longer equal == (compared to =) and the arrows ->, => ...

Mathematics

Math formulas will have a thick black line on the left and a gray background. It can also be distinguished by the styling of the formulas inside.

$z = \overbrace{ \underbrace{x}_\text{real} + i \underbrace{y}_\text{imaginary} }^\text{complex number}$

Other preformated content

Other special content will be marked with a block that has a thick brown line on the left and a gray background. These will usually be folder structures.

This is an example of another preformated content.

Other content

You will notice that on certain posts and pages that I link to websites where you can compile, edit and run my examples. These example are currently run through the repl.it site and will look like this:

You will notice that repl is split into two main parts: source code (top) and terminal (bottom). When you click the green play button above the source code in the center the code will be compiled and played in the terminal bellow where you can see the result. When applicable you can use the “Files” icon on the left to see other files in the example repl. You can edit the repl as much as you want it will clone it for you and you can use it to test some changes or even delete everything and create a game engine 😉


text:
# How to calculate Projected Airthmetic Mean

1. Jun 25, 2007

### omaralvi

Hello guys,

I have got loads of orientation matices and i want to take there mean. The thing is that i have found this paper "Mean and averaging in the group of rotations" by Maher Moakher. It specifies how one can do that but i am not able to understand the steps. I would appreciate if some one can help. The link of the paper is
http://citeseer.ist.psu.edu/cache/pa...her02means.pdf
and thing that i am mentioning is on page 11 Projected arithemtic mean.

It says that projected airthmetic mean of the given matrices is given by the polar factor of the polar decomposition of their sum. But the equation shown is a bit confusing. I cannot understand the steps. First you take the sum of orientation matrices and then do polar decomposition ... when do u have to take the mean ? Can someone please help ?


text:
Under the auspices of the Computational Complexity Foundation (CCF)

REPORTS > KEYWORD > COMMUNICATION LOWER BOUND:
Reports tagged with communication lower bound:
TR17-095 | 26th May 2017
Ran Gelles, Yael Tauman Kalai

#### Constant-Rate Interactive Coding Is Impossible, Even In Constant-Degree Networks

Multiparty interactive coding allows a network of $n$ parties to perform distributed computations when the communication channels suffer from noise. Previous results (Rajagopalan and Schulman, STOC '94) obtained a multiparty interactive coding protocol, resilient to random noise, with a blowup of $O(\log(\Delta+1))$ for networks whose topology has a maximal degree ... more >>>

TR18-206 | 3rd December 2018

#### Equality Alone Does Not Simulate Randomness

Revisions: 1

The canonical problem that gives an exponential separation between deterministic and randomized communication complexity in the classical two-party communication model is Equality'. In this work, we show that even allowing access to an Equality' oracle, deterministic protocols remain exponentially weaker than randomized ones. More precisely, we exhibit a total function ... more >>>

TR21-011 | 13th February 2021
Chi-Ning Chou, Alexander Golovnev, Madhu Sudan, Santhoshini Velusamy

#### Classification of the streaming approximability of Boolean CSPs

A Boolean constraint satisfaction problem (CSP), Max-CSP$(f)$, is a maximization problem specified by a constraint $f:\{-1,1\}^k\to\{0,1\}$. An instance of the problem consists of $m$ constraint applications on $n$ Boolean variables, where each constraint application applies the constraint to $k$ literals chosen from the $n$ variables and their negations. The goal ... more >>>

TR21-063 | 3rd May 2021
Chi-Ning Chou, Alexander Golovnev, Madhu Sudan, Santhoshini Velusamy

#### Approximability of all finite CSPs in the dynamic streaming setting

Revisions: 3

A constraint satisfaction problem (CSP), Max-CSP$({\cal F})$, is specified by a finite set of constraints ${\cal F} \subseteq \{[q]^k \to \{0,1\}\}$ for positive integers $q$ and $k$. An instance of the problem on $n$ variables is given by $m$ applications of constraints from ${\cal F}$ to subsequences of the $n$ ... more >>>

TR21-086 | 22nd June 2021
Chi-Ning Chou, Alexander Golovnev, Madhu Sudan, Ameya Velingker, Santhoshini Velusamy

#### Linear Space Streaming Lower Bounds for Approximating CSPs

Revisions: 1

We consider the approximability of constraint satisfaction problems in the streaming setting. For every constraint satisfaction problem (CSP) on $n$ variables taking values in $\{0,\ldots,q-1\}$, we prove that improving over the trivial approximability by a factor of $q$ requires $\Omega(n)$ space even on instances with $O(n)$ constraints. We also identify ... more >>>

ISSN 1433-8092 | Imprint


text:
# aliquote

## < a quantity that can be divided into another a whole number of time />

For everything related to backup I used to use Arq back in my Apple days. I tried Borg on both Apple and Ubuntu, and I also tried Timeshift, but finally I decided to use Duplicity and deja-dup for my weekly backup on Ubuntu 20.04. It worked well, although the cache files took a lot of place. At that time I was backing up my entire \$HOME system on an external HD connected on an USB-C port. I didn’t add a cron task for that and I managed to launch the backup process more or less carefully every Sunday.

A week ago, I deleted my ~/.local/share folder by mistake. Fortunately, I was able to recover everything thanks to those weekly backups. However, the only way to recover this specific folder from Duplicity snapshots was to extract the full snapshot in a temporary folder and stopped the extraction process when I noticed that the folder in question was extracted. I was in a hurry, there may be a better option or better tool to use than deja-dup. Unlike Arq, there does not seem to be an easy way to view the inner structure of each snapshot.

Yesterday, I decided to give Kopia a try. It uses deduplication, compression, encryption — all the state of the art in terms of backup strategies. Moreover it allows to list all snapshots, mount them on your local filesystem, diff one snapshot against the other, and restore any snaphot with a few commands or via a nice GUI (Kopia UI). Of course, you can set exclusion rules, schedule how often snapshots are taken, and so on. Finally, you can synchronize your local backup with other sources, like an external HD or a local home server. I choose to backup my HOME directory on my HOME directory, and to synchronize it to an external HD, while previously I only use external HD to store my backup. This way, I have a local copy from which I can restore anything if something goes wrong – no need to take my external HD with me, and I use deduplication with the sftp transfer protocol. The documentation is also excellent, and there’s a Discourse group.

One thing I noticed is that it is blazing fast, especially compared to deja-dup.1 I excluded static folders which are unlikely to change more than once a week (pictures, music, and PDFs) and I ended up with a 30 Go backup repository.

~ % du -sh ./* | sort -h
364K    ./bin
1,7G    ./tmp
2,1G    ./Sites
6,0G    ./cwd
6,9G    ./Documents
18G     ./Images
33G     ./backup
74G     ./Media

I’m aware of the 3-2-1 backup strategy, except that I no longer use any offsite storage (Dropbox or Google, previously). I’m expecting to setup a central backup on a NAS, and a local copy on an external HD. I also have a cron job to schedule backup every hour, with default retention policy (48 hourly snapshots are kept in the central repository).

~ % kopia snapshot list
chl@aliquote:/home/chl
2022-06-05 19:05:21 CEST k295d3d6f42eeb3fa08c5d47e58af91bf 58.4 GB drwxr-xr-x files:504927 dirs:73697 (hourly-17,daily-3,weekly-2)
2022-06-06 20:22:20 CEST k96b2fb21131fbbfc0815dd5fb373a763 44 GB drwxr-xr-x files:506393 dirs:73202 (hourly-16)
2022-06-06 21:00:02 CEST kf916e1b0c60fa4f409a42684fb93019a 44 GB drwxr-xr-x files:506629 dirs:73202 (hourly-15)
2022-06-06 22:00:01 CEST k728bb034a39a4ff650182b3059d49991 44 GB drwxr-xr-x files:506712 dirs:73203 (hourly-14)
2022-06-06 23:00:01 CEST k5f4017166b44946ca6259a4ae17f1e38 44 GB drwxr-xr-x files:506714 dirs:73203 (hourly-13,daily-2)
2022-06-07 00:00:01 CEST kbf3b9941f81be51b1165cfb6806b4251 44.1 GB drwxr-xr-x files:506716 dirs:73203 (hourly-12)
2022-06-07 01:00:01 CEST k97b62af55128160101b828d76e26256c 44.1 GB drwxr-xr-x files:506718 dirs:73203 (hourly-11)
2022-06-07 02:00:01 CEST k39386d816ded10cbc656a2e4c161e1bc 44.1 GB drwxr-xr-x files:506720 dirs:73203 (latest-10,hourly-10)
2022-06-07 03:00:01 CEST kc012f6b2bf5e8678e89b5d891603a168 44.1 GB drwxr-xr-x files:506722 dirs:73203 (latest-9,hourly-9)
2022-06-07 04:00:01 CEST k8947a49d41f253dd2938d29ffbd7f1a3 44.1 GB drwxr-xr-x files:506724 dirs:73203 (latest-8,hourly-8)
2022-06-07 05:00:02 CEST ka91ca4f30e5411edfa2ff196a4e0905f 44.1 GB drwxr-xr-x files:506726 dirs:73203 (latest-7,hourly-7)
2022-06-07 06:00:01 CEST k19705c3b296d13670f0cc9ac7e91ffb5 44.2 GB drwxr-xr-x files:506728 dirs:73203 (latest-6,hourly-6)
2022-06-07 07:00:02 CEST kadc58cb442efbd727441de745cbebd13 44.2 GB drwxr-xr-x files:506730 dirs:73203 (latest-5,hourly-5)
2022-06-07 08:00:01 CEST kdb87258b93ae8e3d3d83ac5a4d281426 44.2 GB drwxr-xr-x files:506973 dirs:73244 (latest-4,hourly-4)
2022-06-07 10:00:01 CEST k7d9b1c6f0d746e9b9ffdb63011299a2c 44.2 GB drwxr-xr-x files:507123 dirs:73244 (latest-3,hourly-3)
2022-06-07 11:00:01 CEST k22b5115235d9dceb0ec9f204be6e3ae7 44.3 GB drwxr-xr-x files:507782 dirs:73254 (latest-2,hourly-2)
2022-06-07 12:00:01 CEST k7dc38129e4011ef6c0e870e220094459 44.3 GB drwxr-xr-x files:507743 dirs:73229 (latest-1,hourly-1,daily-1,weekly-1,monthly-1,annual-1)

It all looks very promising. I’m waiting to see what happens next, especially in case of accidental deletions or corruptions.

♪ Washed Out • Amor Fati

1. Backups to a local SSD are expected to be faster than backups whose destination is an external HD, though. ↩


text:
Algebra Pre-Algebra and Basic Algebra Math Forum

 June 17th, 2018, 08:11 AM #2 Math Team   Joined: Oct 2011 From: Ottawa Ontario, Canada Posts: 12,771 Thanks: 862 What do you understand? Can you solve something simpler, like: 5x + 12 = 3x + 20 Can you solve that for x ?
 June 17th, 2018, 08:36 AM #3 Global Moderator   Joined: Dec 2006 Posts: 19,191 Thanks: 1649 The equations f(x) = 3x - 2x - 1 g(x) = x² - 1 h(x) = f(x) + g(x) are to be treated as definitions of f(x) and g(x) in terms of x, and of h(x) in terms of f(x) and g(x). Note that "3x - 2x - 1", if that was typed correctly, can be simplified to x - 1. Note that terms such as "3x" mean "3(x)" (the product of 3 and x), but "f(x)" doesn't mean the product of f and x. To evaluate f(-1), one replaces each "x" in "f(x) = 3x - 2x - 1" with "-1". Doing that gives f(-1) = 3(-1) - 2(-1) - 1. The right-hand side evaluates to -6. The above should help with doing parts b and c of the question.
 June 17th, 2018, 09:45 AM #4 Senior Member   Joined: Aug 2012 Posts: 1,960 Thanks: 547 OP, is f(x)=3x-2x-1 supposed to be perhaps $f(x)=3x^2-2x-1$? Otherwise 3x - 2x = x.

 Thread Tools Display Modes Linear Mode

 Similar Threads Thread Thread Starter Forum Replies Last Post snezana Math Software 0 March 1st, 2016 12:28 AM v4formath Math Books 0 August 15th, 2014 07:04 PM Sid Math Books 5 May 27th, 2014 12:20 PM Sid Academic Guidance 2 May 11th, 2014 07:23 AM mishaark Elementary Math 0 December 31st, 1969 04:00 PM

 Contact - Home - Forums - Cryptocurrency Forum - Top


text:
Textbooks & Solution Manuals

Find the Source, Textbook, Solution Manual that you are looking for in 1 click.

WriteWise AI Model by Holooly Genius

Your Ultimate AI Essay Writer & Assistant.

Holooly Arabia

For Arabic Users, find a teacher/tutor in your City or country in the Middle East.

Holooly Help Desk

Need Help? We got you covered.

Products

Textbooks & Solution Manuals

Find the Source, Textbook, Solution Manual that you are looking for in 1 click.

WriteWise AI Model by Holooly Genius

Your Ultimate AI Essay Writer & Assistant.

Holooly Arabia

For Arabic Users, find a teacher/tutor in your City or country in the Middle East.

Holooly Help Desk

Need Help? We got you covered.

Q. 4.2

Write a net ionic equation for any precipitation reaction that occurs when dilute solutions of the following ionic compounds are mixed.

(a) NaOH and $Cu(NO_{3})_{2}$           (b) $Ba(OH)_{2}$ and $MgSO_{4}$           (c) $(NH_{4})_{3}PO_{4}$ and $K_{2}CO_{3}$

STRATEGY

 $Na^{+}$ and $OH^{-}$ from NaOH; $Cu^{2+}$ and $NO^{-}_{3}$ from  $Cu(NO_{3})_{2}$ $NaNO_{3}$ and $Cu(OH)_{2}$ $NaNO_{3}$ is soluble; $Cu(OH)_{2}$ is insoluble. $Cu^{2+}(aq)$ + 2$OH^{-}(aq)$ → $Cu(OH)_{2}(s)$. (a) Ions in solution Possible precipitates Solubility Net ionic equation $Ba^{2+}$ and $OH^{-}$ from $Ba(OH)_{2}$; $Mg^{2+}$ and $SO^{2-}_{4}$ from $MgSO_{4}$ $Mg(OH)_{2}$ and $BaSO_{4}$ Both $BaSO_{4}$ and $Mg(OH)_{2}$ are insoluble. $Mg^{2+}(aq)$ + $2OH^{-}(aq)$ → $Mg(OH)_{2}(s)$ $Ba^{2-}(aq)$ + $SO^{2-}_{4}(aq)$ → $BaSO_{4}(s)$ (b) Ions in solution Possible precipitates Solubility Net ionic equation $NH^{+}_{4}$ and $PO_{4}^{3-}$ from $(NH_{4})_{3}PO_{4}$; $K^{+}$ and $CO_{3}^{2-}$ from $K_{2}CO_{3}$ $(NH_{4})_{2}CO_{3}$ and $K_{3}PO_{4}$ Both $(NH_{4})_{2}CO_{3}$ and $K_{3}PO_{4}$ are soluble. no reaction (c) Ions in solution Possible precipitates Solubility Net ionic equation


text:
## Involve: A Journal of Mathematics

• Involve
• Volume 12, Number 6 (2019), 1015-1034.

### Nonstandard existence proofs for reaction diffusion equations

#### Abstract

We give an existence proof for distribution solutions to a scalar reaction diffusion equation, with the aim of illustrating both the differences and the common ingredients of the nonstandard and standard approaches. In particular, our proof shows how the operation of taking the standard part of a nonstandard real number can replace several different compactness theorems, such as Ascoli’s theorem and the Banach–Alaoglu theorem on weak$∗$-compactness of the unit ball in the dual of a Banach space.

#### Article information

Source
Involve, Volume 12, Number 6 (2019), 1015-1034.

Dates
Received: 19 September 2018
Revised: 28 March 2019
Accepted: 2 April 2019
First available in Project Euclid: 13 August 2019

Permanent link to this document
https://projecteuclid.org/euclid.involve/1565661770

Digital Object Identifier
doi:10.2140/involve.2019.12.1015

Mathematical Reviews number (MathSciNet)
MR3990795

Zentralblatt MATH identifier
07116067

#### Citation

Olson, Connor; Mueller, Marshall; Angenent, Sigurd B. Nonstandard existence proofs for reaction diffusion equations. Involve 12 (2019), no. 6, 1015--1034. doi:10.2140/involve.2019.12.1015. https://projecteuclid.org/euclid.involve/1565661770

#### References

• S. Albeverio, R. Høegh-Krohn, J. E. Fenstad, and T. Lindstrøm, Nonstandard methods in stochastic analysis and mathematical physics, Pure and Appl. Math. 122, Academic Press, Orlando, FL, 1986.
• R. A. Fisher, “The wave of advance of advantageous genes”, Ann. Eugenics 7:4 (1937), 355–369.
• G. B. Folland, Real analysis: modern techniques and their applications, 2nd ed., Wiley, New York, 1999.
• R. Goldblatt, Lectures on the hyperreals, Graduate Texts in Math. 188, Springer, 1998.
• D. Henry, Geometric theory of semilinear parabolic equations, Lecture Notes in Math. 840, Springer, 1981.
• F. John, Partial differential equations, 4th ed., Appl. Math. Sciences 1, Springer, 1982.
• H. J. Keisler, Elementary calculus: an infinitesimal approach, Prindle, Weber & Schmidt, Boston, 1976.
• H. J. Keisler, Foundations of infinitesimal calculus, Prindle, Weber & Schmidt, Boston, 1976.
• A. N. Kolmogorov, I. G. Petrovsky, and N. S. Piskunov, “A study of the diffusion equation with increase in the amount of substance, and its application to a biological problem”, Vestnik Moskov. Univ. Mat. Meh. 1:6 (1937), 1–26. In Russian; translated in Selected works of A. N. Kolmogorov, Volume I (1991), Springer, 242–270.
• R. J. LeVeque, Finite difference methods for ordinary and partial differential equations, Soc. Indust. Appl. Math., Philadelphia, 2007.
• E. Nelson, Radically elementary probability theory, Ann. Math. Studies 117, Princeton Univ. Press, 1987.
• A. Pazy, Semigroups of linear operators and applications to partial differential equations, Appl. Math. Sciences 44, Springer, 1983.
• W. H. Press, S. A. Teukolsky, W. T. Vetterling, and B. P. Flannery, Numerical recipes: the art of scientific computing, 3rd ed., Cambridge Univ. Press, 2007.
• T. Tao, “Ultrafilters, nonstandard analysis, and epsilon management”, blog post, 2007, https://tinyurl.com/ultrafilt.


text:
# surf

Surface plot

### surf(Z)

• Z is a non-empty matrix, i.e., ndims(Z) == 2.
• Z(i,j) is the z-value of a bivariate function at the grid point [i,j].

### surf(X, Y, Z)

• X and Y are non-empty matrices of the same sizes, representing grid points on which the surface plot is generated. X and Y can be obtained by meshgrid().
• Z is a non-empty matrix of the same size of X and Y, representing z-value of a grid point.
• See the example for meshgrid().


text:
# High base-emitter voltage NPN transistor

I just bought some NPN transistors for my project. I didn't notice before buying them, that the specification said the transistor had a emitter base voltage $V_{be}$ of 9 volts. Can this be true? This value is normally 0.7 Volts right?

Here are a screenshot of the specifications:

• What SP said - but note this is not a value you would usually get near in most circuits - it's just a limit. – Russell McMahon Aug 17 '14 at 13:46

## 1 Answer

You're thinking of the base-emitter voltage (forward biased). The datasheet specification is for the emitter-base voltage, which is the reverse breakdown voltage (guaranteed minimum) of the emitter-base junction.

Most BJTs have a rating in the 5-9V range, a few have breakdown voltages similar to the collector-base breakdown voltage.


text:
# What are the most common feedforward neural networks?

What are the most common feedforward neural networks? What kind of inputs do they receive? For example, do they receive binary numbers, real numbers, vectors, or matrics? Is there such a taxonomy?

## What is a neural network?

Many neural networks can be defined as a function $$f: \mathbb{R}^n \rightarrow \mathbb{R}^m$$, where $$n, m \geq 1$$.

Equivalently, many neural networks can also be defined as a set of interconnected units (aka neurons or nodes) $$f^i$$ that receive some input and produce output, i.e. $$f^i(\mathbf{x}^i) = y^i$$, where $$\mathbf{x}^i \in \mathbb{R}^k$$. The actual function $$f^i$$ is variable and depends on the application or problem you want to solve. For example, $$f^i$$ can just be a linear combination of the inputs, i.e. $$f^i(\mathbf{x}^i) = \sum_{j} \mathbf{w}_j^i \mathbf{x}_{j}^i$$, where $$\mathbf{w}^i \in \mathbb{R}^k$$ is a vector of weights (aka parameters or coefficients). The linear combination can also be followed by a non-linear function, such as a sigmoid function.

If the neural network (more precisely, its units) doesn't contain recurrent (aka cyclic) connections, then it can be called a feedforward neural network (FFNN).

## What are the most common feedforward neural networks?

### Perceptron

The simplest (non-binary) FFNN is the perceptron, where the inputs are directly connected to the outputs. The perceptron performs a linear combination of the inputs followed by a thresholding operation, so perceptrons can only represent straight-line functions, so they can only be used for classification or regression problems where your data is linearly separable. In fact, the perceptron cannot solve the XOR problem.

Before the perceptron, McCulloch and Pitts had introduced simplified models of biological neurons, where all signals are binary, in an attempt to closely mimic their biological counterpart. The perceptron can actually be seen as an extension of this work. In fact, a perceptron can be viewed as a single artificial neuron.

### Multi-layer perceptron

An FFNN with more layers (of units) between the input and the output is often called a multi-layer perceptron (MLP). The layers in the middle are often denoted as hidden layers. The MLP can represent not only linear functions (i.e. straight lines), but also more complicated functions by making use of non-linear functions, such as the sigmoid.

### Convolution neural network

You can have other forms of FFNNs that perform other operations.

For example, a convolution neural network (CNN), provided it doesn't contain recurrent connections, is an FFNN that performs the convolution operation (and often also a sub-sampling operation). For this reason, they are particularly suited to deal with images (and videos). (This shouldn't be surprising if you are familiar with the basics of image processing and computer vision, which I don't think it's the case)

However, note that CNNs can also have recurrent connections, but this is not usually the case.

### Residual neural network

There are also residual neural networks, i.e. neural networks where a node in a certain layer $$l$$ can be connected to other nodes in layers $$l+j$$, for $$j \geq 1$$, as opposed to being connected only to the nodes in layer $$l+1$$, which is the typical case.

### Auto-encoders

Auto-encoders are neural networks that compress the input and then decompress it. The answers to this question may help you to understand why AEs would be useful.

## What kind of inputs do they receive?

What kind of inputs do they receive? For example, do they receive binary numbers, real numbers, vectors, or matrics?

In principle, each of these FFNNs can receive either binary or real numbers or vectors (either of real or binary numbers). However, certain NNs are more appropriate to deal with certain inputs. For example, CNNs are more appropriate for images (which are typically represented as matrices or tensors).

## How can you further classify the NNs?

Based on chapter 2 of the book Neural Networks - A Systematic Introduction (1996) by Raul Rojas, you can also divide neural networks into other categories

• Unweighted (i.e. binary, such as the McCulloch and Pitts' model) vs weighted (e.g. the perceptron)
• Synchronous vs asynchronous (e.g. Hopfield networks, which are recurrent neural networks, though)
• Neural networks that store states vs NNs that don't store states

You could also distinguish between FFNNs based on the learning algorithm. Nowadays, the widely used NNs are trained with gradient descent (and back-propagation to compute the gradients), but there are other approaches to train NNs, such as evolutionary algorithms or Hebbian learning. Moreover, you could also distinguish between neural networks that compute a deterministic function and neural networks that have some randomness or stochasticity inside them (e.g. Bayesian neural networks). There are probably many more possible subdivisions.


text:
# Is this continuous-state example correct?

When defining stochastic process, I am given the following example:

Customers arrive one at a time to a service facility and queue and wait for attention by the one server who attends to each customer in turn. The fundamental sources of randomness here are times between successive arrivals, and the service-time demand of each customer. Quantities $$X_n$$ of interest could be the number of waiting customers found by the $$n$$th arriving customer, or the number left by the $$n$$th departing customer. These are discrete-state processes. A continuous-state process could be the waiting time (in the queue until commencement of service) of the $$n$$th arriving customer.

Is this continuous-state example even correct? It seems to me that "the waiting time (in the queue until commencement of service) of the $$n$$th arriving customer" means that the time is continuous, and the state-space is discrete (since, I'm assuming, $$n$$ is an integer $$\ge 0$$). Therefore, it seems to me that this is a discrete-state, continuous-time process – not a "continuous-state" process.

The example is correct.

There are two sets to consider:

• The set of values that each $$X_n$$ can take
• The index set (i.e. the values that $$n$$ can take)

The state-space is the first one. In this example, this is the positive real line, so it is a "continuous-state" process. The fact that $$X_n$$ models a "time" concept (waiting time) is irrelevant to whether the process is a "discrete-time" or "continuous-time" process.

Stochastic processes that are referred to as "continuous-time" are always referring to the index set, not the state-space. In this case the index set is discrete, so it would be "discrete-time".

• I think you're correct, but I'm not sure that your comments regarding $X_n$ modelling a time concept being irrelevant are correct. It seems to me that the fact that $X_n$ models "time" absolutely matters: time is continuous, and so, if $X_n$, the state-space, is time, then this is exactly what defines the stochastic process to be a continuous-state process. Am I mistaken? – The Pointer Mar 22 at 5:01
• I edited to clarify; I meant irrelevant for determining whether the process was "discrete-time" or "continuous-time", which seemed to be the confusion in the question (i.e. saying that because the state was a continuous "time" then the process is "continuous-time", which is not the case). – Chris Haug Mar 22 at 12:03
• Interesting; that actually was what I (naively, it seems) thought. Thanks for clarifying this. – The Pointer Mar 22 at 12:10