text:
# Increasing the size of the memory: not all files are built successfully

I am trying to compile a large file which contains a tikz picture with more data points than tex can handle.

Following the questions here and here I set to increase the capacity of tex by changing the file `texmf.cnf` in my path /usr/local/texlive/2012. I included the line

``````main_memory = 10000000
``````

and on terminal I run

``````sudo fmtutil-sys --all
``````

The problem is that this memory is not enough, and numbers bigger than that don't finish the fmtutil run properly. I get the error

`````` fmtutil: Error! Not all formats have been built successfully.
``````

To give a better idea of where the problem is coming from, if I only include in the file `texmf.cnf` the lines

``````main_memory.latex = 15000000
main_memory.pdflatex = 15000000
``````

then these are the files which are not properly built:

``````This is a summary of all `failed' messages:
`pdftex -ini  -jobname=latex -progname=latex -translate-file=cp227.tcx *latex.ini' failed
`pdftex -ini  -jobname=pdflatex -progname=pdflatex -translate-file=cp227.tcx *pdflatex.ini' failed
``````

How can I increase the size of the memory beyond 10000000? Am I doing anything wrong?

(BTW, I am running texlive 2012 on a mac)

-
Maybe externalizing the large TikZ drawing first might help for the rest? – percusse Jul 26 '12 at 10:29
Can you try issuing the command shown on the last line and report the error message? You may try increasing `extra_mem_top` and `extra_mem_bot`, which doesn't require rebuilding formats. – egreg Jul 26 '12 at 10:31
@percusse Not sure what you mean by that... If you are saying I should try and compile the tikz file separately, then it wouldn't help because the tikz picture is all I am trying to compile (that's all that my .tex file has). If that's not what you mean, could you explain a bit more? – Vivi Jul 26 '12 at 10:33
Ah OK. I thought large file and TikZ drawing are different things that need to be compiled together. – percusse Jul 26 '12 at 10:34
@egreg: I understand what you say about `extra_mem_top` and `extra_mem_bot` and I will try that, thanks. I am not sure what you mean by "command shown on the last line", though... – Vivi Jul 26 '12 at 10:35

I don't think that increasing `main_memory` is the solution: the default value is very near to the maximum (which depends also on other parameter, on my system the maximum seems to be 12435455), so you get at most a 25% increase in memory.

The parameters to play with are `extra_mem_top` and `extra_mem_bot`. The former is for "small objects", the latter for "complex" ones, such as boxes.

For example, in the main `texmf.cnf` we find

``````% ConTeXt needs lots of memory.
extra_mem_top.context = 2000000
extra_mem_bot.context = 4000000
``````

so the first suggestion is to set, in the local `texmf.cnf` file located in `/usr/local/texlive/2012`,

``````% Add memory to pdflatex
extra_mem_top.pdflatex = 2000000
extra_mem_bot.pdflatex = 4000000
``````

Setting these values doesn't require to rebuild the formats, as is the case for `main_memory`.

An alternative is to use `lualatex`, which allocates memory in dynamic fashion. The result shouldn't be very different to what's obtained with `pdflatex` (some small changes are possible, because LuaTeX uses slightly different hyphenation algorithms, for instance).

-
the extra memory didn't seem to help much (but then again, I could have kept trying higher numbers). The luatex option, though, worked. I never really understood what luatex was or what it did, and I didn't know how to use it. It compiled the document using all data points without problem! I truly appreciate your help :) – Vivi Jul 26 '12 at 17:38


text:
## The Annals of Mathematical Statistics

### Sequential Maximum Likelihood Estimation of the Size of a Population

Ester Samuel

#### Abstract

Consider the following model, the practical applications of which will be discussed elsewhere. An urn contains an unknown number, $N$, of white balls, and no others. An estimate of $N$ is desired, based on the following sampling procedure. Balls are drawn at random, one at a time, from the urn. A white ball is colored black before it is returned, a black ball is returned unchanged. The ball is always returned before the next ball is drawn. We are interested in two problems: (i) what stopping rule $t$ to use to terminate sampling, and (ii) how to estimate $N$ after we stop. The present problem (also in a more general setup) has been considered by several authors, notably L. A. Goodman [5], Chapman [1], Darroch [3] and Darling and Robbins [2]. We shall refer to their results in the sequel. Let $w_i, b_i$ denote the (random) number of white balls, black balls, respectively, observed in the first $i$ draws $(w_i + b_i = i)$. We shall consider mainly the following stopping rules. RULE A. Let $A > 0$ be a fixed integer. $t_A = A$. RULE B. Let $B > 0$ be a fixed integer. $t_B = \inf \{i\mid b_i = B\}$. RULE C. Let $C > 0$ be fixed. $t_c = \inf \{i|b_i \geqq Cw_i\} = \inf \{i|i \geqq (C + 1)w_i\}$. RULE D. Let $- \infty < D < \infty$ be fixed. \begin{align*}t_D = \inf \{i\mid b_i \geqq \max (1, w_i \log w_i + w_iD)\} \\ = \inf \{i\mid i \geqq \max (w_i + 1, w_i \log w_i + w_i(D + 1))\}.\end{align*} RULE E. Let $\{D_j\}$ be such that $\lim D_j = \infty$. $t_E = \inf \{i\mid b_i \geqq \max (1, w_i \log w_i + w_iD_{w_i})\}.$ Since $w_i \leqq N$ each of these rules is bounded, and thus clearly stops with probability one. Of these rules, Rule B has been investigated most. See [5], [1] and [3]. Rule D has been considered in a recent paper [2] by Darling and Robbins, who show that for any $0 < \alpha < 1$ and a suitable choice of $D$ one can have $P_N(W_D = N) \geqq 1 - \alpha$ uniformly in $N$, where $W_D$ is the total of white balls observed before stopping. (See Section 6). The motivation for consideration of rules A to E stems from a theorem on the limiting distribution, as $N \rightarrow \infty$, of $w_i$, in a sample of fixed size $i$, for various relationships between $i$ and $N$. We restate the theorem here, since we shall need part of it in the sequel. Different parts of the theorem have been proved by various authors. See for example Renyi [8], where also proper references are given. Let $u_i = N - w_i =$ number of unobserved white balls in the sample of size $i (=$ number of white balls in the urn, after $i$ draws). Since there are linear relationships between $w_i, b_i, u_i$ we shall express the limiting distribution for one of these variables only. Let $\Phi$ denote the distribution function of a standard normal variable. We have, THEOREM 1. Let $N \rightarrow \infty$. Case $A$. If $i = (2N\lambda_N)^{\frac{1}{2}}$ where $\lambda_N \rightarrow 0$ then $P_N(b_i = 0) \rightarrow 1$. Case $B$. If $i = (2N\lambda_N)^{\frac{1}{2}}$ where $\lambda_N \rightarrow \lambda$ and $0 < \lambda < \infty$ then $P_N(b_i = k) \rightarrow e^{-\lambda}\lambda^k/k!\quad k = 0, 1, \cdots.$ Case $C$. If $i = a_NN$ where $\xi_NN^{-\frac{1}{2}} < a_N < \log N - \mu_N$ and $\xi_N \rightarrow \infty, \mu_N \rightarrow \infty$ then $P_N((w_i - Ew_i)/(\operatorname{Var} w_i)^{\frac{1}{2}} \leqq x) \rightarrow \Phi(x), - \infty < x < \infty.$ Case $D$. If $i = N \log N + Na_N$ where $a_N \rightarrow a$ and $- \infty < a < \infty$ then $P_N(u_i = k) \rightarrow e^{-\lambda}\lambda^k/k!, \quad k = 0, 1, \cdots \text{where} \lambda = e^{-a}.$ Case $E$. If $i = N \log N + Na_N$ where $a_N \rightarrow \infty$, then $P_N(w_i = N) \rightarrow 1$. We consider mainly the Maximum Likelihood Estimate (MLE) of $N$, denoted by $\hat{N}$. It turns out that if when we stop we have seen $w$ white and $b$ black balls, then $\hat{N} = \hat{N} (w, b)$ and does not depend on the stopping rule used, though the distribution of $\hat{N}$ clearly will depend on the stopping rule. The value of $\hat{N}(w, b)$ is discussed in Section 2. In Section 3 we briefly consider Rule A. It satisfies $P_N(\hat{N} = \infty) > 0$ for all $N \geqq A$. Rule B is discussed in Section 4 and it is shown that $2B\hat{N}/N$ has an asymptotic chi square distribution with $2B$ degrees of freedom, (to be denoted $\chi^2_{2B})$, as $N \rightarrow \infty$. In Section 5 Rule C is considered, and bounds on the distribution of $(\hat{N} - N)N^{-\frac{1}{2}}$ in terms of the normal distribution are given. Rules D and E are considered in Section 6. Let $\lbrack x\rbrack^\ast$ be the largest integer not exceeding $x$. For Rule D it is shown that $\hat{N} - N + \lbrack\lambda\rbrack^\ast$ has an asymptotic Poisson distribution with parameter $\lambda = \exp (-D - 1)$ and for Rule E $P_N(\hat{N} = N) \rightarrow 1$. The exact and asymptotic distributions of the corresponding $t$'s is also considered, and is closely related to the distribution of $\hat{N}$.

#### Article information

Source
Ann. Math. Statist., Volume 39, Number 3 (1968), 1057-1068.

Dates
First available in Project Euclid: 27 April 2007

https://projecteuclid.org/euclid.aoms/1177698338

Digital Object Identifier
doi:10.1214/aoms/1177698338

Mathematical Reviews number (MathSciNet)
MR225435

Zentralblatt MATH identifier
0193.16701

JSTOR

format: plain


text:
## Calculus (3rd Edition)

$$y''= 2\sec x^2+4x^2 \sec x^2 \tan x^2.$$
Recall that $(\tan x)'=\sec^2 x$. Recall that $(x^n)'=nx^{n-1}$ Given $y=\tan x^2$, then, by using the chain rule, we have $$y'=(2x)\sec x^2=2x\sec x^2,$$ and, by using the product rule, the second derivative $y''$ is given by $$y''=2\sec x^2+2x (2x) \sec x^2 \tan x^2 \\=2\sec x^2+4x^2 \sec x^2 \tan x^2.$$


text:
Continue to Site

# How to calculate peak voltage of parallel LC tank transient response?

Status
Not open for further replies.

#### i6power

##### Newbie level 3

I spent 2 hours googling, but could not find any useful information on calculating the peak voltage of parallel LC tank transient response.

See the attached circuit diagram. When you open the switch, the current in L wants to keep going, and charges the capacitor, and then capacitor discharges which charges L inductor then they oscillate back and forth, each time reducing magnitude because of parasitic resistance disippating energy. What I want to know is what is the peak voltage of the first "swing"? given the values of L, C, initial voltage and parasitic resistance.

Please do not reply about resonance of LC tank circuit which is discussed in every text book, or LC series configuration.

##### Super Moderator
Staff member
When you open the switch, the inductor starts charging the capacitor.

If H is large, and C is small, then voltage will rise very high. (This assumes there is no ohmic load involved.)

To calculate the first voltage swing, there are formulae, which involve joules. A formula for the inductor, and another for the capacitor.

Kinetic energy is converted to potential energy, then back again.

The equation has to do with:
(a) so many Amperes in so many Henries, equates to...
(b) so many Volts on so many Farads.

#### i6power

##### Newbie level 3
When you open the switch, the inductor starts charging the capacitor.

If H is large, and C is small, then voltage will rise very high. (This assumes there is no ohmic load involved.)

To calculate the first voltage swing, there are formulae, which involve joules. A formula for the inductor, and another for the capacitor.

Kinetic energy is converted to potential energy, then back again.

The equation has to do with:
(a) so many Amperes in so many Henries, equates to...
(b) so many Volts on so many Farads.

You sound very knowledgable. Could you share that formula or point to where I can read about it?

#### chuckey

Energy stored in inductor = 1/2 L I^2 so if this then swings into the capacitor it must equal 1/2 C V^2, assuming no losses on first swing. It then goes down by 1/Q per cycle.
Frank

#### i6power

##### Newbie level 3
So the answer is SQRT (L/C) * I ?

#### chuckey

I guess so. A more accurate answer would be to take into account the I^2 r losses, as the inductors current must flow through the loss resistance (r) even on the first swing but given a decent working Q, the error should not be too great.
Frank

#### zorro

Agree with Vpk=sqrt(L/C)*Ipk .

For an accurate value, take into account the exponential decay of the envelope:

Vpk = sqrt(L/C) * exp(-T/4/tau) * Ipk

For high Q it can be approximated as

sqrt(L/C) * (1-T/4/tau) * Ipk

Z

Status
Not open for further replies.


text:
## Essential University Physics: Volume 1 (3rd Edition)

We know the following: $v = \sqrt{\frac{F}{\mu}}$ We also know that the force varies based on the height of the cable as follows: $F= \mu y g$ Using substitution, we find: $v = \sqrt{\frac{\mu y g}{\mu}}$ $v =\sqrt{yg}$


text:
# Controlling Indomethacin Release through Vapor-Phase Deposited Hydrogel Films by Adjusting the Cross-linker Density

## Abstract

Vapor-phase deposited polymer coatings are applied on thin indomethacin films to modify the drug release. Hydrogel-forming co-polymers of 2-hydroxyethyl methacrylate and ethylene glycol dimethacrylate were prepared directly on top of solution cast indomethacin thin films by initiated Chemical Vapor Deposition (iCVD). This technique allows for solvent-free processing under mild conditions, thus minimizing a potential impact on the pharmaceutical. The drug release behavior, among other properties, was evaluated for polymers of different compositions and at different temperatures. The data show that the release kinetics can be tuned by several orders of magnitude as the cross-linker fraction is varied in the polymer coating. While uncoated indomethacin films were fully released within an hour, polymer coatings showed gradual liberation over several hours to days. Additional insight is gained from evaluating the experimental dissolution data in the framework of diffusive transport. The results of this study show that the iCVD technique has some promises for pharmaceutical technology, potentially allowing for tailored release behavior also for other drug systems.

## Results

### Indomethacin film characterization

Homogenous indomethacin films were obtained by solution casting. Initially, a uniform liquid layer forms on the substrate due to the good wetting properties of THF on glass surfaces. Upon fast solvent removal, homogenous indomethacin films form. The solid state of such films is amorphous and crystalline fractions are neither noted in the optical micrographs nor (more qualitatively) in X-ray diffraction patterns (cf. to Figure S1). As film formation occurs quickly due to the high vapor pressure of THF, this leaves little to no time to the individual molecules to adapt an ordered (long range) arrangement, thus the system remains in a meta-stable amorphous state. While samples will transfer to a crystalline state eventually, neither storage at ambient conditions nor at 50 °C for five consecutive days did change the solid state. Indeed, previous studies on amorphous indomethacin have found induction times between 15 to 50 days when employing temperatures below 60 °C32. However, by casting indomethacin from different solvents or by artificially reducing the solvent evaporation rate (e.g. by covering the sample with a Petri dish), the formation of some crystalline fraction results, which grows into larger domains within a few hours. In addition, some solvents yield distinct crystal structures (polymorphs); for instance, indomethacin crystallizes from ethanol solution in the α-form (monoclinic)33 while the γ-form (triclinic) is obtained from ethyl ether34. Similarly, this solvent-specific behavior can also be used to transfer amorphous films into specific crystal forms. In this study, ethanol solvent vapor annealing was used for controlled crystallization. Within 48 hours, samples exposed to ethanol vapor in a sealed container had fully crystallized. Figure 2a shows an optical microscopy image of such a sample taken under crossed polarizers, revealing Maltese cross patterns characteristic for spherulitic growth (the patterns are due to birefringence). The size of a single spherulitic domain varies from approximately 200 to 850 µm. The crystalline nature of such films is also confirmed by X-ray diffraction (see Fig. 2b). The specular diffraction pattern exhibits multiple Bragg peaks and the indexation reveals the presence of the indomethacin α-form35 (CCDC Nr 201766). The various Bragg peaks present in the pattern indicate that a preferred orientation is absent, i.e. the individual spherulitic branches are also rotated in respect to the substrate normal and the crystallites exhibit a powder-like distribution.

### Polymer deposition onto crystalline drug layers

The coating of crystalline indomethacin with iCVD polymers leaves the underlying drug layer mostly unaffected and changes in morphology or solid state are not observed. Spherulitic indomethacin domains dominate the optical appearance as the polymer coatings are optically transparent. Thus, samples were investigated by AFM, the data being summarized in Fig. 3. The uncoated surface exhibits branched, feather-like structures typical for the spherulitic growth of indomethacin crystals. These structures are simply replicated by the polymer coatings grown atop, underlining the conformity of iCVD coatings. Also, changes in the solid state were not detected from XRD scans (cf. Figure S2), indicating the gentle nature of the iCVD process.

A more detailed look at the data in Fig. 3 reveals that surface features appear smoothed when covered by the polymers, indicating that such structures become slowly buried as the polymer thickness increases during deposition. While this behavior is noted both for the pEGDMA homopolymer and the hydrogel-forming p(HEMA-co-EGDMA) coating, detailed inspection reveals another difference. Graphs of the latter depict a blurred surface, more reminiscent to a measurement artifact than to actual morphology. Likely, this is caused by a softening of the polymer when taking up water from the environment (approx. 25 °C, 70% humidity), thus forming a hydrogel36. Under dry conditions, the non-polar methyl groups are oriented towards the environment-polymer interface while the polar hydroxyethyl are turned inward, with a reversed behavior being observed in the swollen state, thus increasing flexibility37.

### Characterization of iCVD coatings on bare substrates

The deposition of p(HEMA-co-EGDMA) layers onto silica substrates replicates the surface so that morphologies similar to a bare substrate result (Figure S3). The chemical composition of the polymers had no impact on the morphology of the films. The polymer layers were prepared at a thickness of about 200 nm. This choice was made based on pre-evaluations and provides the best compromise for the iCVD setup in use in terms of preparation times (deposition rates were below 10 nm/min) and the final coating performance. All deposited polymers were subject to chemical characterization by infrared spectroscopy, allowing the HEMA to EGDMA ratios to be determined (data are shown in Figure S4). Three different compositions are exemplarily considered for the dissolution experiments, i.e. the ones with 25%, 50% and 100% EGDMA. It should be noted that with no or little cross-linking, pHEMA exhibits strong water uptake, thus detaching easily from the surface. While such a behavior is undesirable for controlled release, it is potentially useful for targeted drug delivery, especially when combined with stimuli-responsive functionalities.

The ability of HEMA copolymers to swell in aqueous environment is crucial for the drug release; uptake of water (or any other liquid) depends strongly on the mesh size of the polymer, which will also strongly influence how drug transport proceeds through the membrane. To evaluate the swellability of the studied polymers, polymer film thickness was monitored during aqueous swelling by in situ ellipsometry. While drug release studies were performed in a phosphate buffer solution instead of pure water, a comparable polymer swelling behavior is observed for both media (cf. Figure S5). In Fig. 4a, exemplary swelling curves are depicted for different polymer compositions. The data evidence how swelling is drastically decreased as the cross-linker fraction is increased in the polymer. While a polymer with 25% EGDMA content exhibits swelling up to 11%, the EGDMA homopolymer shows a negligible thickness increase when immersed into water. The hydrophobic character of EGDMA paired with strong cross-linking (and physical entanglement) in the polymer prevents water penetration at large so that only imperfections (such as unpolymerized vinyl groups or pinholes) should contribute to water uptake. From the equilibrium swelling degree s EQ , the mesh size of such polymers can be estimated. For this, the evolution of swelling degree $$s=\frac{({\rm{\Delta }}d)}{({d}_{0})}$$ as a function of time is fitted to an empirical model by

$$s(t)={s}_{EQ}(1-{e}^{-k\cdot {t}^{n}}),$$
(1)

with d0 being the initial (unswollen) polymer thickness, k being the rate constant and n being an empirical exponent. This equation is a simple sigmoid function and allows for a more reliable estimation of s EQ in cases where equilibrium is not reached within the time of the experiment. The average molecular weight between cross-links $$\overline{{M}_{c}}$$ in the layer is related to the polymer volume fraction at equilibrium $$\varphi =\frac{({d}_{0})}{({d}_{0}+{\rm{\Delta }}d)}=\frac{1}{{s}_{EQ}+1}$$ by

$$\overline{{M}_{c}}=-\,{V}_{s}{\rho }_{pol}\frac{(\frac{1}{\varphi }-\frac{\varphi }{2})}{\,\mathrm{ln}(1-\varphi )+\varphi +\chi {\varphi }^{2}}\,,$$
(2)

where V s denotes the molar volume of the solvent (VH2O = 18.03 cm3/mol), ρ pol is the polymer density (for pHEMA38, ρ HEMA  = 1.274 g/cm3) and χ is the polymer-solvent interaction parameter. For pHEMA, this interaction parameter was found to be dependent on ϕ, with χ = 0.320 + 0.904ϕ39. Equation (2) is a modified form of the Flory-Rehner equation40,41, accounting for the case of a surface-attached polymer which is thus restricted to one dimensional swelling42. A full derivation of this expression is provided in the supplementary information. The mesh size ξ is then given by

$$\xi =l{\varphi }^{-1/3}{C}_{n}^{1/2}{(\frac{2\bar{{M}_{c}}}{{M}_{m}})}^{1/2},$$
(3)

with l refering to the characteristic atomic bond length of the backbone (for C-C, l = 0.154 nm) and C n denoting the Flory characteristic ratio (rigidity factor). For pHEMA, literature suggests C n  = (6.9 ± 0.5).

Evaluating experimental swelling data of polymers with different fractions of cross-linker in the framework of Eq. (3) yields mesh sizes ranging from (0.29 ± 0.01) nm for 25% EGDMA to (0.15 ± 0.01) nm for 57% EGDMA (see Fig. 4b). For pEGDMA, a theoretical mesh size of (0.088 ± 0.004) nm is calculated. Given that the diameter of water is about 0.27 nm43, this raises the question how such values have to be interpreted. The theoretical analysis works on the premise of a defect-free, syndiotactic polymer where the local structure is repeated indefinitely throughout the swelling film. In praxis, polymers will often be (at least partially) atatic, displaying physical entanglement and incomplete vinyl conversion, among other defects, so that the mesh size will only be a mean measure of a distributed quantity. This is also evident when comparing the average number of links $$N=2\overline{{M}_{c}}/{M}_{m}$$, determined from the swelling studies, to the (theoretical) ratio calculated from the volume fractions, N theory  = F HEMA /F EGDMA 44. For instance, N theory calculates to 2.7 for the sample containing 25% EGDMA, while the swelling studies determine a value of just 0.5, meaning that the polymer appears (in average) stronger cross-linked than expected from just the composition. This difference is usually attributed to physical entanglement, which is limiting the overall swelling44.

### Indomethacin dissolution without coating

The dissolution behavior of uncoated indomethacin films was studied in a pH 5.8 phosphate buffer solution held at 25 °C. As indomethacin is an ionizable drug, its solubility varies with the species and the pH value of the buffer solution45. For the phosphate buffer used, indomethacin solubility at pH 5.8 and 25 °C is about 0.1 mg/ml (see also the Supporting Information)46. This means that the tested samples (containing about 2 mg of the drug) can fully be dissolved in the volume of the dissolution medium (50 mL).

Both amorphous and crystalline indomethacin samples were tested, with the individual release profiles being depicted in Fig. 5. For an as-prepared, amorphous sample, rapid release kinetics are observed. Initially, drug release from the substrate surface proceeds at a constant rate, the slope being 19%/min. As the released volume fraction surpasses sixty percent, a gradual decrease of the release rate results (elimination phase), until full dissolution is achieved after 30 minutes. In general, dissolution of thin drug layers from a surfaces proceeds at a very fast pace as the surface area per volume, which is directly proportional to the release kinetic, is very large47,48. Such a rapid release might be desired in cases where immediate therapeutic action is required. For comparison, amorphous samples were also tested after being stored at 50 °C under ambient atmosphere for five consecutive days. This does not change, at least in the limit of detection, the sample properties (i.e. morphology, solid state). Similar to the as-prepared samples, dissolution experiments reveal a rapid release, again displaying a constant rate at first. The slope of 11%/min in the initial release means that indomethacin dissolution is a bit slower in this case and full release results after approximately 45 minutes. While the exact reason for this difference cannot be unambiguously identified within this study, one possible explanation can be amorphous - crystalline phase transitions during dissolution experiments49. While such an effect might also be present here, the (overall) fast dissolution rate means that the period for significant crystallization is likely too small. It should also be mentioned that due to the rapid dissolution behavior, error bars are rather large for these data sets. To avoid these issues when testing polymer coated samples, only samples containing crystalline indomethacin were employed.

Crystalline indomethacin, on the other hand, displays a significantly slower drug release when compared to its amorphous counterpart. Full dissolution of crystalline samples takes approximately two hours, meaning that a modification of the solid state form allows already some control over the drug release behavior. The slower drug release is the result of an additional energetic barrier that molecules need to overcome in the dissolution process due to being confined to distinct lattice sites.

It should also be mentioned that it was not possible to gain statistically reasonable results with the applied dissolution measurement strategy when increasing the temperature to 37 °C or even 50 °C as the dissolution rates were too high.

### Dissolution of crystalline indomethacin with iCVD polymer coating

In Fig. 6, the dissolution profiles of crystalline indomethacin films, coated with different iCVD polymers, are depicted. The dissolution medium was held at 25 °C and the dissolution profile of the uncoated sample is also shown for comparison. While the release of uncoated indomethacin films from glass substrates proceeds on the time scale of minutes, drug liberation from coated samples occurs over a span of several hours to days. Moreover, distinct release behaviors are noted for the different polymer compositions; as the number of cross-links is increased in the polymer, drug release is increasingly retarded. For example, full indomethacin release takes over 20 hours in the case of a 25% EGDMA coating, prolonging drug release by a factor of 10 compared to the uncoated film. As the hydrogel character of the polymer coating is reduced by increasing EGDMA fraction, release kinetics are slowed down further. Interestingly, some release is also noted from a sample coated with the EGDMA homopolymer, albeit only a fraction of the other samples is liberated in the same time frame. Despite the high cross-linking degree and little water penetration (compare swelling data in Fig. 4), the pEGDMA coating allows for some release. This behavior suggests that coating imperfections are mainly responsible for this kind of release; oligomeric portions, pinholes, edge defects and/or partial ablation of the polymer coating may cause such a leaking release.

Therefore, dissolution data for the pEGDMA coating can be regarded as a measure for the integrity and mechanical stability of such coatings. Given that less than 10% of indomethacin is released over the course of 50 hours, a reasonable quality of these films can be expected. This is also in agreement with the fact that morphological investigations did not reveal any obvious imperfections, as mentioned previously. Overall, this means that such coatings are very effective in controlling drug release from the model substrate, here a glass surface. A more detailed analysis of release kinetics as function of temperature for the different coatings is provided in the following sections.

### Temperature dependent release

In general, an increase in temperature means that drug diffusion and thus dissolution processes are accelerated. To test this, dissolution measurements were performed at three different temperatures (25, 37 and 50 °C), the data being summarized in Fig. 7. At higher temperatures, faster release kinetics result for all the tested polymer compositions. While higher temperatures lead to significantly accelerated drug liberation, a burst release is not apparent from the present data, indicating that the polymer retains its mechanical integrity for at least some time during the dissolution experiment. The polymer coating with the least amount of EGDMA cross-linker exhibits the fastest release kinetics throughout all the tested temperature regimes. For example, by increasing the temperature to 37 °C (approximately human body temperature), full indomethacin release is achieved almost four times faster through a 25% EGDMA coating than at 25 °C. Increasing the temperature further to 50 °C, the necessary timeframe is reduced to 2.5 hours. At a cross-linker ratio of 50%, a similar behavior is observed, though the time scale for the release is increased to days instead of hours (Fig. 7b). Also, the improvement in dissolution rate upon a temperature increase to 37 °C is less pronounced; for full release, the required time is reduced from more than nine days (at 25 °C) to 3.8 days. An increase to 50 °C accelerates the dissolution behavior further and full release is observed after approximately 2 days.

A different behavior is observed in the case of the EGDMA homopolymer (Fig. 7c). At 25 °C, little drug release is observed; even after 10 days, less than a quarter of the total drug loading has been liberated. Increasing the temperature to 37 °C, release kinetics are becoming increasingly similar to the ones recorded for the copolymers. However, full release is again not observed within the time scale of the experiment. As mentioned previously, release in the case of the pEGDMA polymer should be considered being due to polymer imperfections. In particular, increased temperature will cause additional stress between the several interfaces (polymer-drug, polymer-substrate, drug-substrate), which in turn will foster rupture formation and (partial) ablation. This is also evident when looking at the release kinetics at 50 °C; release proceeds even faster than the one of the 50% EGDMA copolymer sample. As the rigidity is increased with the cross-linker content, the difference in elastic modulus between drug and polymer is most pronounced for the EGDMA homopolymer. Further tuning of the iCVD process parameters and polymer properties (composition and comonomer choice) can likely help to improve the stability, if desired.

### Dissolution data modeling

Qualitative differences in the dissolution behavior of uncoated and coated indomethacin samples can be directly noted from the curves in Figs 5 and 7. When a polymeric coating is applied, the drug release rate is significantly reduced, indicating that the coating layer becomes the rate limiting step in the dissolution process. For a more quantitative evaluation, a mathematical model was fitted to the experimental data. Depending on the dissolution mechanism, two main models are typically distinguished: diffusion layer models and interfacial barrier models50. In the interfacial barrier model, dissolution is assumed to be limited by the solvation process at the solid-liquid interface. In the diffusion layer model, the rate limiting step is attributed to the diffusive transport of the drug instead. In the present case, drug molecules are transferred from the solid to the solvated state at the drug-polymer interface. As only the polymer composition (i.e. the cross-linker fraction) was varied while maintaining coating thickness and drug dose, differences between samples are attributed to the altered (diffusive) transport through the polymer coatings.

For diffusion-limited drug release, several theoretical and (semi-)empirical models have been reported in literature. While for matrix systems (drug dispersed within a polymer network) the semi-empirical Korsmeyer-Peppas equation51 is commonly applied, this equation does not necessarily hold for reservoir systems such as the present one. For such systems, an analytic expression can be derived from Fick’s law of diffusion under the premise of perfect sink conditions, negligible (or just rapid initial) polymer swelling and that drug permeability does not change during the process52. While the time scales of polymer swelling are well below those of the dissolution process (minutes as compared to hours), it should be noted that perfect sink conditions might not be retained for all the conditions tested in the dissolution studies. The USP guidelines define sink conditions as “having a volume of medium at least three times the volume required to form a saturated solution of drug substance”53. Given the low solubility of indomethacin (see Methods and Supporting Information), this ratio is only about (3.0 ± 0.5) for the present system at 25 °C. While this represents the lower limit of perfect sink conditions, this should not impede the use of the (mathematical) model as solvent abundance (the key prerequisite) is still maintained. Also, increased indomethacin solubility at elevated temperatures means that perfect sink conditions are achieved for the release studies at 37 and 50 °C54.

For a slab geometry with a non-constant activity source55, the released drug fraction $$\frac{{M}_{t}}{{M}_{\infty }}$$ as a function of time t can be described by

$$\frac{{M}_{t}}{{M}_{\infty }}=1-{e}^{-\frac{A\cdot D\cdot P}{V\cdot L}t}.$$
(4)

Here, A denotes the total surface area available for release, D is the drug diffusion coefficient within the membrane, P is the drug partition coefficient between membrane and reservoir, V is the volume of the reservoir and L is the thickness of the coating. As only the diffusion coefficient is dependent on the polymer composition and the other parameters should not vary between samples (within the experimental limits), the exponent of Eq. (4) can be reduced to an effective release constant k:

$$\frac{{M}_{t}}{{M}_{\infty }}=1-{e}^{-k\cdot (t-{t}_{0})}$$
(5)

Introducing a time offset t0 as an additional fit parameter (lag time) greatly improved the data modelling, accounting for a dissolution onset different from the start of the experiment (i.e. insertion of the samples into the dissolution medium).

The model parameters fitted to the experimental dissolution data are summarized in Table 1 for all the samples investigated. In general, a good agreement between the mathematical model and the experimental data is found, as evident from R² values close to unity. The exception is the EGDMA homopolymer, which fits the theory the least. This is most evident for data collected at 25 °C, for which the fit yields an R² value of just 0.775. This underlines the previously discussed assumption that drug liberation in the case of the EGDMA homopolymer proceeds likely through imperfections in the polymer layer and is not due to diffusive transport as assumed by the model. It should be noted that similar results are also obtained when assuming an interfacial barrier model instead (e.g., the reaction-limited model described by Dokoumetzidis et al.56), as the mathematical description ultimately matches Eq. (5). A more detailed explanation is provided in the supporting information.

From the fit parameters in Table 1 it is also evident that the time offset t0 is mostly relevant for the samples covered by a 25% EGDMA coating. As these samples also exhibit the highest degree of swelling of the polymers tested, a causal connection might be suspected. At 25 °C, a time offset of approximately 20 minutes is determined, while equilibrium swelling is reached in about ten minutes (cf. Fig. 4a) For coatings of higher EGDMA content, this difference might not be observable as drug release proceeds much slower in general while equilibrium swelling does not take significantly longer.

The release constant k decreases by an order of magnitude between the different samples, with the uncoated samples showing the fastest release (k = (38.9 ± 0.9)10−3 min−1) and the EGDMA homopolymer the slowest (k = (0.030 ± 0.004)10−3 min−1) at 25 °C. Increasing the temperature to 37 °C doubles the release constant and an approximate fourfold increase is observed when dissolution is performed at 50 °C. While release constants are available at only three different temperatures, the data appear to follow an Arrhenius-like behavior. This is somewhat expected as, for example, temperature-dependent solvent diffusion in polymer systems is usually predicted by an Arrhenius term (Vrentas-Duda model)57. Anyway, the results indicate that different release behaviors are accessible by tuning the cross-linker fraction in the p(HEMA-co-EGDMA) polymer, so that coatings can be tailored to the therapeutic action required. It should be noted that without any or little cross-linking, a pHEMA polymer exhibits strong water uptake and detaches easily from the surface. This means such films are unstable under aqueous conditions, which might be undesirable for controlled release. The rapid removal of the coating layer exposes the drug layer directly to the dissolution media, and a rather immediate therapeutic action might follow, as indicted by the fast release observed in Fig. 7c.

In summary, different drug release behaviors were achieved by depositing iCVD polymers on top of thin crystalline films of indomethacin, with the release time frames spanning several orders of magnitude. The vapor-based polymer synthesis method allows for direct preparation of the coating atop the drug layer, ensuring a defined drug-polymer interface and minimizing the risk of any drug alteration often encountered in solution based processes. The p(HEMA-co-EGDMA) polymer coatings showed hydrogel formation when the cross-linker fraction is low, while little to no water permeation was observed for the hydrophobic EGDMA homopolymer. Likewise, drug liberation proceeded the fastest for coatings with low EGDMA content, with release rates being reduced as the EGDMA content increases. The ability to adjust the release behavior can enable individual therapeutic actions; short term pain relief might necessitate a large therapeutic input while chronical problems (e.g. rheumatic disorder) could make use of retarded drug liberation by means of small but continuous dosage, as provided from thin film patches.

## Methods

### Preparation of thin Indomethacin layers

Pharmaceutical grade indomethacin powder was purchased from Sigma-Aldrich (Germany) and used without further purification. Samples of indomethacin were prepared via drop casting on conventional microscopy glass slides (Roth, Germany). For this, indomethacin was dissolved in tetrahydrofuran (Sigma-Aldrich, Germany) at as solute concentration of 1 wt%, with the resulting solution being kept stirred prior usage. The substrates were cut to 2.5 × 2.5 cm2 pieces and cleaned in acetone and ethanol, respectively, and finally purged with a nitrogen stream. The substrates were carefully leveled before placing 200 µl of solution on the surface, which results in a homogenous drop spread with full surface coverage. After solvent evaporation, homogenous amorphous films are obtained. For the preparation of crystalline indomethacin films, amorphous samples were then exposed to an ethanol solvent vapor (solvent annealing58), which resulted in the entire film being transferred into a crystalline state within 24 hours.

### Preparation of drug coatings by initiated Chemical Vapor Deposition (iCVD)

Polymer coatings were prepared on the crystalline indomethacin samples by iCVD of the monomer 2-hydroxyethyl methacrylate (HEMA, purity 97%, Aldrich, Germany) and the cross-linker ethylene glycol dimethacrylate (EGDMA, purity 98%, Aldrich, Germany), using tert-butyl peroxide (TBPO, purity 98%, Aldrich, Germany) as initiator. For all the depositions, the substrate temperature was 28 ± 1 °C, the working pressure was 47 Pa and the filament temperature was 200 ± 5 °C. The TBPO flow rate was set to 0.80 sccm and a Nitrogen patch flow of 3 to 4 sccm was applied. By adjusting the monomer to cross-linker flow ratios, different polymer compositions were achieved (for compositional analysis, please refer to the supplementary information). The p(HEMA-co-EGDMA) polymers are labeled by their cross-linker volume fraction (EGDMA fraction), with 100% denoting the EGDMA homopolymer. For polymer characterization, pristine silicon wafers with a native oxide (Siegert Wafers, Germany) were coated in addition. For all samples, a nominal coating thickness of 200 nm was deposited (monitored in situ by laser interferometry).

### Polymer thickness characterization and swelling studies

Spectroscopic ellipsometric data were collected at three incidence angles (65, 70 and 75°) on a Woollam M-2000 ellipsometer (J.A. Woollam Co., USA) in the wavelength range between 370 and 1000 nm. For swelling experiments, the ellipsometer was equipped with a liquid cell attachment and measurements were performed in demineralized water at an incidence angle of 75°. Experimental data were fitted in the CompleteEASE® software to a model consisting of bulk silicon, a native silicon oxide layer (1.7 nm) and a transparent Cauchy layer accounting for the polymer coating. In swelling experiments, the Cauchy layer is representing thickness and optical properties of the swollen polymer matrix and the ambient medium is set to water in the model.

### Morphological and structural investigation of Indomethacin films

Morphological characterization was performed on a standard AxioVert 40 ZEISS optical microscope equipped with polarizers. A FlexAFM atomic force microscope (Nanosurf, Switzerland), equipped with an Easyscan 2 controller, was used in non-contact mode using a TAP 300 cantilever (Budget sensors, Bulgaria). Data and image processing were performed using the freely available software package Gwyddion59. Crystallographic properties were probed on a PANalytical Empyrean reflectometer in θ/θ geometry (specular scans). The setup was equipped with a copper sealed tube (Cu Kα, wavelength λ = 0.154 nm), various slits and masks as well as a Pixel3D detector. Data are presented in scattering vector notation which calculates as qz = 4·π/λ·sin(θ).

### Thin film dissolution testing

Time-resolved drug release studies were performed in a non-standard dissolution experiment as the standard apparatus is unable to evaluate samples containing very low drug loads. Instead, an adapted system was employed. Indomethacin samples (on glass substrates) were placed in a cylindrical, sealed glass vessel containing 50 mL of 0.2 molar KH2PO4 phosphate buffer as dissolution media, adjusted to pH 5.8 with sodium hydroxide. The pH is slightly above the range of healthy and clean skin, representing more realistically the environment of potential patients’ skin60. Indomethacin solubility in phosphate buffer is reported in literature as 0.109 mg/ml (at pH 5.7)46. The indomethacin concentration in solution was probed at certain times by measuring the absorption at a wavelength of 321 nm with a nanophotometer (Implen, Germany). For this, 1 mL solution was taken from the vessel and placed in a quartz cuvette for the measurement. Thereafter, the solution was fed back to the system to keep the medium volume overall constant. The medium was not stirred during dissolution testing. Data points are given as the average of four samples, improving statistics and thus accounting for small differences in drug/polymer film quality during preparation.

### Data availability

Data available on request from the authors.

## References

1. 1.

Häbel, H. et al. Characterization of pore structure of polymer blended films used for controlled drug release. J. Controlled Release 222, 151–158 (2016).

2. 2.

Banerjee, R., Maiti, S., Dey, D. & Dhara, D. Polymeric nanostructures with pH-labile core for controlled drug release. J. Colloid Interface Sci. 462, 176–182 (2016).

3. 3.

Ng, Y. C., Yang, Z., McAuley, W. J. & Qi, S. Stabilisation of amorphous drugs under high humidity using pharmaceutical thin films. Eur. J. Pharm. Biopharm. 84, 555–565 (2013).

4. 4.

Yu, L. Amorphous pharmaceutical solids: preparation, characterization and stabilization. Adv. Drug Deliv. Rev. 48, 27–42 (2001).

5. 5.

Cheng, R., Meng, F., Deng, C., Klok, H.-A. & Zhong, Z. Dual and multi-stimuli responsive polymeric nanoparticles for programmed site-specific drug delivery. Biomaterials 34, 3647–3657 (2013).

6. 6.

Ulbrich, K. et al. Targeted Drug Delivery with Polymers and Magnetic Nanoparticles: Covalent and Noncovalent Approaches, Release Control, and Clinical Studies. Chem. Rev. 116, 5338–5431 (2016).

7. 7.

Haag, R. & Kratz, F. Polymer Therapeutics: Concepts and Applications. Angew. Chem. Int. Ed. 45, 1198–1215 (2006).

8. 8.

Tibbitt, M. W., Dahlman, J. E. & Langer, R. Emerging Frontiers in Drug Delivery. J. Am. Chem. Soc. 138, 704–717 (2016).

9. 9.

Valo, H. et al. Drug release from nanoparticles embedded in four different nanofibrillar cellulose aerogels. Eur. J. Pharm. Sci. 50, 69–77 (2013).

10. 10.

Müller, R. H., Mäder, K. & Gohla, S. Solid lipid nanoparticles (SLN) for controlled drug delivery – a review of the state of the art. Eur. J. Pharm. Biopharm. 50, 161–177 (2000).

11. 11.

Kellner, T. et al. Crystallographic Textures and Morphologies of Solution Cast Ibuprofen Composite Films at Solid Surfaces. Mol. Pharm. 11, 4084–4091 (2014).

12. 12.

Brazel, C. S. & Peppas, N. A. Mechanisms of solute and drug transport in relaxing, swellable, hydrophilic glassy polymers. Polymer 40, 3383–3398 (1999).

13. 13.

Stevenson, C. L., Santini, J. T. & Langer, R. Reservoir-based drug delivery systems utilizing microtechnology. Adv. Drug Deliv. Rev. 64, 1590–1602 (2012).

14. 14.

Borgquist, P., Zackrisson, G., Nilsson, B. & Axelsson, A. Simulation and parametric study of a film-coated controlled-release pharmaceutical. J. Controlled Release 80, 229–245 (2002).

15. 15.

Muschert, S., Siepmann, F., Leclercq, B., Carlin, B. & Siepmann, J. Prediction of drug release from ethylcellulose coated pellets. J. Controlled Release 135, 71–79 (2009).

16. 16.

Nandagopal, M. S. G., Antony, R., Rangabhashiyam, S., Sreekumar, N. & Selvaraju, N. Overview of microneedle system: a third generation transdermal drug delivery approach. Microsyst. Technol. 20, 1249–1272 (2014).

17. 17.

Wood, K. C., Boedicker, J. Q., Lynn, D. M. & Hammond, P. T. Tunable Drug Release from Hydrolytically Degradable Layer-by-Layer Thin Films. Langmuir 21, 1603–1609 (2005).

18. 18.

Zelikin, A. N. Drug Releasing Polymer Thin Films: New Era of Surface-Mediated Drug Delivery. ACS Nano 4, 2494–2509 (2010).

19. 19.

Lau, K. K. S. et al. Polymeric nanocoatings by hot-wire chemical vapor deposition (HWCVD). Thin Solid Films 501, 211–215 (2006).

20. 20.

Bradley, L. C. & Gupta, M. Encapsulation of Ionic Liquids within Polymer Shells via Vapor Phase Deposition. Langmuir 28, 10276–10280 (2012).

21. 21.

Baxamusa, S. H. & Gleason, K. K. Thin Polymer Films with High Step Coverage in Microtrenches by Initiated CVD. Chem. Vap. Depos. 14, 313–318 (2008).

22. 22.

Gleason, K. K. CVD Polymers: Fabrication of Organic Surfaces and Devices. (John Wiley & Sons, 2015).

23. 23.

Coclite, A. M. et al. 25th Anniversary Article: CVD Polymers: A New Paradigm for Surface Modification and Device Fabrication. Adv. Mater. 25, 5392–5423 (2013).

24. 24.

Lau, K. K. S. & Gleason, K. K. All-Dry Synthesis and Coating of Methacrylic Acid Copolymers for Controlled Release. Macromol. Biosci. 7, 429–434 (2007).

25. 25.

McInnes, S. J. P. et al. Fabrication and Characterization of a Porous Silicon Drug Delivery System with an Initiated Chemical Vapor Deposition Temperature-Responsive Coating. Langmuir 32, 301–308 (2016).

26. 26.

Perrotta, A., Werzer, O. & Coclite, A. M. Strategies for Drug Encapsulation and Controlled Delivery Based on Vapor-Phase Deposited Thin Films. Adv. Eng. Mater. n/a-n/a, https://doi.org/10.1002/adem.201700639.

27. 27.

Hoffman, A. S. Hydrogels for biomedical applications. Adv. Drug Deliv. Rev. 64, Supplement, 18–23 (2012).

28. 28.

Lustig, S. R. & Peppas, N. A. Solute diffusion in swollen membranes. IX. Scaling laws for solute diffusion in gels. J. Appl. Polym. Sci. 36, 735–747 (1988).

29. 29.

Hsiue, G.-H., Guu, J.-A. & Cheng, C.-C. Poly(2-hydroxyethyl methacrylate) film as a drug delivery system for pilocarpine. Biomaterials 22, 1763–1769 (2001).

30. 30.

Christian, P., Ehmann, H. M. A., Werzer, O. & Coclite, A. M. Wrinkle formation in a polymeric drug coating deposited via initiated chemical vapor deposition. Soft Matter 12, 9501–9508 (2016).

31. 31.

Christian, P., Ehmann, H. M. A., Coclite, A. M. & Werzer, O. Polymer Encapsulation of an Amorphous Pharmaceutical by initiated Chemical Vapor Deposition for Enhanced Stability. ACS Appl. Mater. Interfaces 8, 21177–21184 (2016).

32. 32.

Andronis, V. & Zografi, G. Crystal nucleation and growth of indomethacin polymorphs from the amorphous state. J. Non-Cryst. Solids 271, 236–248 (2000).

33. 33.

Yamamoto, H. 1-Acyl-indoles. II. A New Syntheses of 1-(p-chlorobenzoyl)-5-methoxy-3-indolylacetic Acid and Its Polymorphism. Chem. Pharm. Bull. (Tokyo) 16, 17–19 (1968).

34. 34.

Kaneniwa, N., Otsuka, M. & Hayashi, T. Physicochemical Characterization of Indomethacin Polymorphs and the Transformation Kinetics in Ethanol. Chem. Pharm. Bull. (Tokyo) 33, 3447–3455 (1985).

35. 35.

Chen, X., Morris, K. R., Griesser, U. J., Byrn, S. R. & Stowell, J. G. Reactivity Differences of Indomethacin Solid Forms with Ammonia Gas. J. Am. Chem. Soc. 124, 15012–15019 (2002).

36. 36.

Mabilleau, G. et al. Effects of the length of crosslink chain on poly(2-hydroxyethyl methacrylate) (pHEMA) swelling and biomechanical properties. J. Biomed. Mater. Res. A 77A, 35–42 (2006).

37. 37.

Lukáš, J., Sodhi, R. N. S. & Sefton, M. V. An XPS Study of the Surface Reorientation of Statistical Methacrylate Copolymers. J. Colloid Interface Sci. 174, 421–427 (1995).

38. 38.

Wichterle, O. & Chromeček, R. Polymerization of ethylene glycol monomethacrylate in the presence of solvents. J. Polym. Sci. Part C Polym. Symp. 16, 4677–4686 (1967).

39. 39.

Janáček, J. & Hasa, J. Structure and properties of hydrophilic polymers and their gels. VI. Equilibrium deformation behaviour of polyethyleneglycol methacrylate and polydiethyleneglycol methacrylate networks prepared in the presence of a diluent and swollen with water. Collect. Czechoslov. Chem. Commun. 31, 2186–2201 (1966).

40. 40.

Flory, P. J. & Rehner, J. Statistical Mechanics of Cross‐Linked Polymer Networks II. Swelling. J. Chem. Phys. 11, 521–526 (1943).

41. 41.

Flory, P. J. Statistical Mechanics of Swelling of Network Structures. J. Chem. Phys. 18, 108–111 (1950).

42. 42.

Toomey, R., Freidank, D. & Rühe, J. Swelling Behavior of Thin, Surface-Attached Polymer Networks. Macromolecules 37, 882–887 (2004).

43. 43.

Zhang, Y. & Xu, Z. Atomic radii of noble gas elements in condensed phases. Am. Mineral. 80, 670–675 (2015).

44. 44.

Peppas, N. A., Moynihan, H. J. & Lucht, L. M. The structure of highly crosslinked poly(2-hydroxyethyl methacrylate) hydrogels. J. Biomed. Mater. Res. 19, 397–411 (1985).

45. 45.

McNamara, D. P., Whitney, K. M. & Goss, S. L. Use of a Physiologic Bicarbonate Buffer System for Dissolution Characterization of Ionizable Drugs. Pharm. Res. 20, 1641–1646 (2003).

46. 46.

Oth, M. P. & Moës, A. J. Enhanced in vitro release of indomethacin from non-aqueous suspensions using indomethacin-polyvinylpyrrolidone coprecipitate. Int. J. Pharm. 24, 275–286 (1985).

47. 47.

Werzer, O., Baumgartner, R., Zawodzki, M. & Roblegg, E. Particular Film Formation of Phenytoin at Silica Surfaces. Mol. Pharm. 11, 610–616 (2014).

48. 48.

Röthel, C. et al. O. Alteration of texture and polymorph of phenytoin within thin films and its impact on dissolution. Cryst Eng Comm 18, 588–595 (2016).

49. 49.

Alonzo, D. E., Zhang, G. G. Z., Zhou, D., Gao, Y. & Taylor, L. S. Understanding the Behavior of Amorphous Pharmaceutical Systems during Dissolution. Pharm. Res. 27, 608–618 (2010).

50. 50.

Macheras, P. & Iliadis, A. Drug Dissolution. in Modeling in Biopharmaceutics, Pharmacokinetics and Pharmacodynamics 83–108, https://doi.org/10.1007/978-3-319-27598-7_5 (Springer, Cham, 2016).

51. 51.

Korsmeyer, R. W., Gurny, R., Doelker, E., Buri, P. & Peppas, N. A. Mechanisms of solute release from porous hydrophilic polymers. Int. J. Pharm. 15, 25–35 (1983).

52. 52.

Siepmann, J. & Siepmann, F. Mathematical modeling of drug delivery. Int. J. Pharm. 364, 328–343 (2008).

53. 53.

United States Pharmacopeial Convention. 1092 The Dissolution Procedure: Development and Validation. In USP36 NF31, 2013: U. S. Pharmacopoeia National Formulary (United States Pharmacopeial, 2012).

54. 54.

Hancock, B. C. & Parks, M. What is the True Solubility Advantage for Amorphous Pharmaceuticals? Pharm. Res. 17, 397–404 (2000).

55. 55.

Siepmann, J. & Siepmann, F. Modeling of diffusion controlled drug delivery. J. Controlled Release 161, 351–362 (2012).

56. 56.

Dokoumetzidis, A., Papadopoulou, V., Valsami, G. & Macheras, P. Development of a reaction-limited model of dissolution: Application to official dissolution tests experiments. Int. J. Pharm. 355, 114–125 (2008).

57. 57.

Vrentas, J. S. & Vrentas, C. M. Evaluation of free-volume theories for solvent self-diffusion in polymer–solvent systems. J. Polym. Sci. Part B Polym. Phys. 31, 69–76 (1993).

58. 58.

Ehmann, H. M. A., Zimmer, A., Roblegg, E. & Werzer, O. Morphologies in Solvent-Annealed Clotrimazole Thin Films Explained by Hansen-Solubility Parameters. Cryst. Growth Des. 14, 1386–1391 (2014).

59. 59.

Nečas, D. & Klapetek, P. Gwyddion: an open-source software for SPM data analysis. Cent. Eur. J. Phys. 10, 181–188 (2011).

60. 60.

Lambers, H., Piessens, S., Bloem, A., Pronk, H. & Finkel, P. Natural skin surface pH is on average below 5, which is beneficial for its resident flora. Int. J. Cosmet. Sci. 28, 359–370 (2006).

61. 61.

Unger, K., Resel, R. & Coclite, A. M. Dynamic Studies on the Response to Humidity of Poly (2-hydroxyethyl methacrylate) Hydrogels Produced by Initiated Chemical Vapor Deposition. Macromol. Chem. Phys. 217, 2372–2379 (2016).

## Acknowledgements

The work was funded by the Austrian Science Fund (FWF): [P25541-N19]. The authors want to thank the BioTechMed Graz. Part of the research was supported by funding from the European Research Council (ERC) under the European Union’s Horizon 2020 research and innovation programme (grant agreement 715403).

## Author information

Authors

### Contributions

P.C. performed the polymer synthesis and characterization, analyzed the data and wrote the paper. A.M.C. and O.W. supervised the project and wrote the paper. S.T., H.M.A.E., H.R. and O.W. performed dissolution studies and drug characterization.

### Corresponding authors

Correspondence to Paul Christian or Oliver Werzer.

## Ethics declarations

### Competing Interests

The authors declare no competing interests.

Publisher's note: Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

## Rights and permissions

Reprints and Permissions

Christian, P., Tumphart, S., Ehmann, H.M.A. et al. Controlling Indomethacin Release through Vapor-Phase Deposited Hydrogel Films by Adjusting the Cross-linker Density. Sci Rep 8, 7134 (2018). https://doi.org/10.1038/s41598-018-24238-w

• Accepted:

• Published:

• ### Spatio-temporal dynamics of EEG features during sleep in major depressive disorder after treatment with escitalopram: a pilot study

• Li Wu
• , Xue-Qin Wang
• , Yong Yang
• , Teng-Fei Dong
• , Ling Lei
• , Qi-Qi Cheng
•  & Su-Xia Li

BMC Psychiatry (2020)

• ### Initiated Chemical Vapor Deposition of Crosslinked Organic Coatings for Controlling Gentamicin Delivery

• Gianfranco Decandia
• , Fabio Palumbo
• , Annalisa Treglia
• , Vincenza Armenise
• , Pietro Favia
• , Federico Baruzzi
• , Katrin Unger
• , Alberto Perrotta
•  & Anna Maria Coclite

Pharmaceutics (2020)

• ### Chemically vapor deposited polymer nanolayers for rapid and controlled permeation of molecules and ions

• Karen K. Gleason

Journal of Vacuum Science & Technology A (2020)

• ### Drug release from thin films encapsulated by a temperature-responsive hydrogel

• Oliver Werzer
• , Stephan Tumphart
• , Roman Keimel
• , Paul Christian
•  & Anna Maria Coclite

Soft Matter (2019)

• ### A thermo-sensitive, injectable and biodegradable in situ hydrogel as a potential formulation for uveitis treatment

• Mengwei Zou
• , Rongrong Jin
• , Yanfei Hu
• , Ying Zhang
• , Haibo Wang
• , Gongyan Liu
• , Yu Nie
•  & Yunbing Wang

Journal of Materials Chemistry B (2019)


text:
Only this week, get the SQL Complete Track of 9 courses in a special prize of $330$89!
Revision
So you think you can count
Round and other functions
14. Function round()
Revision and practice

Instruction

Good! Now that you know how to subtract and divide, we'll talk about other numerical functions. One of them is round(x). This function will round the number within parentheses to the nearest integer number. This is standard mathematical rounding: any decimal part equal to or greater than 0.5 will be rounded up.

SELECT round(account_balance)
FROM character
WHERE id = 1;

The above query will take the account_balance of the character with id = 1 (the account_balance is 899.34) and round it to the nearest integer (899 in this case).

Exercise

For each character, show its name, its account_balance and its account_balance rounded to the nearest integer. Notice how mathematical rounding is applied.


text:
# zbMATH — the first resource for mathematics

##### Examples
 Geometry Search for the term Geometry in any field. Queries are case-independent. Funct* Wildcard queries are specified by * (e.g. functions, functorial, etc.). Otherwise the search is exact. "Topological group" Phrases (multi-words) should be set in "straight quotation marks". au: Bourbaki & ti: Algebra Search for author and title. The and-operator & is default and can be omitted. Chebyshev | Tschebyscheff The or-operator | allows to search for Chebyshev or Tschebyscheff. "Quasi* map*" py: 1989 The resulting documents have publication year 1989. so: Eur* J* Mat* Soc* cc: 14 Search for publications in a particular source with a Mathematics Subject Classification code (cc) in 14. "Partial diff* eq*" ! elliptic The not-operator ! eliminates all results containing the word elliptic. dt: b & au: Hilbert The document type is set to books; alternatively: j for journal articles, a for book articles. py: 2000-2015 cc: (94A | 11T) Number ranges are accepted. Terms can be grouped within (parentheses). la: chinese Find documents in a given language. ISO 639-1 language codes can also be used.

##### Operators
 a & b logic and a | b logic or !ab logic not abc* right wildcard "ab c" phrase (ab c) parentheses
##### Fields
 any anywhere an internal document identifier au author, editor ai internal author identifier ti title la language so source ab review, abstract py publication year rv reviewer cc MSC code ut uncontrolled term dt document type (j: journal article; b: book; a: book article)
Local regression and likelihood. (English) Zbl 0929.62046
Statistics and Computing. New York, NY: Springer. xiii, 290 p. DM 129.00; öS 942.00; sFr 117.50; £49.50; \$ 64.95 (1999).

Suppose a dataset consists of $n$ pairs of observations $\left({x}_{1},{Y}_{1}\right),\phantom{\rule{4pt}{0ex}}\left({x}_{2},{Y}_{2}\right),...,\left({x}_{n},{Y}_{n}\right)$, where $x$ is a (nonrandom) predictor variable (real or vector valued) and $Y$ is a (random) response variable related to the predictor variable. The problem is to predict $Y$ for a fixed value $x$ which may not belong to the set $\left\{{x}_{1},{x}_{2},...,{x}_{n}\right\}$. It is obvious that a kind of interpolation (or perhaps extrapolation) between the points ${x}_{1},{x}_{2},...,{x}_{n}$ is needed, and that those of the points which are nearer to $x$ should play a greater role. If a model of the form $Y=\mu \left(x\right)+\epsilon$ with a deterministic function $\mu$ and random error $\epsilon$ is assumed, the problem is known as that of local regression.

Ch. 2 of the book gives details. For a model of the form “$Y$ has a probability density function $f\left(y,\mu \left(x,\theta \right)\right)$” with given form of $f$ and $\mu \left(x,\theta \right)$, a local maximum likelihood estimate for the parameter $\theta$ may be conctructed. The Local Likelihood Model is discussed in Ch. 4. Similarly one can formulate the problem of local density estimation (Ch. 5), local Survival and Failure Time Analysis (Ch. 6), and so on.

The book gives us a complete and uptodate review of the state of the art. Practical applications and computer software (LOCFIT) are presented in detail.

##### MSC:
 62G08 Nonparametric regression 62-02 Research monographs (statistics) 62F10 Point estimation 62J99 Linear statistical inference 62J02 General nonlinear regression 65C60 Computational problems in statistics
R


text:
# 22. The Infinite¶

## 22.1. Equinumerosity¶

Remember that in Chapter 20 we defined, for each natural number $$n$$, the set $$[n] = \{0, 1, \ldots, n-1\}$$. We then said that a set $$A$$ is finite if there is a bijection between $$A$$ and $$[n]$$ for some $$n$$. A set is said to be infinite if it is not finite.

If $$A$$ and $$B$$ are two finite sets, then they have the same cardinality if and only if there is a bijection between them. It turns out that the same notion of “having the same cardinality” makes sense even if $$A$$ and $$B$$ are not finite.

Definition. Two sets $$A$$ and $$B$$ are said to be equinumerous, written $$A \approx B$$, if there is a bijection between them. Equivalently, we say that $$A$$ and $$B$$ have the same cardinality.

At this stage, saying that $$A$$ and $$B$$ have the same cardinality may sound strange, because it is not clear that there is any object, “the cardinality of $$A$$,” that they both “have.” It turns out that, in set-theoretic foundations, there are certain objects—generalizations of the natural numbers—that one can use to measure the size of an infinite set. There are known as the “cardinal numbers” or “cardinals.” But they are irrelevant to our purposes here. For the rest of this chapter, when we say that $$A$$ and $$B$$ have the same cardinality, we mean neither more nor less than the fact that there is a bijection between them.

The following theorem says, essentially, that equinumerosity is an equivalence relation. (The caveat is that so far we have spoke only of relations between sets, and the collection of all sets is not itself a set.)

Proposition. Let $$A$$, $$B$$, and $$C$$ be any sets.

• $$A \approx A$$.
• If $$A \approx B$$, then $$B \approx A$$.
• If $$A \approx B$$ and $$B \approx C$$ then $$A \approx C$$.

The proof is left as an exercise.

## 22.2. Countably Infinite Sets¶

The set of natural numbers, $$\mathbb{N}$$, is a prototypical example of an infinite set. To see that it is infinite, suppose, on the other hand, that it is finite. This means that there is a bijection $$f$$ between $$\mathbb{N}$$ and $$[n]$$ for some natural number $$n$$. We can restrict to the subset $$[n+1]$$ of $$\mathbb{N}$$, and thereby obtain an injective map from $$[n+1]$$ to $$[n]$$. But this violates the pigeonhole principle, proved in Chapter 20.

Definition. A set is said to be countably infinite if it is equinumerous with $$\mathbb{N}$$. A set is said to be countable if it is finite or countably infinite.

Since the identity map $$id(x) = x$$ is a bijection on any set, every set is equinumerous with itself, and thus $$\mathbb{N}$$ itself is countably infinite.

The term “countably infinite” is meant to be evocative. Suppose $$A$$ is a countable set. By definition, there is a bijection $$f : \mathbb{N} \to A$$. So $$A$$ has a “first” element $$f(0)$$, a “second” element $$f(1)$$, a “third” element $$f(2)$$, and so on. Since $$f$$ is a bijection, for every element $$a$$ of $$A$$, $$a$$ is the $$n$$th element enumerated in this way, for a unique value of $$n$$. That is, each element of $$A$$ is “counted” at some finite stage.

With this definition in hand, it is natural to wonder which of our favorite sets are countable. Is the set of integers $$\mathbb{Z}$$ countable? How about the set of rationals $$\mathbb{Q}$$, or the set of reals $$\mathbb{R}$$? At this point, you should reflect on the logical form of the statement “$$A$$ is countable,” and think about what is required to show that a set $$A$$ does or does not have this property.

Theorem. The set of integers, $$\mathbb{Z}$$, is countable.

Proof. We need to show that there exists a bijection between $$\mathbb{N}$$ and $$\mathbb{Z}$$. Define $$f : \mathbb{N} \to \mathbb{Z}$$ as follows:

$\begin{split}f(n) = \begin{cases} n / 2 & \mbox{if n is even} \\ -(n + 1) / 2 & \mbox{if n is odd.} \end{cases}\end{split}$

We claim that $$f$$ is a bijection. To see that it is injective, suppose $$f(m) = f(n)$$. If $$f(m)$$ (and hence also $$f(n)$$) is nonnegative, then $$m$$ and $$n$$ are even, in which case $$m / 2 = n / 2$$ implies $$m = n$$. Otherwise, $$m$$ and $$n$$ are odd, and again $$-(m+1) / 2 = -(n+1)/ 2$$ implies $$m = n$$.

To see that $$f$$ is surjective, suppose $$a$$ is any integer. If $$a$$ is nonnegative, then $$a = f(2 a)$$. If $$a$$ is strictly negative, then $$2 a - 1$$ is also strictly negative, and hence $$-(2 a - 1)$$ is an odd natural number. In that case, it is not hard to check that $$a = f(-(2a - 1))$$.

We will now build up an arsenal of theorems that we can use to show that various sets are countable.

Theorem. A set $$A$$ is countable if and only if $$A$$ is empty or there is a surjective function $$f : \mathbb{N} \to A$$.

Proof. For the forward direction, suppose $$A$$ is countable. Then it is either finite or countably infinite. If $$A$$ is countably infinite, there is a bijection from $$\mathbb{N}$$ to $$A$$, and we are done. Suppose, then, that $$A$$ is finite. If $$A$$ is empty, we are done. Otherwise, for some $$n$$, there is a bijection $$f : [n] \to A$$, with $$n \geq 1$$. Define a function $$g : \mathbb{N} \to A$$ as follows:

$\begin{split}g(i) = \begin{cases} f(i) & \mbox{if i < n} \\ f(0) & \mbox{otherwise.} \end{cases}\end{split}$

In other words, $$g$$ enumerates the elements of $$A$$ by using $$f$$ first, and then repeating the element $$f(0)$$. Clearly $$f$$ is surjective, as required.

In the other direction, if $$A$$ is finite, then it is countable, and we are done. So suppose $$A$$ is not finite. Then it is not empty, and so there is a surjective function $$f : \mathbb{N} \to A$$. We need to turn $$f$$ into a bijective function. The problem is that $$f$$ may not be injective, which is to say, elements in $$A$$ may be enumerated more than once. The solution is to define a function, $$g$$, which eliminates all the duplicates. The idea is that $$g$$ should enumerate the elements $$f(0), f(1), f(2), \ldots$$, but skip over the ones that have already been enumerated.

To be precise, the function $$g$$ is defined recursively as follows: $$g(0) = f(0)$$, and for every $$i$$, $$g(i+1) = f(j)$$, where $$j$$ is the least natural number such that $$f(j)$$ is not among $$\{g(0), g(1), g(2), \ldots, g(i) \}$$. The assumption that $$A$$ is infinite and $$f$$ is surjective guarantees that some such $$j$$ always exists.

We only need to check that $$g$$ is a bijection. By definition, for every $$i$$, $$g(i+1)$$ is different from $$g(0), \ldots, g(i)$$. This implies that $$g$$ is injective. But we can also show by induction that for every $$i$$, $$\{g(0), \ldots, g(i)\} \supseteq \{ f(0), \ldots, f(i)\}$$. Since $$f$$ is surjective, $$g$$ is too.

In a manner similar to the way we proved that the integers are countable, we can prove the following:

Theorem. If $$A$$ and $$B$$ are countably infinite, then so is $$A \cup B$$.

Proof. Suppose $$f : \mathbb{N} \to A$$ and $$g : \mathbb{N} \to B$$ are surjective. Then we can define a function $$h : \mathbb{N} \to A \cup B$$:

$\begin{split}h(n) = \begin{cases} f(n/2) & \mbox{if n is even} \\ g((n-1)/2) & \mbox{if n is odd.} \end{cases}\end{split}$

It is not hard to show that $$h$$ is surjective.

Intuitively, if $$A = \{ f(0), f(1), f(2), \ldots \}$$ and $$B = \{ g(0), g(1), g(2), \ldots\}$$, then we can enumerate $$A \cup B$$ as $$\{ f(0), g(0), f(1), g(1), f(2), g(2), \ldots \}$$.

The next two theorems are also helpful. The first says that to show that a set $$B$$ is countable, it is enough to “cover” it with a surjective function from a countable set. The second says that to show that a set $$A$$ is countable, then it is enough to embed it in a countable set.

Theorem. If $$A$$ is countable and $$f : A \to B$$ is surjective, then $$B$$ is countable.

Proof. If $$A$$ is countable, then there is a surjective function $$g : \mathbb{N} \to A$$, and $$f \circ g$$ is a surjective function from $$\mathbb{N} \to B$$.

Theorem. If $$B$$ is countable and $$f : A \to B$$ is injective, then $$A$$ is countable.

Proof. Assuming $$f : A \to B$$ is injective, it has a left inverse, $$g : B \to A$$. Since $$g$$ has a right inverse, $$f$$, we know that $$g$$ is surjective, and we can apply the previous theorem.

Corollary. If $$B$$ is countable and $$A \subseteq B$$, then $$A$$ is countable.

Proof. The function $$f : A \to B$$ defined by $$f(x) = x$$ is injective.

Remember that $$\mathbb{N} \times \mathbb{N}$$ is the set of ordered pairs $$(i, j)$$ where $$i$$ and $$j$$ are natural numbers.

Theorem. $$\mathbb{N} \times \mathbb{N}$$ is countable.

Proof. Enumerate the elements as follows:

$(0, 0), (1, 0), (0, 1), (2, 0), (1, 1), (1, 2), (3, 0), (2, 1), (1, 2), (0, 3), \ldots$

If you think of the pairs as coordinates in the $$x$$-$$y$$ plane, the pairs are enumerated along diagonals: first the diagonal with pairs whose elements sum to $$0$$, then the diagonal with pairs whose elements sum to $$1$$, and so on. This is often called a “dovetailing” argument, because if you imagine drawing a line that weaves back and forth through the pairs enumerated this ways, it will be analogous to the a carpenter’s practice of using a dovetail to join two pieces of wood. (And that term, in turn, comes from the similarity to a dove’s tail.)

As far as proofs go, the informal description above and the associated diagram are perfectly compelling. It is possible to describe a bijection between $$\mathbb{N} \times \mathbb{N}$$ explicitly, however, in algebraic terms. You are asked to do this in the exercises.

The previous theorem has a number of interesting consequences.

Theorem. If $$A$$ and $$B$$ are countable, then so is $$A \times B$$.

Proof. If $$p$$ is any element of $$\mathbb{N} \times \mathbb{N}$$, write $$p_0$$ and $$p_1$$ to denote the two components. Let $$f : \mathbb{N} \to \mathbb{N} \times \mathbb{N}$$ be a surjection, as guaranteed by the previous theorem. Suppose $$g : \mathbb{N} \to A$$ and $$h : \mathbb{N} \to B$$ be surjective. Then the function $$k(i) = ( g(f(i)_0), h(f(i)_1) )$$ is a surjective function from $$\mathbb{N}$$ to $$A \times B$$.

Theorem. The set of rational numbers, $$\mathbb{Q}$$, is countable.

Proof. By the previous theorem, we know that $$\mathbb{Z} \times \mathbb{Z}$$ is countable. Define $$f : \mathbb{Z} \times \mathbb{Z} \to \mathbb{Q}$$ by

$\begin{split}f(i,j) = \begin{cases} i / j & \mbox{if j \neq 0} \\ 0 & \mbox{otherwise.} \end{cases}\end{split}$

Since every element of $$\mathbb{Q}$$ can be written as $$i / j$$ for some $$i$$ and $$j$$ in $$\mathbb{Z}$$, $$f$$ is surjective.

Theorem. Suppose that $$A$$ is countable. For each $$n$$, the set $$A^n$$ is countable.

Proof. Remember that we can identify the set of $$n$$-tuples of elements from $$A$$ with $$A \times \ldots \times A$$, where there are $$n$$ copies of $$A$$ in the product. The result follows using induction on $$n$$.

Theorem. Let $$(A_i)_{i \in \mathbb{N}}$$ be a family of sets indexed by the natural numbers, and suppose that each $$A_i$$ is countable. Then $$\bigcup_i A_i$$ is countable.

Proof. Suppose for each $$i$$, $$f_i$$ is a surjective function from $$\mathbb{N}$$ to $$A_i$$. Then the function $$g(i, j) = f_i(j)$$ is a surjective function from $$\mathbb{N} \times \mathbb{N}$$ to $$\bigcup_i A_i$$.

Theorem. Suppose that $$A$$ is countable. Then the set of finite sequences of elements of $$A$$ is countable.

Proof. The set of finite sequences of elements of $$A$$ is equal to $$\bigcup_i A^i$$, and we can apply the previous two theorems.

Notice that the set of all alphanumeric characters and punctuation (say, represented as the set of all ASCII characters) is finite. Together with the last theorem, this implies that there are only countably many sentences in the English language (and, indeed, any language in which sentences are represented by finite sequences of symbols, chosen from any countable stock).

At this stage, it might seem as though everything is countable. In the next section, we will see that this is not the case: the set of real numbers, $$\mathbb{R}$$, is not countable, and if $$A$$ is any set (finite or infinite), the powerset of $$A$$, $${\mathcal P}(A)$$, is not equinumerous with $$A$$.

## 22.3. Cantor’s Theorem¶

A set $$A$$ is uncountable if it is not countable. Our goal is to prove the following theorem, due to Georg Cantor.

Theorem. The set of real numbers is uncountable.

Proof. Remember that $$[0,1]$$ denotes the closed interval $$\{ r \in \mathbb{R} \mid 0 \leq r \leq 1\}$$. It suffices to show that there is no surjective function $$f : \mathbb{N} \to [0,1]$$, since if $$\mathbb{R}$$ were countable, $$[0,1]$$ would be countable too.

Recall that every real number $$r \in [0,1]$$ has a decimal expansion of the form $$r = 0.r_0 r_1 r_2 r_3 r_4 \ldots$$, where each $$r_i$$ is a digit in $$\{0, 1, \ldots, 9\}$$. More formally, we can write $$r = \sum_{i = 0}^\infty \frac{r_i}{10^{i}}$$ for each $$r \in \mathbb{R}$$ with $$0 \leq r \leq 1$$.

(Notice that $$1$$ can be written $$0.9999\ldots$$. In general every other rational number in $$[0,1]$$ will have two representations of this form; for example, $$0.5 = 0.5000\ldots = 0.49999\ldots$$. For concreteness, for these numbers we can choose the representation that ends with zeros.)

As a result, we can write

• $$f(0) = 0.r^0_0 r^0_1 r^0_2 r^0_3 r^0_4 \ldots$$
• $$f(1) = 0.r^1_0 r^1_1 r^1_2 r^1_3 r^1_4 \ldots$$
• $$f(2) = 0.r^2_0 r^2_1 r^2_2 r^2_3 r^2_4 \ldots$$
• $$f(3) = 0.r^3_0 r^3_1 r^3_2 r^3_3 r^3_4 \ldots$$
• $$f(4) = 0.r^4_0 r^4_1 r^4_2 r^4_3 r^4_4 \ldots$$

(We use superscripts, $$r^i$$, to denote the digits of $$f(i)$$. The superscripts do not mean the “$$i$$th power.”)

Our goal is to show that $$f$$ is not surjective. To that end, define a new sequence of digits $$(r_i)_{i \in \mathbb{N}}$$ by

$\begin{split}r_i = \begin{cases} 7 & \mbox{if r^i_i \neq 7} \\ 3 & \mbox{otherwise.} \end{cases}\end{split}$

The define the real number $$r = 0.r_0 r_1 r_2 r_3 \ldots$$. Then, for each $$i$$, $$r$$ differs from $$f(i)$$ in the $$i$$th digit. But this means that for every $$i$$, $$f(i) \neq r$$. Since $$r$$ is not in the range of $$f$$, we see that $$f$$ is not surjective. Since $$f$$ was arbitrary, there is no surjective function from $$\mathbb{N}$$ to $$[0,1]$$.

(We chose the digits $$3$$ and $$7$$ only to avoid $$0$$ and $$9$$, to avoid the case where, for example, $$f(0) = 0.5000\ldots$$ and $$r = 0.4999\ldots$$. Since there are no zeros or nines in $$r$$, since the $$i$$th digit of $$r$$ differs from $$f(i)$$, it really is a different real number.)

This remarkable proof is known as a “diagonalization argument.” We are trying to construct a real number with a certain property, namely, that it is not in the range of $$f$$. We make a table of digits, in which the rows represent infinitely many constraints we have to satisfy (namely, that for each $$i$$, $$f(i) \neq r$$), and the columns represent opportunities to satisfy that constraint (namely, by choosing the $$i$$th digit of $$r$$ appropriately). Then we complete the construction by stepping along the diagonal, using the $$i$$th opportunity to satisfy the $$i$$th constraint. This technique is used often in logic and computability theory.

The following provides another example of an uncountable set.

Theorem. The power set of the natural numbers, $${\mathcal P}(\mathbb{N})$$, is uncountable.

Proof. Let $$f : \mathbb{N} \to {\mathcal P}(\mathbb{N})$$ be any function. Once again, our goal is to show that $$f$$ is not surjective. Let $$S$$ be the set of natural numbers, defined as follows:

$S = \{ n \in \mathbb{N} \mid n \notin f(n) \}.$

In words, for every natural number, $$n$$, $$n$$ is in $$S$$ if and only if it is not in $$f(n)$$. Then clearly for every $$n$$, $$f(n) \neq S$$. So $$f$$ is not surjective.

We can also view this as a diagonalization argument: draw a table with rows and columns indexed by the natural numbers, where the entry in the $$i$$th row and $$j$$th column is “yes” if $$j$$ is an element of $$f(i)$$, and “no” otherwise. The set $$S$$ is constructed by switching “yes” and “no” entries along the diagonal.

In fact, exactly the same argument yields the following:

Theorem. For every set $$A$$, there is no surjective function from $$A$$ to $${\mathcal P}(A)$$.

Proof. As above, if $$f$$ is any function from $$A$$ to $${\mathcal P}(A)$$, the set $$S = \{ a \in A \mid a \notin f(a) \}$$ is not in the range of $$f$$.

This shows that there is an endless hierarchy of infinities. For example, in the sequence $$\mathbb{N}, {\mathcal P}(\mathbb{N}), {\mathcal P}({\mathcal P}(\mathbb{N})), \ldots$$, there is an injective function mapping each set into the next, but no surjective function. The union of all those sets is even larger still, and then we can take the power set of that, and so on. Set theorists are still today investigating the structure within this hierarchy.

## 22.4. An Alternative Definition of Finiteness¶

One thing that distinguishes the infinite from the finite is that an infinite set can have the same size as a proper subset of itself. For example, the natural numbers, the set of even numbers, and the set of perfect squares are all equinumerous, even though the latter two are strictly contained among the natural numbers.

In the nineteenth century, the mathematician Richard Dedekind used this curious property to define what it means to be finite. We can show that his definition is equivalent to ours, but the proof requires the axiom of choice.

Definition. A set is $$A$$ Dedekind infinite if $$A$$ is equinumerous with a proper subset of itself, and Dedekind finite otherwise.

Theorem. A set is Dedekind infinite if and only it is infinite.

Proof. Suppose $$A$$ is Dedekind infinite. We need to show it is not finite; suppose, to the contrary, it is bijective with $$[n]$$ for some $$n$$. Composing bijections, we have that $$[n]$$ is bijective with a proper subset of itself. This means that there is an injective function $$f$$ from $$[n]$$ to a proper subset of $$n$$. Modifying $$f$$, we can get an injective function from $$[n]$$ into $$[n-1]$$, contradicting the pigeonhole principle.

Suppose, on the other hand, that $$A$$ is infinite. We need to show that there is an injective function $$f$$ from $$A$$ to a proper subset of itself (because then $$f$$ is a bijection between $$A$$ and the range of $$f$$). Choose a sequence of distinct element $$a_0, a_1, a_2, \ldots$$ of $$A$$. Let $$f$$ map each $$a_i$$ to $$a_{i+1}$$, but leave every other element of $$A$$ fixed. Then $$f$$ is injective, but $$a_0$$ is not in the range of $$f$$, as required.

## 22.5. The Cantor-Bernstein Theorem¶

Saying that $$A$$ and $$B$$ are equinumerous means, intuitively, that $$A$$ and $$B$$ have the same size. There is also a natural way of saying that $$A$$ is not larger than $$B$$:

Definition. For two sets $$A$$ and $$B$$, we say the cardinality of $$A$$ is less than or equal to the cardinality of $$B$$, written $$A \preceq B$$, when there is an injection $$f : A \to B$$.

As an exercise, we ask you to show that $$\preceq$$ is a preorder, which is to say, it is reflexive and transitive. Here is a natural question: does $$A \preceq B$$ and $$B \preceq A$$ imply $$A \approx B$$? In other words, assuming there are injective functions $$f : A \to B$$ and $$g : B \to A$$, is there necessarily a bijection from $$A$$ to $$B$$?

The answer is “yes,” but the proof is tricky. The result is known as the Cantor-Bernstein Theorem, and we state it without proof.

Theorem. For any sets $$A$$ and $$B$$, if $$A \preceq B$$ and $$B \preceq A$$, then $$A \approx B$$.

## 22.6. Exercises¶

1. Show that equinumerosity is reflexive, symmetric, and transitive.

2. Show that the function $$f(x) = x / (1 - x)$$ is a bijection between the interval $$[0,1)$$ and $$\mathbb{R}^{\geq 0}$$.

3. Show that the $$g(x) = x / (1 - |x|)$$ gives a bijection between $$(-1, 1)$$ and $$\mathbb{R}$$.

4. Define a function $$J : \mathbb{N} \times \mathbb{N} \to \mathbb{N}$$ by $$J(i,j) = \frac{(i + j)(i + j + 1)}{2} + i$$. This goal of this problem is to show that $$J$$ is a bijection from $$\mathbb{N} \times \mathbb{N}$$ to $$\mathbb{N}$$.

1. Draw a picture indicating which pairs are sent to $$0, 1, 2, \ldots$$.
2. Let $$n = i + j$$. Show that $$J(i,j)$$ is equal the number of pairs $$(u, v)$$ such that either $$u + v < n$$, or $$u + v = n$$ and $$u < i$$. (Use the fact that $$1 + 2 + \ldots + n = n(n+1)/2$$.)
3. Conclude that $$J$$ is surjective: to find $$i$$ and $$j$$ such that $$J(i,j) = k$$, it suffices to find the largest $$n$$ such that $$n(n+1)/2 \leq k$$, let $$i = k - n(n+1)/2$$, and let $$j = n - i$$.
4. Conclude that $$J$$ is injective: if $$J(i,j) = J(i',j')$$, let $$n = i + j$$ and $$n' = i' + j'$$. Argue that $$n = n'$$, and so $$i = i'$$ and $$j = j'$$.
5. Let $$S$$ be the set of functions from $$\mathbb{N}$$ to $$\{ 0, 1\}$$. Use a diagonal argument to show that $$S$$ is uncountable. (Notice that you can think of a function $$f: \mathbb{N} \to \{0, 1\}$$ as an infinite sequence of 0’s and 1’s, given by $$f(0), f(1), f(2), \ldots$$. So, given a function $$F(n)$$ which, for each natural number $$n$$, returns an infinite sequence of 0’s and 1’s, you need to find a sequence that is not in the image of $$F$$.)

6. If $$f$$ and $$g$$ are functions from $$\mathbb{N}$$ to $$\mathbb{N}$$, say that $$g$$ eventually dominates $$f$$ if there is some $$n$$ such that for every $$m \geq n$$, $$g(m) > f(m)$$. In other words, from some point on, $$g$$ is bigger than $$f$$.

Show that if $$f_0, f_1, f_2, \ldots$$ is any sequence of functions from $$\mathbb{N}$$ to $$\mathbb{N}$$, indexed by the natural numbers, then there is a function $$g$$ that eventually dominates each $$f_i$$. (Hint: construct $$g$$ so that for each $$i$$, $$g(n) > f_i(n)$$ for every $$n \geq i$$.)

7. Show that the relation $$\preceq$$ defined in Section 22.5 is reflexive and transitive.


text:
# How to make screen zoom little much less dreadful?

You recognize just how you zoom - in entire screen with your magic - trackpad+ctrl+2fingers in snow leopard?

The outcome is not - so - wonderful - looking screen. You can see pixels and also primarily the resolution is crapy ... just how do I deal with that?

0
2019-12-02 03:08:34
Source Share

There is no other way of dealing with that. It is multiplying the screen, not a real resolution independent zoom, so as points multiply they will certainly show up heavyset.

0
2019-12-03 04:57:54
Source

You can make display little smooth in Pref panes > Universal Access > Seeing tab > Zoom options… > Check Smooth images (or type ⌥⌘\) yet RobZolkos right.

0
2019-12-03 04:57:41
Source

I do not assume it is dreadful!

I periodically do some visuals and also website design job, and also I do a great deal of digital photography, and also when I respect pixels the convenience with which I can focus and also see plainly what is taking place down there is wonderful.

Additionally, as a little a typography geek, I such as to look at the below - pixel antialiasing that is taking place :B

0
2019-12-03 04:57:11
Source

As kept in mind in the previous solutions, the os does not re - provide the details at a finer degree of information - it resembles holding a magnifying glass on a published web page simply reveals bigger information as opposed to making the printing finer.

The only means to "fix" the zoom is to make the Mac draw points bigger and also allow you scroll around to see a window of the bigger details.

What you desire is called an Oversized Desktop. Primarily you fool the system right into sending out information to the graphics card to provide a 2000x1024 sized desktop. After that your computer mouse or various other commands control and also a viewport of 1440x900 with several of the information attracted offscreen.

I do not recognize of a solitary program that collaborates with 10.5 or later on - yet at the very least you recognize what to seek and also this could trigger somebody else with a referral.

0
2019-12-03 04:55:37
Source


text:
# Why is the derivative multiplication by frequency in Laplace transform?

Why is the time-domain derivative equivalent to multiplication by frequency ($s$) in the Laplace transform?

Why is the time-domain integral equivalent to division by frequency ($\frac{1}{s}$) in the Laplace transform?

Intuitively, I thought the reason was that the frequency was a sort of "rate of change", so it was somehow equivalent to $\frac{df}{dt}$. The Laplace transform turns rate of change into a variable ($s$), and holds that rate of change constant throughout the problem, which is why algebraic manipulations in the frequency domain are possible.

Am I on the right track?

-
Beware: the Laplace transform of the derivative is not always $s$ times the Laplace transform of the function. –  Did Nov 12 '11 at 20:19

Dimension analysis!

If $t$ is a unit of time, $ts$ must be dimensionless for $\mathrm e^{-ts}$ to exist hence $s$ is the inverse of a time. Since the derivative of $f$ is a limit of ratios of values of $f$ divided by times, $f'$ has the dimension of $f$ times $s$ and its integral should have the dimension of the similar integral of $f$ times $s$. That is, the Laplace transform of $f'$ should have the dimension of $s$ times the Laplace transform of $f$. Likewise for the integral of $f$, which has the dimension of $t$ times the dimension of $f$, hence the Laplace transform of the integral of $f$ should have the dimension of $s^{-1}$ times the Laplace transform of $f$..

-

One way to remember it is that if you think of the integral in the inverse formula as a sort of sum (completely non-rigorous here):

$$f(t) = c_1 e^{s_1 t} + c_2 e^{s_2 t} + c_3 e^{s_3 t} + \cdots$$

Here the coefficient $c_1$ is proportional to the Laplace transform at $s_1$, and so on. Then since the derivative of $e^{st}$ with respect to $t$ is $se^{st}$, you get that the coefficients in the sum are multiplied by $s$ when you take the derivative:

$$f'(t) = c_1 s_1 e^{s_1 t} + c_2 s_2 e^{s_2 t} + c_3 s_3 e^{s_3 t} + \cdots$$

Conversely, integrating $f$ multiplies the coefficients by $1/s$. Again, this is not in any way a proof, but hopefully it gives some intuition.

Another way to think about it is that the smoothness of a function is related to its decay in the frequency domain as $s \to \infty$. Differentiating makes a function less smooth, (a twice differentiable function becomes onces differentiable, etc.) while integrating makes a function more smooth (a bounded discontinuous function becomes continuous, etc.). So it makes sense that differentiation would make a function decay slower in the frequency domain, in the sense that $1/s$ decays slower than $1/s^2$.

-

I had a similar question here and came to the following conclusion:

The Laplace transform involves the exponential function: e^n*x.

Differentiating this means n*e^n*x - which is simply multiplication by n.

Integrating this means 1/n*e^n*x - which is simply division by n.

This holds true for power series which are the discrete form of integral transforms (sort of) and originally stems from the power rule (for differentiation) - although you would have a pesky division by the base using "ordinary" power terms. This is prevented by using the exponential function.

-
$$\mathcal{L} \{ t^n f(t) \} = (-1)^n \frac{d^n}{ds^n} \mathcal{L}\{f(t)\}$$
$$\mathcal{L}^{-1} \left\{ \frac{F(s)}{s^n} \right\} = \int_0^t {\underbrace \cdots _n} \int_0^t {f\left( t \right)dt^n}$$
i.e, multplying by $t$ means a derivation in terms of $s$ and dividing by $s$ means an integration in terms of $t$.


text:
import numpy as np
import pandas as pd

## Basics of deep learning and neural networks

• Interactions
• Neural Networks account for interactions really well
• Deep Learning uses especially powerful neural networks
• Text, Images, Videos, Audio, Source Code, etc..

## Forward propagation

• Forward propagation
• Dot product
• Forward propagation for one data at a time
• Output is the prediction for that data point

### Coding the forward propagation algorithm

In this exercise, you'll write code to do forward propagation (prediction) for your first neural network:

Each data point is a customer. The first input is how many accounts they have, and the second input is how many children they have. The model will predict how many transactions the user makes in the next year.

input_data = np.array([3, 5])
weights = {'node_0': np.array([2, 4]),
'node_1': np.array([ 4, -5]),
'output': np.array([2, 7])}

node_0_value = (input_data * weights['node_0']).sum()

# Calculate node 1 value: node_1_value
node_1_value = (input_data * weights['node_1']).sum()

# Put node values into array: hidden_layer_outputs
hidden_layer_outputs = np.array([node_0_value, node_1_value])

# Calculate output: output
output = (hidden_layer_outputs * weights['output']).sum()

# Print output
print(output)

-39

## Activation functions

• Linear vs. Nonlinear Functions
• Activation function
• Applied to node inputs to produce node output

### The Rectified Linear Activation Function

An "activation function" is a function applied at each node. It converts the node's input into some output.

The rectified linear activation function (called ReLU) has been shown to lead to very high-performance networks. This function takes a single number as an input, returning 0 if the input is negative, and the input if the input is positive.

def relu(input):
'''Define your relu activatino function here'''
# Calculate the value for the output of the relu function: output
output = max(0, input)

# Return the value just calculate
return output

# Calculate node 0 value: node_0_output
node_0_input = (input_data * weights['node_0']).sum()
node_0_output = relu(node_0_input)

# Calculate node 1 value: node_1_output
node_1_input = (input_data * weights['node_1']).sum()
node_1_output = relu(node_1_input)

# Put node values into array: hidden_layer_outputs
hidden_layer_outputs = np.array([node_0_output, node_1_output])

# Calculate model output (do not apply relu)
model_output = (hidden_layer_outputs * weights['output']).sum()

# Print model output
print(model_output)

52

### Applying the network to many observations/rows of data

You'll now define a function called predict_with_network() which will generate predictions for multiple data observations, which are pre-loaded as input_data. As before, weights are also pre-loaded. In addition, the relu() function you defined in the previous exercise has been pre-loaded.

input_data = [np.array([3, 5]), np.array([ 1, -1]),
np.array([0, 0]), np.array([8, 4])]

def predict_with_network(input_data_row, weights):
# Calculate node 0 value
node_0_input = (input_data_row * weights['node_0']).sum()
node_0_output = relu(node_0_input)

# Calculate node 1 value
node_1_input = (input_data_row * weights['node_1']).sum()
node_1_output = relu(node_1_input)

# Put node values into array: hidden_layer_outputs
hidden_layer_outputs = np.array([node_0_output, node_1_output])

# Calculate model output
input_to_final_layer = (hidden_layer_outputs * weights['output']).sum()
model_output = relu(input_to_final_layer)

# Return model output
return(model_output)

# Create empty list to store prediction results
results = []
for input_data_row in input_data:
# Append prediction to results
results.append(predict_with_network(input_data_row, weights))

# Print results
print(results)

[52, 63, 0, 148]

## Deeper networks

• Representation learning
• Deep networks internally build representations of patterns in the data
• Partially replace the need for feature engnerring
• Subsequent layers build increasingly sophisticated representatios of raw data
• Deep learning
• Modeler doesn't need to specify the interactions
• When you train the model, the neural network gets weights that find the relevant patterns to make better predictions

### Multi-layer neural networks

In this exercise, you'll write code to do forward propagation for a neural network with 2 hidden layers. Each hidden layer has two nodes. The input data has been preloaded as input_data. The nodes in the first hidden layer are called node_0_0 and node_0_1. Their weights are pre-loaded as weights['node_0_0'] and weights['node_0_1'] respectively.

The nodes in the second hidden layer are called node_1_0 and node_1_1. Their weights are pre-loaded as weights['node_1_0'] and weights['node_1_1'] respectively.

We then create a model output from the hidden nodes using weights pre-loaded as weights['output'].

input_data = np.array([3, 5])
weights = {'node_0_0': np.array([2, 4]),
'node_0_1': np.array([ 4, -5]),
'node_1_0': np.array([-1,  2]),
'node_1_1': np.array([1, 2]),
'output': np.array([2, 7])}

def predict_with_network(input_data):
# Calculate node 0 in the first hidden layer
node_0_0_input = (input_data * weights['node_0_0']).sum()
node_0_0_output = relu(node_0_0_input)

# Calculate node 1 in the first hidden layer
node_0_1_input = (input_data * weights['node_0_1']).sum()
node_0_1_output = relu(node_0_1_input)

# Put node values into array: hidden_0_outputs
hidden_0_outputs = np.array([node_0_0_output, node_0_1_output])

# Calculate node 0 in the second hidden layer
node_1_0_input = (hidden_0_outputs * weights['node_1_0']).sum()
node_1_0_output = relu(node_1_0_input)

# Calculate node 1 in the second hidden layer
node_1_1_input = (hidden_0_outputs * weights['node_1_1']).sum()
node_1_1_output = relu(node_1_1_input)

# Put node values into array: hidden_1_outputs
hidden_1_outputs = np.array([node_1_0_output, node_1_1_output])

# Calculate model output: model_output
model_output = (hidden_1_outputs * weights['output']).sum()

# Return model_output
return model_output

output = predict_with_network(input_data)
print(output)

182