text:
# Fix asinh

XMLWordPrintable

#### Details

• Type: Bug
• Status: Done
• Resolution: Done
• Fix Version/s: None
• Component/s:
• Labels:
• Story Points:
8
• Sprint:
SUIT Sprint 2018-06, SUIT Sprint 2018-07
• Team:
Science User Interface

#### Description

We still do not have asinh quite right, the following should be done:

• Determine what is wrong, maybe why it is wrapping?
• Understand why have a beta parameter exposed to the user and not a Q parameter. You might want to talk to Lijun about this since she did the original work but no longer works for LSST.
• From the UI- determine if we we need a slider entry instead of a number text box entry. Note- when asinh was originally done we had not yet brought in a slider component. It makes more sense now.
• Work with David Shupe to validate the implementation plan
• FitsRead.java has most of the stretch code as static methods.  Move these out of FitsRead.java into a Stretch.java
• David Shupe thinks we have the same problem with Power law Gamma.  If that is a simple fix after the above work then fix it, otherwise we will make a second ticket.

6/25/2018

This ticket will deal with changing asinh algorithm to be consistent with asinh stretch implemented in https://github.com/lsst/afw/blob/master/python/lsst/afw/display/rgb.py and https://github.com/astropy/astropy/blob/master/astropy/visualization/lupton_rgb.py

The parametrization using Q is explained in the footnote on page 3 of https://arxiv.org/pdf/astro-ph/0312483.pdf

The algorithm will accept Q parameter from 0.1 to 10, which should be controlled by a slider.
The mapping from flux to color value is 255 * 0.1 * asinh(Q*(x-xMin)/(xMax-xMin)) / asinh(0.1*Q)

Below xMin, the color will be 0; above xMax, the equation has to be applied and then clipped to 244 (because we use 255 for blank pixel).

Per David Shupe

Zscale + linear is often used with CCD images to show faint features. I am thinking of Lupton’s asinh as keeping zscale + linear at low values, and bending the stretch function over at intermediate and large intensities. It uses only a fraction of the color range for the max value from zscale; but it will show brighter features above zscale.
Lupton’s formulation assumes that xMax is far below the bright features in the image. He wants to see the features above xMax as computed by zscale. This is different from how I have traditionally thought about these stretches.

________________

The first and last items in the original description above were fixed by DM-14780.

Stretch code will stay in FitsRead.java to avoid conflicts with Lijun's IRSA-1498 ticket, which takes care of code refactoring.

Per David Shupe, it would also be helpful to display boundaries, calculated by z-stretch algorithm rather than the original data boundaries. I will see if I can add the calculated values to z-stretch dialog.

#### Attachments

1. image (3).png
1.06 MB
2. image (4).png
1.00 MB
3. lupton_asinh_example.png
37 kB

#### Activity

Hide
Trey Roby added a comment -

Notes from Robert Lupton

I asked for an disp.scale(asinh, zscale) image which should not saturate at any point.  Why the roll over?

asinh should be your go-to stretch!  If you set Q = 0 you recover linear; Q = InF gets you log.  Q = 10 or so is better than either.  Firefly needs a Q slider

Notes from Jim Bosch

Jim Bosch [6:56 AM]
I think this can probably be reproduced without any particular image; when trying asinh stretches in the GUI, the colorbar always seemed to have some periodicity to it, and I think that's the same thing that's causing this.
It may only happen when the data range is set beyond the min/max of what is actually in the image, but I'm trying to reconstruct what I saw from memory, so take it with a grain of salt.

Show
Trey Roby added a comment - Notes from Robert Lupton  I asked for an disp.scale(asinh, zscale) image which should not saturate at any point.  Why the roll over? asinh should be your go-to stretch!  If you set Q = 0 you recover linear; Q = InF gets you log.  Q = 10 or so is better than either.  Firefly needs a Q slider   Notes from Jim Bosch Jim Bosch [6:56 AM] I think this can probably be reproduced without any particular image; when trying asinh stretches in the GUI, the colorbar always seemed to have some periodicity to it, and I think that's the same thing that's causing this. It may only happen when the data range is set beyond the min/max of what is actually in the image, but I'm trying to reconstruct what I saw from memory, so take it with a grain of salt.
Hide
David Shupe added a comment - - edited

As I recall, the asinh implementation in Firefly is based on code in the IDL atv tool. I think our beta is dataRange / Q, the reciprocal of ._soften in lsst.afw.display.rgb.AsinhMapping.

Our default beta is estimated from noise properties of the image. beta is exposed at the FireflyClient level but not exposed at the display_firefly or FireflyClient levels, right now.

Show
David Shupe added a comment - - edited As I recall, the asinh implementation in Firefly is based on code in the IDL atv tool. I think our beta is dataRange / Q , the reciprocal of ._soften in lsst.afw.display.rgb.AsinhMapping . Our default beta is estimated from noise properties of the image. beta is exposed at the FireflyClient level but not exposed at the display_firefly or FireflyClient levels, right now.
Hide
Tatiana Goldina added a comment -

Our default beta is a standard deviation: sigma = SQRT [ sum ((x_i - x_mean)^2 ) / n ], where x_mean is the mean value of the x array and  n is the total number of the elements in x array.

The mapping function from (xMin, xMax)  to (0, 255) is

 F(x) = 255 * asinh((x - xMin) / beta) / asinh((xMax - xMin) / beta)

Is it how we want it? I am still not clear what the meaning of Q is, and what should be its range, if we make it a slider.

Show
Tatiana Goldina added a comment - Our default beta is a standard deviation:  sigma = SQRT [ sum ((x_i - x_mean)^2 ) / n ] , where x_mean is the mean value of the x array and  n is the total number of the elements in x array. The mapping function from (xMin, xMax)  to (0, 255) is F(x) = 255 * asinh((x - xMin) / beta) / asinh((xMax - xMin) / beta) Is it how we want it? I am still not clear what the meaning of Q is, and what should be its range, if we make it a slider.
Hide
Robert Lupton added a comment -

Look at the original PASP paper, which defines Q.

I don't think you want to set Q from the data, you want to set xMax and xMin (e.g. I support 'asinh', 'zscale' for matplotlib); Q controls the transition from a linear to a logarithmic stretch and typical numbers are 8 to 10.  I think a slider is the way to allow people to control this.

I was surprised to learn that Q isn't exposed in display_firefly; I should have been clearer about the interface.

Show
Robert Lupton added a comment - Look at the original PASP paper, which defines Q. I don't think you want to set Q from the data, you want to set xMax and xMin (e.g. I support  'asinh', 'zscale'  for matplotlib); Q controls the transition from a linear to a logarithmic stretch and typical numbers are 8 to 10.  I think a slider is the way to allow people to control this. I was surprised to learn that Q isn't exposed in display_firefly ; I should have been clearer about the interface.
Hide
David Shupe added a comment -

Tatiana Goldina and I have been looking at the asinh implementations in lsst.afw.display.rgb and in astropy.visualization.lupton_rgb which uses some of the same classes as the LSST code. We think we understand what to implement and we'd like to check our understanding with Robert Lupton,  since these implementations are slightly different from the 2004 PASP paper.

The mapping from image values x to the uint8 will be 255 * asinh(0.1*Q*(x-xMin)/(xMax-xMin)) / asinh(0.1*Q). It is not necessary to specify a separate slope parameter, because the choice of xMax and xMin set the slope at intensities near zero. This parametrization works well with using the zscale algorithm to set xMin and xMax, from looking at HSC data with the display_matplotlib backend.

Do we have this right?

Show
David Shupe added a comment - Tatiana Goldina and I have been looking at the asinh implementations in lsst.afw.display.rgb and in astropy.visualization.lupton_rgb which uses some of the same classes as the LSST code. We think we understand what to implement and we'd like to check our understanding with Robert Lupton ,  since these implementations are slightly different from the 2004 PASP paper. The mapping from image values x to the uint8 will be 255 * asinh(0.1*Q*(x-xMin)/(xMax-xMin)) / asinh(0.1*Q) . It is not necessary to specify a separate slope parameter, because the choice of xMax and xMin set the slope at intensities near zero. This parametrization works well with using the zscale algorithm to set xMin and xMax, from looking at HSC data with the display_matplotlib backend. Do we have this right?
Hide
Robert Lupton added a comment -

That sounds right – thanks.  You still need to be able to set Q independently

Show
Robert Lupton added a comment - That sounds right – thanks.  You still need to be able to set Q independently
Hide
Tatiana Goldina added a comment -
Show
Tatiana Goldina added a comment - Pull request: https://github.com/Caltech-IPAC/firefly/pull/632 Deployment:  https://irsawebdev9.ipac.caltech.edu/dm-14778/firefly/
Hide
David Shupe added a comment -

I've summarized feedback from Vandana Desai on the pull request.

Show
David Shupe added a comment - I've summarized feedback from Vandana Desai on the pull request.

#### People

Assignee:
Tatiana Goldina
Reporter:
Trey Roby
Reviewers:
David Shupe, Trey Roby, Vandana Desai
Watchers:
David Shupe, Emmanuel Joliet, Jim Bosch, Robert Lupton, Tatiana Goldina, Trey Roby, Vandana Desai, Xiuqin Wu [X] (Inactive)


text:
# 3x x ^ 2-4 = 1

Microsoft showed off a new Surface 2-in-1 at its big Surface event called the Surface Pro X. It packs a new system on a chip developed between Microsoft and Qualcomm. It has high performance, particularly in A.I. tasks, with a very low powe

6 - 1 Y 5x . 5 x . Y 1 c ) 6x - 7 . 4x + 3 6x - 4x . 3 + 7 2 x . 10 x . 5.

Check how easy it is, and learn it for the future. Our solution is simple, and easy to understand, so dont hesitate to use it as a solution of your homework. 05/04/2018 Simple and best practice solution for 2x+4=3x-1 equation. Check how easy it is, and learn it for the future.

## solve: [(3x-2)/4] - [(2x+5)/3] = [(1-x)/6] On the first look, you may think that this question looks a bit complex, but if you have ,mastered the basics then you will have absolutely no trouble! Before you jump into this question, you should start by recognising the skills that you are being examined on.

6. −. +. or a system.

### Compute answers using Wolfram's breakthrough technology & knowledgebase, relied on by millions of students & professionals. For math, science, nutrition, history

Respuesta: Las soluciones de la ecuación son: x = ±3. (b) 4x(x  2 Jul 2009 C) ( 2 )4.

हल कीजिए (5x-2)/(3) -(7x-. play. 88356622. 4.2 K. 84.2 K. 1:00. x-x^2-1≠0 è sempre vera perchè questo polinomio ha determinante negativo. x ≠0. Svolgimento dell'equazione: (x^4-3x^2+4)/(x^2-x)+(x^2-x)^2  Câu hỏi: Tập nghiệm của bất phương trình ∣∣3xx2−4∣∣<1 | 3 x x 2 − 4 | < 1 là.

Then add the square of \frac{1}{2} to both sides of the equation. This step makes the left hand side of the equation a perfect square. Compute answers using Wolfram's breakthrough technology & knowledgebase, relied on by millions of students & professionals. For math, science, nutrition, history Free math problem solver answers your algebra, geometry, trigonometry, calculus, and statistics homework questions with step-by-step explanations, just like a math tutor.

You can put this solution on YOUR website! 4/3x-1/2=0, then x= Add to each side; x= Now multiply each side by the reciprocal of , which is x = x= Hope you understand =) Find f'(a) . f(x) = 3x^2 - 4x + 1. Video Transcript. this problem. Number thirty one of the Stuart Calculus eighth edition section two point seven Find at time of a the function of life is every X equals three x squared minus for explosive one.

Check how easy it is, and learn it for the future. Our solution is simple, and easy to understand, so don`t hesitate to … Per questa equazione propongo una semplice discussione grafica. Considerando le due funzioni $y= 3^x-4^{x-1}$ e $y=2^x+1$, le soluzioni si possono determinare intersecando i grafici di queste due funzioni. Come si vede le int FUNZIONI 5 Osservazione. Poiché f (x)= x2 2x se x 0 x2 +2x se x 0, le espressioni delle f 1 i si ricavano risolvendo rispetto a x le equazioni x2 2x = y e x2 +2x = y.Ad esempio, l’unica soluzione x 5( 4, 1] (=domf1) dell’equazione x2 2x y =0 con y ﬁssato in [ 1,+4) (=imf1) è la controimmagine di y tramite f1, ossia l’immagine di y tramite f 1 1, ed è data da x = 1 Divide 1, the coefficient of the x term, by 2 to get \frac{1}{2}. Then add the square of \frac{1}{2} to both sides of the equation. This step makes the left hand side of the equation a perfect square.

2. 1. P(x). 2. 4. 6. −.

ako k tomu snoop dogg
gbp na dolár z nového zélandu
otvorte budúce učenie
coin.png spracovanie obrazu
ako previesť ethereum na hotovostné vyrovnanie
sieťový diagram ethereum
prevod na usd na ron

### (x-2)/4+1/3=x-(2x-1/3) [3(x-2)+4]/12=[3x-(2x-1)]/3 (3x-6+4)/4=3x-2x+1 3x-2=4(x+1) 3x-2=4x+4 4x-3x=4+2 x=6

Our solution is simple, and easy to understand, so … 03/08/2016 Order my "Ultimate Formula Sheet" https://amzn.to/2ZDeifD Hire me for private lessons https://wyzant.com/tutors/jjthetutorRead "The 7 Habits of Successful ST 1−cos2x sin2 3x = lim x→0 1−cos2x (2 x)2 · 3x sin3 2 · 4 9 = 1 2 ·1· 4 9 = 2. Possiamo anche usare lo sviluppo cost = 1− 1 2 t2 + o(t2) per t → 0.

format: plain


text:
Categories

Here, we will examine the technical details of converting LaTeX to HTML, and how to add that capability to an existing project that does not use the template. If you are already using the configuration set up by the template, you can safely ignore this chapter.

This is an excerpt from Better Books with LaTeX the Agile Way. You can get a copy here.

## TeX4ht Configuration

Here, we will examine the technical details of converting LaTeX to HTML, and how to add that capability to an existing project that does not use the template. If you are already using the configuration set up by the template, you can safely ignore this chapter.

To convert LaTeX to HTML, we need an additional compiler, TeX4ht, which works only with pdfLaTeX. If you are using XeLaTeX (or other LaTeX compilers) for your project, you might run into some problems when switching to pdfLaTeX. You can stay compatible with both compilers by using the conditional \ifxetex statement we have discussed in another article and the book.

On the Overleaf platform, no separate installation for TeX4ht is needed. All you need to do is include it by adding a file named latexmkrc in the main directory (and thus overriding the latexmkrc provided by Overleaf by default) of your project and adding a configuration file.

Latexmk ⋅  Latexmk is the build tool Overleaf uses to automatically build your LaTeX project. The configuration file latexmkrc can be used to override build settings and configure compilers for a different output format (like using TeX4ht to generate HTML output in addition to generating a PDF).

First, let us create the latexmkrc file in the main directory of your project and insert this code (depending on your project, if you are not using the template, you might need additional settings from https://www.overleaf.com/help/216-how-does-overleaf-compile-my-project):

$pdflatex = "rm tikz-cache/*.pdf; pdflatex -shell-escape -synctex=1 %O %S; htlatex %S \"htlatex/htlatex.cfg,MyFonts,NoFonts\" \"\" \"\" -shell-escape > output.txt"; END {system(’zip -r allfiles.zip . -x *.cache*’);}  This creates a hook in the compilation chain of LaTeX (LaTeX calls$pdflatex at the end of the compilation). All this does is clear the cache, call pdflatex before calling htlatex, giving you a PDF output (and compilation of TikZ images) in addition to the HTML output. It also writes the output of the compilation of htlatex to a new file called output.txt to be used for debugging. At the end, it zips all the files of your project into the allfiles.zip for later download. You can download the output files (clicking on the Logs and output files icon at the top of the right window, scrolling all the way down to Other logs & files, and selecting the previously created allfiles.zip).

Converting that HTML file into a real e-book format like MOBI or EPUB takes some extra effort as we need to adjust the settings, take care of the table of contents, add a cover, and optimize our images. This is discussed in another article and the book.

## HTML Output Formatting

Unfortunately, TeX4ht cannot do a 1:1 conversion simply because printed books are based on pages while HTML documents and e-books are continuous texts. Also, formatting, spacing, and images are handled differently, so we need to configure this separately. In the listing above, you can see a reference to htlatex.cfg—that is where the TeX4ht configuration resides:

\Preamble{xhtml}  \Configure{VERSION}{} \Configure{DOCTYPE}{\HCode{<!DOCTYPE html>\Hnewline}} \Configure{HTML}{\HCode{\Hnewline}}{\HCode{\Hnewline}} \Configure{@HEAD}{\HCode{<link rel="stylesheet" type="text/css" href="site.css" />\Hnewline}}  % Translate \textbf, \textit and \texttt directives into ,  and  \Configure{emph}{\ifvmode\ShowPar\fi\HCode{}}{\HCode{}} \Configure{textbf}{\ifvmode\ShowPar\fi\HCode{}}{\HCode{}} \Configure{textit}{\ifvmode\ShowPar\fi\HCode{}}{\HCode{}} \Configure{texttt}{\ifvmode\ShowPar\fi\HCode{}}{\HCode{}} \Configure{textsc}{\ifvmode\ShowPar\fi\HCode{}}{\HCode{}}  % Translate verbatim and lstlisting blocks into
 elements \ConfigureEnv{verbatim}{\HCode{
}}{\HCode{
}}{}{} \ConfigureEnv{lstlisting}{\HCode{
}}{\HCode{
}}{}{} \ConfigureEnv{minipage}{\ifvmode\IgnorePar\fi\HCode{
}}{\ifvmode\IgnorePar\fi\HCode{
\Hnewline}}{}{}%  % Do not set ‘indent‘/‘noindent‘ classes on paragraphs \Configure{HtmlPar} {\EndP\Tg
} {\EndP\Tg
} {\HCode{
\Hnewline}} {\HCode{
\Hnewline}} \begin{document} \EndPreamble

What the file does is configure the mapping between LaTeX and HTML. If you are familiar with HTML, you see that you can configure the contents of the output HTML file with the htlatex.cfg file. It starts with setting up the HTML header and then configures how individual LaTeX commands (\emph\textbf\textit, …) should be translated into HTML. For example, text formatted in italics (\textit) is translated into HTML by using the emphasis HTML tag (¡em¿). The \HCode command directly inserts HTML commands in the output file and can also be used in the regular LaTeX files. For example, you can use

\HCode{
}

to directly add a vertical line into the HTML output file and thus the e-book.

CSS ⋅  CSS files determine the final design and appearance of a website (or e-book).

Also, in the htlatex.cfg file, the site.css file is referenced. This can be adjusted according to your needs, although in my experience, some of the following settings work nicely for Kindle e-books:

1. You might want to adapt the sizes of the chapter title and section title fonts:

.chapterHead { font-size: 1.5em; margin-top: 0.83em; margin-bottom: 0.83em; font-weight: bold; text-align: left; } .sectionHead { font-size: 1.17em; margin-top: 1em; margin-bottom: 1em; font-weight: bold; } .subsectionHead { margin-top: 1.33em; margin-bottom: 1.33em; font-weight: bold; } .subsubsectionHead { font-size: 0.83em; margin-top: 1.67em; margin-bottom: 1.67em; font-weight: bold; }

2. In Kindle e-books, new paragraphs have indents on the first line. If you do not like that, this is the workaround:

p { margin-top: 1em; margin-bottom: 1em; text-indent: 0.01em; }

3. One way to highlight a quotation:

.quotation { margin: 0.25em 0; padding: 0.35em 40px; line-height: 1.45; position: relative; color: #383838; } .quotation:before { display: block; padding-left: 10px; content: "\201C"; font-size: 80px; position: absolute; left: -15px; top: -20px; color: #7a7a7a; } .quotation cite { color: #999999; font-size: 14px; display: block; margin-top: 5px; } .quotation cite:before { content: "\2014 \2009"; } div.quotation { width: auto; }

4. Add support for small capitals:

.sc { font-variant: small-caps; }

5. Print description list elements in bold:

dt.description { font-weight: bold; }

This is an excerpt from Better Books with LaTeX the Agile Way. You can get a copy here.


text:
# Central Limit Theorem for Linear Eigenvalue Statistics for a Tensor Product Version of Sample Covariance Matrices

Journal of Theoretical Probability, Jan 2017

For $k,m,n\in {\mathbb {N}}$, we consider $n^k\times n^k$ random matrices of the form \begin{aligned} {\mathcal {M}}_{n,m,k}({\mathbf {y}})=\sum _{\alpha =1}^m\tau _\alpha {Y_\alpha }Y_\alpha ^T,\quad {Y}_\alpha ={\mathbf {y}}_\alpha ^{(1)}\otimes \cdots \otimes {\mathbf {y}}_\alpha ^{(k)}, \end{aligned} where $\tau _{\alpha }$, $\alpha \in [m]$, are real numbers and ${\mathbf {y}}_\alpha ^{(j)}$, $\alpha \in [m]$, $j\in [k]$, are i.i.d. copies of a normalized isotropic random vector ${\mathbf {y}}\in {\mathbb {R}}^n$. For every fixed $k\ge 1$, if the Normalized Counting Measures of $\{\tau _{\alpha }\}_{\alpha }$ converge weakly as $m,n\rightarrow \infty$, $m/n^k\rightarrow c\in [0,\infty )$ and ${\mathbf {y}}$ is a good vector in the sense of Definition 1.1, then the Normalized Counting Measures of eigenvalues of ${\mathcal {M}}_{n,m,k}({\mathbf {y}})$ converge weakly in probability to a nonrandom limit found in Marchenko and Pastur (Math USSR Sb 1:457–483, 1967). For $k=2$, we define a subclass of good vectors ${\mathbf {y}}$ for which the centered linear eigenvalue statistics $n^{-1/2}{{\mathrm{Tr}}}\varphi ({\mathcal {M}}_{n,m,2}({\mathbf {y}}))^\circ$ converge in distribution to a Gaussian random variable, i.e., the Central Limit Theorem is valid.

This is a preview of a remote PDF: https://link.springer.com/content/pdf/10.1007%2Fs10959-017-0741-9.pdf

A. Lytova. Central Limit Theorem for Linear Eigenvalue Statistics for a Tensor Product Version of Sample Covariance Matrices, Journal of Theoretical Probability, 2017, 1-34, DOI: 10.1007/s10959-017-0741-9


text:
Journal ArticleDOI

# Toward Self-Similar Propagation of Optical Pulses in a Dispersion Tailored, Nonlinear, and Segmented Bragg-Fiber at 2.8 $\mu$m

01 Aug 2017-IEEE Photonics Journal (Institute of Electrical and Electronics Engineers (IEEE))-Vol. 9, Iss: 4, pp 1-12

TL;DR: In this paper, the authors demonstrate self-similar stable propagation of parabolic optical pulses through a highly nonlinear specialty Bragg fiber at 2.8€$m by a numerical approach. AbstractWe demonstrate self-similar stable propagation of parabolic optical pulses through a highly nonlinear specialty Bragg fiber at 2.8$\mu$m by a numerical approach. To obtain such propagation characteristics over a longer length of a Bragg fiber, we propose and verify a fiber design scheme that underpins passive introduction of a rapidly varying group-velocity dispersion around its zero dispersion wavelength and modulated nonlinear profile through suitable variation in its diameter. To implement the proposed scheme, we design a segmented and tapered chalcogenide Bragg fiber in which a Gaussian pulse is fed. Transformation of such a launched pulse to a self-similar parabolic pulse with full-width-at-half-maxima of 4.12 ps and energy of$\sim\$ 39 pJ is obtained at the output. Furthermore, a linear chirp spanning across the entire pulse duration and 3 dB spectral broadening of about 38 nm at the output are reported. In principle, the proposed scheme could be implemented in any chosen set of materials.

...read more

##### Citations
More filters
Proceedings ArticleDOI
01 Mar 2019
TL;DR: In this paper, the authors reviewed some application-specific fiber designs for parabolic pulse generation to overcome nonlinear detriments, and all-fiber light sources for mid-IR and THz photonics.
Abstract: Specialty optical fiber for specific applications have become a new paradigm in guided wave photonics. In this invited presentation, we would review some of our application-specific specialty fiber designs for parabolic pulse generation to overcome nonlinear detriments, and all-fiber light sources for mid-IR and THz photonics.

### Cites background from "Toward Self-Similar Propagation of ..."

• ...Details of our work in this direction can be found in [3]....

[...]

##### References
More filters
Book
01 Jan 1989
TL;DR: The field of nonlinear fiber optics has advanced enough that a whole book was devoted to it as discussed by the authors, which has been translated into Chinese, Japanese, and Russian languages, attesting to the worldwide activity in the field.
Abstract: Nonlinear fiber optics concerns with the nonlinear optical phenomena occurring inside optical fibers. Although the field ofnonlinear optics traces its beginning to 1961, when a ruby laser was first used to generate the second-harmonic radiation inside a crystal [1], the use ofoptical fibers as a nonlinear medium became feasible only after 1970 when fiber losses were reduced to below 20 dB/km [2]. Stimulated Raman and Brillouin scatterings in single-mode fibers were studied as early as 1972 [3] and were soon followed by the study of other nonlinear effects such as self- and crossphase modulation and four-wave mixing [4]. By 1989, the field ofnonlinear fiber optics has advanced enough that a whole book was devoted to it [5]. This book or its second edition has been translated into Chinese, Japanese, and Russian languages, attesting to the worldwide activity in the field of nonlinear fiber optics.

15,319 citations

Journal ArticleDOI
TL;DR: In this article, a review summarizes the different rare-earth cations and host materials used in mid-infrared fiber laser technology, and discusses the future applications and challenges for the field.
Abstract: Fibre lasers in the mid-infrared regime are useful for a diverse range of fields, including chemical and biomedical sensing, military applications and materials processing. This Review summarizes the different rare-earth cations and host materials used in mid-infrared fibre laser technology, and discusses the future applications and challenges for the field.

826 citations

Journal ArticleDOI
TL;DR: Self-similar propagation of ultrashort, parabolic pulses in a laser resonator is observed theoretically and experimentally, constituting a new type of pulse shaping in mode-locked lasers.
Abstract: Self-similar propagation of ultrashort, parabolic pulses in a laser resonator is observed theoretically and experimentally. This constitutes a new type of pulse shaping in mode-locked lasers: in contrast to the well-known static (solitonlike) and breathing (dispersion-managed soliton) pulse evolutions, asymptotic solutions to the nonlinear wave equation that governs pulse propagation in most of the laser cavity are observed. Stable self-similar pulses exist with energies much greater than can be tolerated in solitonlike pulse shaping, and this has implications for practical lasers.

781 citations

Journal ArticleDOI
, Ole Bang1
TL;DR: In this article, a record-breaking spectral coverage of 1.4-13.3 µm was achieved by launching intense ultra-short pulses into short pieces of ultra-high numerical aperture step-index chalcogenide glass optical fiber consisting of a GaAsSe cladding and an As2Se3 core.
Abstract: Mid-infrared supercontinuum generation with a record-breaking spectral coverage of 1.4–13.3 µm is demonstrated by launching intense ultra-short pulses into short pieces of ultra-high numerical aperture step-index chalcogenide glass optical fibre consisting of a GaAsSe cladding and an As2Se3 core.

696 citations

### "Toward Self-Similar Propagation of ..." refers background in this paper

• ...In this context, mid-IR laser sources delivering femtosecond pulses with energy in the order of nano-Joules [27], mid-IR supercontinuum sources spanning over wide ranges of wavelength with much higher peak power [44]–[46], etc....

[...]

Journal ArticleDOI
Martin E. Fermann
TL;DR: Self-similarity analysis of the nonlinear Schrödinger equation with gain results in an exact asymptotic solution corresponding to a linearly chirped parabolic pulse which propagates self-similarly subject to simple scaling rules.
Abstract: Ultrashort pulse propagation in high gain optical fiber amplifiers with normal dispersion is studied by self-similarity analysis of the nonlinear Schrodinger equation with gain. An exact asymptotic solution is found, corresponding to a linearly chirped parabolic pulse which propagates self-similarly subject to simple scaling rules. The solution has been confirmed by numerical simulations and experiments studying propagation in a Yb-doped fiber amplifier. Additional experiments show that the pulses remain parabolic after propagation through standard single mode fiber with normal dispersion.

686 citations

### "Toward Self-Similar Propagation of ..." refers background in this paper

• ...To date, several studies have been reported in the literature on the formation of PPs, in both active and passive fibers [14]–[21]....

[...]


text:
# if $2000 is 40% what is the remaining 60% I am sure it is a simple equation, but I just can't seem to figure this one out. if$2000 is 40% how do i figure out what the remaining 60% is in dollars

• If $2000=.4\times x$ then what is $x$? – Jacky Chong Jan 18 '18 at 5:00
• Welcome to MSE! I see you’re new here. If you find answers or posts good, hit the little blue arrow up (that’s called an upvote). It will move those posts higher in the feed and will reward their creators with points. If you find an answer that totally resolved your question, give it the $\color{green}{\checkmark}$ to move it to the very top and give the answerer an extra bonus. – gen-z ready to perish Jan 18 '18 at 5:24
• @JackyChong: to be fair, that's not what the question asks. It asks "If $2000=0.4x$, then what is $\color{red}{0.6}x$?" No need to detour through $x$. – symplectomorphic Jan 18 '18 at 5:47
• @symplectomorphic I believe that’s why Mx. Chong posted a comment and not an answer. We also call those hints, because they nudge learners along he right path. – gen-z ready to perish Jan 18 '18 at 5:58
• @ChaseRyanTaylor: the substance of my comment is that the nudge Jacky made is to the wrong path. To transform $0.4x$ into $0.6x$ one need not solve for $x$; one simply has to multiply by $1.5$. Your presumption that I missed the fact that Jacky's comment is a hint is totally groundless. Of course it's a hint. It's just not a very good one. – symplectomorphic Jan 18 '18 at 8:34

## Method using ratios

Let the answer be $x$.

$$\frac{\2000}{40\%}=\frac x{60\%}$$

$$x=\frac{\2000\cdot60\%}{40\%}$$

$$x=\frac{\2000\cdot3}{2}$$

$$x=\3000$$

## Method using the total sum

Because $\$2000$is$40\%$of total, then$\$1000$ is $20\%=\frac15$ of total, so the total is $5*\$1000=\$5000$.

So, $60\%$ of total is $60\%*\$5000=\frac{60}{100}*\$5000=\$3000$. Percentages are very cool. As you know,$\%$just stands in for$\times\frac{1}{100}$, but what you may not know is that to take a percentage of something, you just have to multiply by that percentage: $$\text{x\% of N}=(x\%)(N)=\frac{xN}{100}$$ So, call the total money$T$. Saying that$\$2000$ is $40\%$ of $T$ tells us that

$$\2000 = 0.4T \iff T=\frac{\2000}{0.4}$$

Now, to get the remaining $60\%$, take

$$(60\%)T = (0.6)\frac{\2000}{0.4}$$

I’ll let you do the arithmetic.

If $\$2000$is$40\%$, it is$\frac{4}{10}$of the total. So the remaining$60\%$would be$(\$2000/40)\cdot60=\$3000$. • Use \$ to type a dollar sign in math and \% for a percentage sign. – gen-z ready to perish Jan 18 '18 at 6:01
• @ChaseRyanTaylor thanks for he edit – QuIcKmAtHs Jan 18 '18 at 6:02

If $\$2000$is$40\%$, then$\$1000$ is $20\%$, hence $\$3000$is$60\%\$.


text:
# Lightintg Analog Details

Is there a magic incantation to make mathematics render correctly?

The theory of operation is to integrate -V_ac from about 4 volts at the beginning of a a cycle down to about 0.8 volts near the end of the cycle. Six comparators compare the integrated signal, V_out and turn on their corresponding triac as soon as its control voltage is greater than V_out.

Opamp #2 and Q2 reset the charge on C2 to 4 volts every time the AC input gets close enough to zero. D1 along with R8 and R9 ensure that the voltage at C2, V_out never goes below about 0.5 volts.

The interesting part of the circuit is opamp #3 and Q1. In this mode, Q1 behaves like a (nonlinear) transresistance device controlled by the output of the opamp. Applying the opamp rule:

$V_+ = V_-$, but, $V_- = I_R_13 * R_13$. When Q2 is off and the voltage on C2 is above 0.5 volts, there's nowhere else for its current go so, so $V_out = 4.0v - \frac{1}{C_13} * \int{0}{t}I_R13 * dt$

Combining, we have: V_out = 4.0v - \frac{V_+}{C_13 * R_13} \int{0}{t}V_+ dt [/itex]

The voltage divider on opamp #1 divids the 12Vrms input signal by 10. (With R14 providing fudge factor) So we end up with:

$V_out = 4.0v - k \int{0}{t}V_ac * dt$

Whith K = 45.4hz. When V_ac is a perfect 12Vrms sin wave, the integral evaluates to 3.2volt seconds. The output will look like a cosine wave going from 4.0 volts to about 0.8 volts, 120 times a second.


text:
# ⓘ Schwarzschild metric. The Schwarzschild metric was calculated by Karl Schwarzschild as a solution to Einsteins field equations in 1916. Also known as Schwarzsch ..

## ⓘ Schwarzschild metric

The Schwarzschild metric was calculated by Karl Schwarzschild as a solution to Einsteins field equations in 1916. Also known as Schwarzschild solution, it is an equation from general relativity in the field of astrophysics. A metric refers to an equation which describes spacetime; in particular, a Schwarzschild metric describes the gravitational field around a Schwarzschild black hole - a non-rotating, spherical black hole with no magnetic field, and where the cosmological constant is zero.

It is essentially an equation that describes how a particle moves through the space near a black hole.

d s 2 = − c 2 1 − 2 G M r c 2 d t 2 + 1 − 2 G M r c 2 d r 2 + r 2 d θ 2 + r 2 sin 2  θ d ϕ 2 {\displaystyle ds^{2}=-c^{2}1-{\frac {2GM}{rc^{2}}}dt^{2}+{\frac {1}{1-{\frac {2GM}{rc^{2}}}}}dr^{2}+r^{2}d\theta^{2}+r^{2}\sin ^{2}\thetad\phi^{2}}

## 1. Derivation

Although a more complicated way of calculating the Schwarzschild metric can be found using Christoffel Symbols, it can also be derived using the equations for escape velocity v e {\displaystyle v_{e}}, time dilation dt, length contraction dr:

v e = v = 2 G M r {\displaystyle v_{e}=v={\sqrt {\frac {2GM}{r}}}} 1

v is the velocity of the particle G is the gravitational constant M is the mass of the black hole r is how close the particle is to the heavy object

d t ′ = d t 1 − v 2 c 2 {\displaystyle dt=dt{\sqrt {1-{\frac {v^{2}}{c^{2}}}}}} 2 d r ′ = d r 1 − v 2 c 2 {\displaystyle dr={\frac {dr}{\sqrt {1-{\frac {v^{2}}{c^{2}}}}}}} 3

dt is the particles true change in time dt is the particles change in time dr is the true distance traveled dr is the particles change in distance v is the velocity of the particle c is the speed of light

Note: the true time interval and true distance traveled by the particle are different than the time and distance calculated in classical physics calculations, since it is traveling in such a heavy gravitational field!

Using the equation for flat spacetime in spherical coordinates:

d s 2 = − c 2 d t 2 + d r 2 + r 2 d θ 2 + r 2 sin 2  θ d ϕ 2 {\displaystyle ds^{2}=-c^{2}dt^{2}+dr^{2}+r^{2}d\theta^{2}+r^{2}\sin ^{2}\thetad\phi^{2}} 4

ds is the path of the particle

θ {\displaystyle \theta } is the angle d θ {\displaystyle \theta } and d ϕ {\displaystyle \phi } are the change in angles

Inputting the equations for escape velocity, time dilation, and length contraction equations 1, 2, and 3 into the equation for flat spacetime equation 4, to get the Schwarzschild metric:

d s 2 = − c 2 1 − 2 G M r c 2 d t 2 + d r 2 1 − 2 G M r c 2 + r 2 d θ 2 + r 2 sin 2  θ d ϕ 2 {\displaystyle ds^{2}=-c^{2}1-{\frac {2GM}{rc^{2}}}dt^{2}+{\frac {dr^{2}}{1-{\frac {2GM}{rc^{2}}}}}+r^{2}d\theta^{2}+r^{2}\sin ^{2}\thetad\phi^{2}} 5

From this equation we can take out the Schwarzschild radius r s {\displaystyle r_{s}}, the radius of this black hole. Although this is most commonly used to describe a Schwarzschild black hole, the Schwarzschild radius can be calculated for any heavy object.

d s 2 = − c 2 1 − r s r d t 2 + 1 − r s r d r 2 + r 2 d θ 2 + r 2 sin 2  θ d ϕ 2 {\displaystyle ds^{2}=-c^{2}1-{\frac {r_{s}}{r}}dt^{2}+{\frac {1}{1-{\frac {r_{s}}{r}}}}dr^{2}+r^{2}d\theta^{2}+r^{2}\sin ^{2}\thetad\phi^{2}} 6

r s {\displaystyle r_{s}} is the set radius limit of the object


text:
# Partition and Restructure

Given two contiguous shapes of the same area, determine the optimal way to divide the first shape into a minimum number of contiguous segments such that they can be rearranged to form the second shape. In other words, find the minimum number of segments required that can form both of the shapes.

"Contiguous" means that every square in the shape can be reached from any other square by walking across edges. Shapes and segments are allowed to have holes.

"Rearrange" means you move the segments around; you can translate, rotate, and reflect them.

The shapes are contained on a grid; in other words, each shape consists of a collection of unit squares joined by their corners/edges.

# Input Specifications

The input will be provided in some reasonable format - list of points, array of strings representing each grid, etc. You can also take the sizes of the grid if requested. The grids will have the same dimensions and the two shapes are guaranteed to have the same area, and the area will be positive.

# Output Specifications

The output should just be a single positive integer. Note that there will always be a positive answer because in the worst case scenario, you just divide the shapes into N unit squares.

# Examples

The examples are presented as a grid with . representing a blank and # representing part of the shape.

## Case 1

Input

.....
.###.
.#.#.
.###.
.....

###..
..#..
..#..
..###
.....

Output

2

Explanation

You can divide it into two L-shaped blocks of 4:

#
###

## Case 2

Input

#...
##..
.#..
.##.

.##.
####
....
....

Output

2

Explanation

You can split the shapes like so:

A...
AA..
.A.
.BB.

.AA.
BBAA
....
....

You could also do:

A...
AA..
.B..
.BB.

.AB.
AABB
....
....

## Case 3

Input

#....#
######

.####.
.####.

Output

2

Explanation

A....B
AAABBB

.ABBB.
.AAAB.

(This test case demonstrates the necessity to rotate/reflect shapes for optimal output)

## Case 4

Input

.###.
..#..

.##..
.##..

Output

2

Explanation

No matter how you select blocks, selecting a 2x1 from the first shape necessarily prevents the other two from being grouped together; thus, you can use one 2x1 and two 1x1s. However, (thanks @Jonah), you can split it into a 3-block L shape and a single square like so:

.AAB.
..A..

.AA..
.BA..

• Sandbox – HyperNeutrino Jun 13 at 12:44
• Interesting problem. And seemingly hard. Are there any algorithms for this more efficient that brute force? – Jonah Jun 13 at 15:53
• @Jonah I'm not quite sure; I haven't thought about efficient implementations for this yet. Sounds like a DS problem. – HyperNeutrino Jun 13 at 15:57
• Also, probably worth adding more test cases for a problem this complex. – Jonah Jun 13 at 16:01
• @Jonah Good suggestion, thanks. – HyperNeutrino Jun 13 at 16:05

# Python 3.6, 799 791 bytes

7 bytes saved by Jonathan Frech and motavica

B=frozenset
M=min
X={}
T=lambda s:((x,y)for y,x in s)
N=lambda s:B((x-M(s)[0],y-M(T(s))[0])for x,y in s)
G=lambda s:{(x,y):s&{(x-1,y),(x+1,y),(x,y-1),(x,y+1)}for(x,y)in s}
C=lambda g,s,i=0:i<=len(g)and(len(g)==len(s)or C(g,s.union(*map(g.get,s)),i+1))
F=lambda s:N([(-x,y)for x,y in s])
P=lambda s,i=4:M([N(s),F(s),P(F(T(s)),i-1)],key=list)if i else s
S=lambda s,t=B(),i=0:t|S(s,B().union(u|{p}for u in t for p in s-u if C(G(u|{p}),{p}))if i else B([B([next(iter(s))])]),i+1)if-~i<len(s)else t
def U(s):
k=P(s)
if k in X:return
j=[t for t in S(k)if C(G(k-t),{next(iter(k-t))})];X[k]={P(t):B()for t in j}
for t in j:X[k][P(t)]|=B([B(P(k-t))]);U(t);U(k-t)
V=lambda s,t:1+M(V(v,w)for u in B(X[s])&B(X[t])for v in X[s][u]for w in X[t][u])if s^t else 1
A=lambda s,t:U(s)or U(t)or V(P(s),P(t))

Try it online!

## Usage

A(s, t) takes in two shapes where each shape is given by a list of x, y grid positions.

A helper function to convert the graphical representation to a list of positions is below:

def H(g):
g=g.split("\n")
return[(x,y)for x in range(len(g[0]))for y in range(len(g))if"#"==g[y][x]]

Example:

case1_1 = \
""".....
.###.
.#.#.
.###.
....."""

case1_2 = \
"""###..
..#..
..#..
..###
....."""

print(A(H(case1_1), H(case1_2))) # Prints 2

## Explanation

The algorithm used here is a little better than brute force by caching sub-shapes. For a given shape, it caches all the ways to split that shape into two contiguous shapes, I then normalise these shapes (shift the coordinates so it starts at the origin, then find a rotation/reflection of it which is used in the cache) and store them in the cache to look up quickly later. All sub-shapes then have their sub-shapes cached as well until it gets to the single block shape.

These sub-shapes are generated by converting it to a graph adjacency list and using a BFS to generate all sub-graphs. We can then filter these subgraphs to ones where the vertices which weren't included are a connected component. Determining whether the graph is connected is done with another BFS.

After the cache is complete, the solution is found by comparing the two shapes to find the sub-shapes that it has in common. Once it has these list of sub-shapes, it takes the pair of sub-shapes left over after removing the common shape and recursively applies the same algorithm again to find the minimum number of blocks needed to reconstruct the shape. This then returns the sub-shape with the minimum of all those values and we have our solution.

I've put an annotated version below to kinda explain what each line is doing.

B=frozenset
M=min
# Shapes are stored as a frozenset of tuples where each tuple represents an (x, y) position
# Cache of shape partitions. This is a two-level dictionary where the outer key is a shape, and the inner key is a sub-shape where the value is a list of the shapes left when the sub-shape is removed.
# there may be multiple shapes in the inner-most list if the sub-shape appears multiple times
X={}
# Transpose list of coords (flip around diagonal axis)
T=lambda s:((x,y)for y,x in s)
# Translate shape so its upper-left corner is at the origin
N=lambda s:B((x-M(s)[0],y-M(T(s))[0])for x,y in s)
# Convert shape to graph in adjacency list form
G=lambda s:{(x,y):s&{(x-1,y),(x+1,y),(x,y-1),(x,y+1)}for(x,y)in s}
# Check if graph is connected given a set of nodes, s, known to be connected
C=lambda g,s,i=0:i<=len(g)and(len(g)==len(s)or C(g,s.union(*map(g.get,s)),i+1))
# Flip shape around vertical axis
F=lambda s:N([(-x,y)for x,y in s])
# Converts shape to the minimal reflection or rotation. rotation is equivalent to transpose then flip.
P=lambda s,i=4:M([N(s),F(s),P(F(T(s)),i-1)],key=list)if i else s
# returns all the contiguous sub-shapes of s that contain the first pos, given by next(iter(s))
S=lambda s,t=B(),i=0:t|S(s,B().union(u|{p}for u in t for p in s-u if C(G(u|{p}),{p}))if i else B([B([next(iter(s))])]),i+1)if-~i<len(s)else t
# updates the sub-shape cache, X, recursively for an input shape s
def U(s):
k=P(s)
if k in X:return
j=[t for t in S(k)if C(G(k-t),{next(iter(k-t))})];X[k]={P(t):B()for t in j}
for t in j:X[k][P(t)]|=B([B(P(k-t))]);U(t);U(k-t)
# Gets the minimum number of partitions for two shapes
V=lambda s,t:1+M(V(v,w)for u in B(X[s])&B(X[t])for v in X[s][u]for w in X[t][u])if s^t else 1
# The function to run, will update the cache for the two input shapes then return the minimum number of partitions
A=lambda s,t:U(s)or U(t)or V(P(s),P(t))

• if s==t else could possibly be reversed, allowing the replacement of != to ^. – Jonathan Frech Jun 15 at 12:36
• if i<len(s)-1else ~> if-~i<len(s)else. – Jonathan Frech Jun 15 at 12:38
• def A(s,t):U(s);U(t);return V(P(s),P(t)) could possibly be lambda s,t:U(s)or U(t)or V(P(s),P(t)), saving three bytes. – Jonathan Frech Jun 15 at 12:41
• s.union(*[g[n]for n in s]) ~> s.union(*map(g.get,s)) – movatica Jun 15 at 21:58


text:
# Can PCA be applied twice or more? [duplicate]

I have a very high-dimensional dataset with 27k features. I want to a reduce the dimensionality of the dataset. I want to use PCA to reduce the dimensionality to 2 as the toolbox I am using expects 2 dimensions.

But When I am trying to apply PCA in Matlab I am getting an out of memory error. Can I apply PCA twice to get down to 2 dimesions, i.e. 27k -> intermediate -> 2 dimensions?

• In theory you could, but it really doesn't make any sense to do so. If you take a pca on your pca, you ignore the fact that some PCs matter more than others. If you really want just two dimensions, why don't you just take the first two PCs (although not knowing your system, this may not make sense)? Feb 4 '16 at 14:43
• You mean to say run pca once and the then consider first 2 dimensions of the resultant matrix. ? But I am worried will it still retain the the original information of the original matrix .? Feb 4 '16 at 14:46
• Please provide the exact commands you are using in Matlab that result in the "out of memory" error. What commands do you use to perform your "27k->intermediate" step? Why doesn't it yield the same error too? Feb 4 '16 at 15:05
• yes, it should give the same error for the "27k -> intermediate" part too, so i don't see the point for an intermediate step. however, there is an 'econ' option of matlab's pca, that could be useful.
– jeff
Feb 4 '16 at 15:11
• Initially I used to use the below command in matlab A = load(dataset); [coeff,score,latent] = pca(A); It is working fine but it is not giving me 2 dimensions. But I have a tool box from MIT where they use different types of preprocessing the datasets. classification algorithm which I want to implement in that tool box accepts only two dimensions. In that toolbox they provided different preprocessing option to reduce it to 2 dimension. When I used PCA option in their tool box in matlab command it is througing me out of memory error. Feb 4 '16 at 16:35


text:
# How to 'whiten' a time domain signal?

I am trying to understand how exactly to implement what is known as a 'pre-whitening' filter or simply a 'whitening' filter.

I understand that the purpose is to make it have a delta as its autocorrelation function, but I am not sure how to do this exactly.

The context here is the following: A signal is received at two different receivers, and their cross-correlation is computed. The cross-correlation can look like a triangle, or some other godforsaken shape. Due to this, it becomes hard to find the peak of the cross-correlation signal. In this case I hear about having to 'whiten' the signals before a cross correlation is performed on them, such that the cross-correlation is now more delta-like.

How is this done?

Thanks!

• Note that in the context of communications systems, what your question described as a whitener is essentially performing the function of an equalizer. It sounds the same to me; it might just be different nomenclature. – Jason R Nov 12 '11 at 5:10
• Yes, the ill-defined nomenclature makes it all the more confusing as to what they are trying to do sometimes. – Spacey Nov 13 '11 at 18:08

Suppose you have signals $x(t)$ and $y(t)$ whose cross-correlation function $R_{x,y}(t)$ is not something you like; you want $R_{x,y}$ to be impulse-like. Note that in the frequency domain, $$\mathcal{F}[R_{x,y}] = S_{x,y}(f) = X(f)Y^*(f).$$ So you filter the signals through linear filters $g$ and $h$ respectively to get $\hat{x}(t) = x*g$, $\hat{X}(f) = X(f)G(f)$, and $\hat{y} = y*h$, $\hat{Y}(f) = Y(f)H(f)$, and now their cross-correlation function is $R_{\hat{x},\hat{y}}$ whose Fourier transform is \begin{align*} \mathcal{F}[R_{\hat{x},\hat{y}}] = S_{\hat{x},\hat{y}}(f) &= [X(f)G(f)][Y(f)H(f)]^*\\ &= [X(f)Y^*(f)][G(f)H^*(f)]\\ &= [X(f)Y^*(f)][G^*(f)H(f)]^*, \end{align*} that is, $R_{\hat{x},\hat{y}}$ is the cross-correlation of $R_{x,y}$ with $R_{h,g}$. More importantly, you want to choose $g$ and $h$ so that the cross-spectral density $G(f)H^*(f)$ of $g$ and $h$ is the multiplicative inverse of the cross-spectral density $X(f)Y^*(f)$ of $x$ and $y$, or something close to it. If you have only one signal and one filter, then you get the result given by Hilmar (with amendment as given by my comment there). In either case, the issue of compensating for spectral nulls, or generally, frequency bands where the signals have little energy still remains.

• Thanks for the asnwer - can you explain the lengths involved here? For example, what is the length of the power transfer function of X, if x[n] is of length N? (Same with y...) – Spacey Nov 16 '11 at 19:06
• Ok - I will accept the answer, but will write a brand new question taking off on this sometime this evening and we can take it from there. Thanks again. – Spacey Nov 16 '11 at 20:19

Pre-whitening can be done by filtering with a transfer function that is roughly the inverse of the power spectrum of the signal. Let's say you have an audio signal that's roughly pink. In order to whiten that, you would apply an inverse pink filter (frequency response rises by 3 dB per octave).

However, I'm not sure whether this will help with your issue. Pre-whitening tends to amplify the low energy parts in the signal, which can be noisy and therefore increase the overall noise in your system. If you are trying to determine whether two signals are time aligned (or what the time alignment is) then there is some inherent fuzziness in the problem that's related to the bandwidth of the signal. That is exactly represented in the time domain shape of the autocorrelation function.

• Thanks for your answer - yes inverting the spectrum as you said will probably not work here... the use of 'pre-whiteners' seems so ubiquitous I tend to think there are many ways of doing it besides that?... – Spacey Nov 11 '11 at 19:22

There is a generally simple method of whitening a vector $\bf x$ given an example data set. It is not clear from your question if the dimension of $\bf x$ would be 2 or if you are including a sliding temporal window. Anyway you want to decorrelate the components of $\bf x$. Doing it in the frequency domain for such a simple problem is arduous.

Assuming that you start with an example data set consisting of samples of the data vectors - this might be a set of samples of the two signals at different times. You subtract the data set mean so that the mean of $\bf x$ is zero. Then you need to compute the covariance matrix of the data $C_{ij} = \frac{1}{N}\sum_{{\bf x}\in Data}x_i x_j$ where $N$ is the number of data examples and $i,j$ are indices of the components of $\bf x$, which if there are 2 signals just go from 0 to 1. The covariance matrix in this case will just be 2x2.

Once you have this covariance matrix you can compute a whitening transform in the form of a matrix to multiply the data in order to get the whitened version. The covariance of this new whitened data is the identity matrix.

The whitened data will be ${\bf y} = C^{-1/2}{\bf x}$. This is just a matrix version of calculating the variance over an example dataset and then dividing any new data by the square root of the variance in order to normalize its standard deviation.

You can calculate $C^{-1/2}$ by using Cholesky decomposition where $C=LL^T$. For a 2x2 matrix it is very easy using simple algebra. The whitened data is given by ${\bf y}=L^{-1}{\bf x}$, which since $L$ is lower triangular can efficiently be computed by common solvers without forming the inverse.

If it's just about how to filter the low energy parts in the signal, could you use a lowpass filter? There are some implementations about this.

If this his helpful: This article from Karjalaien et. al is about the whitening filter and the method of warped linear prediction, which is used by the filter.


text:
# A.M of smallest elements of $r$ subsets of set 1,2,3,…,n

All possible subsets containing $$r$$ elements from the set$$\{1,2,3,...,n\}$$ are formed where $$(1\leq r\leq n)$$. What is the arithmetic mean of the smallest elements of these subsets.

My Attempt

The number of such subsets is clearly $$\binom{n}{r}$$. The number of subsets with $$k$$ as its smallest element is $$\binom{n-k}{r-1}$$. So sum of all the smallest elements$$\sum_{k=1}^{n-r+1}k\binom{n-k}{r-1}$$

=Coefficient of $$x^{r-1}$$in expansion$$\sum_{k=1}^{n-r+1}k(1+x)^{n-k}$$ =coefficient of $$x^{r-1}$$ in expansion $$\left\{\frac{(1+x)^{n+1}-(1+x)^r}{x^2}-\frac{(n-r+1)(1+x)^{r-1}}{x}\right\}=\binom{n+1}{r+1}$$

So required AM$$=\frac{n+1}{r+1}$$

Is there a combinatorical argument to this.

## 1 Answer

We count the number of $$r+1$$ element subsets of $$\{0,1,...,n\}$$. On one hand, this is $$\binom{n+1}{r+1}$$. On the other hand, for each $$1 \leq k \leq n$$, consider the number of $$r+1$$ element subsets of $$\{0,1,...,n\}$$ with second smallest element $$k$$. This can be counted by first taking a $$r$$ element subset of $$\{1,...,n\}$$ with smallest element $$k$$, then having $$k$$ ways to choose the last element from $$\{0,...,k-1\}$$. Therefore the number is equal to the sum of the smallest element of $$r$$ element subsets of $$\{1,...,n\}$$ with smallest element $$k$$. Summing over $$k$$, the sum of smallest elements of $$r$$ element subsets of $$\{1,...,n\}$$ is the number of $$r+1$$ element subsets of $$\{0,1,...,n\}$$, i.e. $$\binom{n+1}{r+1}$$. We then get the A.M. to be $$\frac{n+1}{r+1}$$ upon dividing by $$\binom{n}{r}$$.


text:
DEtools - Maple Programming Help

Home : Support : Online Help : Mathematics : Differential Equations : DEtools : Differential Operators : DEtools/Desingularize

DEtools

 Desingularize
 desingularize a linear differential operator

 Calling Sequence Desingularize(L, Dx, x, func)

Parameters

 L - polynomial in Dx with coefficients that are polynomials in x Dx - variable, denoting the differential operator w.r.t. x x - variable func - (optional) procedure

Description

 • Let L be a linear differential operator, given as a polynomial in Dx with univariate polynomial coefficients in x over a field $k$ of characteristic zero. The command Desingularize(L,Dx,x) constructs a linear differential operator R such that any solution of $L\left(y\right)=0$ is also a solution of $R\left(y\right)=0$ and R has no apparent singularities.  The operator R is said to maximally desingularize L, and will be right divisible by L over the field $k\left(x\right)$.
 • An apparent singularity is a point $p$ where the leading coefficient of L vanishes, yet $p$ is not a pole of any holomorphic solution of $L\left(y\right)=0$. In this case there will exist $d$ linearly independent solutions at $p$ where $d$ is the order of L.
 • A function may be specified using the optional argument func. It is applied to the coefficients of the collected result. Often simplify or factor will be used.

Examples

 > $\mathrm{with}\left(\mathrm{DEtools}\right):$

For the given differential operator L

 > $L≔\left(24{x}^{3}-18{x}^{4}+{x}^{8}+6{x}^{5}-{x}^{6}\right){\mathrm{Dx}}^{7}+\left(6{x}^{5}+72{x}^{3}-30{x}^{4}-8{x}^{7}-72{x}^{2}\right){\mathrm{Dx}}^{6}+\left(-144{x}^{2}+36{x}^{6}+72{x}^{3}-2{x}^{7}+144x-18{x}^{4}\right){\mathrm{Dx}}^{5}+\left(24{x}^{3}+36{x}^{6}+144x-144-72{x}^{2}-120{x}^{5}-8{x}^{7}-{x}^{10}+{x}^{8}\right){\mathrm{Dx}}^{4}+\left(-24{x}^{5}-{x}^{10}-6{x}^{7}+{x}^{8}+18{x}^{6}\right){\mathrm{Dx}}^{3}+\left(36{x}^{5}-6{x}^{6}-72{x}^{4}+2{x}^{9}\right){\mathrm{Dx}}^{2}+\left(-36{x}^{4}+12{x}^{5}-10{x}^{8}+2{x}^{9}\right)\mathrm{Dx}+64{x}^{7}-12{x}^{4}-32{x}^{8}+8{x}^{9}+{x}^{12}-{x}^{10}$
 ${L}{≔}\left({{x}}^{{8}}{-}{{x}}^{{6}}{+}{6}{}{{x}}^{{5}}{-}{18}{}{{x}}^{{4}}{+}{24}{}{{x}}^{{3}}\right){}{{\mathrm{Dx}}}^{{7}}{+}\left({-}{8}{}{{x}}^{{7}}{+}{6}{}{{x}}^{{5}}{-}{30}{}{{x}}^{{4}}{+}{72}{}{{x}}^{{3}}{-}{72}{}{{x}}^{{2}}\right){}{{\mathrm{Dx}}}^{{6}}{+}\left({-}{2}{}{{x}}^{{7}}{+}{36}{}{{x}}^{{6}}{-}{18}{}{{x}}^{{4}}{+}{72}{}{{x}}^{{3}}{-}{144}{}{{x}}^{{2}}{+}{144}{}{x}\right){}{{\mathrm{Dx}}}^{{5}}{+}\left({-}{{x}}^{{10}}{+}{{x}}^{{8}}{-}{8}{}{{x}}^{{7}}{+}{36}{}{{x}}^{{6}}{-}{120}{}{{x}}^{{5}}{+}{24}{}{{x}}^{{3}}{-}{72}{}{{x}}^{{2}}{+}{144}{}{x}{-}{144}\right){}{{\mathrm{Dx}}}^{{4}}{+}\left({-}{{x}}^{{10}}{+}{{x}}^{{8}}{-}{6}{}{{x}}^{{7}}{+}{18}{}{{x}}^{{6}}{-}{24}{}{{x}}^{{5}}\right){}{{\mathrm{Dx}}}^{{3}}{+}\left({2}{}{{x}}^{{9}}{-}{6}{}{{x}}^{{6}}{+}{36}{}{{x}}^{{5}}{-}{72}{}{{x}}^{{4}}\right){}{{\mathrm{Dx}}}^{{2}}{+}\left({2}{}{{x}}^{{9}}{-}{10}{}{{x}}^{{8}}{+}{12}{}{{x}}^{{5}}{-}{36}{}{{x}}^{{4}}\right){}{\mathrm{Dx}}{+}{64}{}{{x}}^{{7}}{-}{12}{}{{x}}^{{4}}{-}{32}{}{{x}}^{{8}}{+}{8}{}{{x}}^{{9}}{+}{{x}}^{{12}}{-}{{x}}^{{10}}$ (1)

compute a desingularizing operator for L:

 > $M≔\mathrm{Desingularize}\left(L,\mathrm{Dx},x,\mathrm{factor}\right)$
 ${M}{≔}{1728252}{}{{\mathrm{Dx}}}^{{8}}{+}\left({54154}{}{{x}}^{{7}}{+}{161694}{}{{x}}^{{6}}{+}{263753}{}{{x}}^{{5}}{+}{452649}{}{{x}}^{{4}}{-}{324882}{}{{x}}^{{3}}{+}{1728252}\right){}{{\mathrm{Dx}}}^{{7}}{+}\left({-}{433232}{}{{x}}^{{6}}{-}{1293552}{}{{x}}^{{5}}{-}{2218332}{}{{x}}^{{4}}{-}{2969808}{}{{x}}^{{3}}{+}{974646}{}{{x}}^{{2}}{+}{1728252}\right){}{{\mathrm{Dx}}}^{{6}}{+}\left({-}{108308}{}{{x}}^{{6}}{+}{1626156}{}{{x}}^{{5}}{+}{5185170}{}{{x}}^{{4}}{+}{9891042}{}{{x}}^{{3}}{+}{9684162}{}{{x}}^{{2}}{-}{1949292}{}{x}{+}{1728252}\right){}{{\mathrm{Dx}}}^{{5}}{+}\left({-}{54154}{}{{x}}^{{9}}{-}{161694}{}{{x}}^{{8}}{-}{263753}{}{{x}}^{{7}}{-}{560957}{}{{x}}^{{6}}{+}{976266}{}{{x}}^{{5}}{-}{2924106}{}{{x}}^{{4}}{-}{10379136}{}{{x}}^{{3}}{-}{27461604}{}{{x}}^{{2}}{-}{45113328}{}{x}{+}{3677544}\right){}{{\mathrm{Dx}}}^{{4}}{-}{x}{}\left({54154}{}{{x}}^{{8}}{+}{161694}{}{{x}}^{{7}}{+}{263753}{}{{x}}^{{6}}{+}{452649}{}{{x}}^{{5}}{-}{324882}{}{{x}}^{{4}}{+}{1728252}{}{x}{+}{13826016}\right){}{{\mathrm{Dx}}}^{{3}}{+}\left({108308}{}{{x}}^{{8}}{+}{323388}{}{{x}}^{{7}}{+}{635814}{}{{x}}^{{6}}{+}{253914}{}{{x}}^{{5}}{+}{974646}{}{{x}}^{{4}}{-}{1728252}{}{{x}}^{{2}}{-}{10369512}{}{x}{-}{20739024}\right){}{{\mathrm{Dx}}}^{{2}}{+}\left({108308}{}{{x}}^{{8}}{-}{218152}{}{{x}}^{{7}}{-}{981126}{}{{x}}^{{6}}{-}{2600232}{}{{x}}^{{5}}{-}{520824}{}{{x}}^{{4}}{-}{1728252}{}{{x}}^{{2}}{-}{6913008}{}{x}{-}{10369512}\right){}{\mathrm{Dx}}{+}{54154}{}{{x}}^{{11}}{+}{161694}{}{{x}}^{{10}}{+}{263753}{}{{x}}^{{9}}{+}{560957}{}{{x}}^{{8}}{-}{759650}{}{{x}}^{{7}}{+}{538258}{}{{x}}^{{6}}{+}{2595900}{}{{x}}^{{5}}{+}{10387932}{}{{x}}^{{4}}{+}{31684620}{}{{x}}^{{3}}{-}{1728252}{}{{x}}^{{2}}{-}{3456504}{}{x}{-}{3456504}$ (2)
 > $Q,R≔\mathrm{op}\left(\mathrm{DEtools}\left['\mathrm{rightdivision}'\right]\left(M,L,\left[\mathrm{Dx},x\right]\right)\right):$

Hence, $R=Q·L+R$ where

 > $Q$
 $\frac{{1728252}{}{\mathrm{Dx}}}{{{x}}^{{3}}{}\left({{x}}^{{5}}{-}{{x}}^{{3}}{+}{6}{}{{x}}^{{2}}{-}{18}{}{x}{+}{24}\right)}{+}\frac{{54154}{}{{x}}^{{7}}{+}{161694}{}{{x}}^{{6}}{+}{263753}{}{{x}}^{{5}}{+}{452649}{}{{x}}^{{4}}{-}{324882}{}{{x}}^{{3}}{+}{1728252}}{{{x}}^{{3}}{}\left({{x}}^{{5}}{-}{{x}}^{{3}}{+}{6}{}{{x}}^{{2}}{-}{18}{}{x}{+}{24}\right)}$ (3)
 > $R$
 ${0}$ (4)

References

 Tsai, H. "Weyl closure of a linear differential operator." Journal of Symbolic Computation Vol. 29 No. 4-5 (2000): 747-775.
 Chyzak, F.; Dumas, P.; Le, H.Q.; Martins, J.; Mishna, M.; Salvy, B. "Taming apparent singularities via Ore closure." In preparation.

Compatibility

 • The DEtools[Desingularize] command was introduced in Maple 15.


text:
# Modifying a multisig account min approval¶

This guide will show you how to increase and decrease the minimum number of signatures needed to execute a multisig transaction.

## Use case¶

Imagine that Alice and Bob are cosignatories of a 1-of-2 multisig account. This means that at least one of their account’s signatures is required to authorize multisig transactions. In other words, we can say that the minApproval property of the multisig is currently set to 1.

In this case, we want to make both cosignatories required, shifting to a 2-of-2 multisig instead. To achieve this, we will be increasing minApproval by one unit.

2-of-2 multisig account example

## Method #01: Using the Desktop Wallet¶

1. Log in to an account that is a cosignatory (Alice or Bob) of the account you want to modify.
2. Click on the “Multisig” tab on the left-side of the wallet.
3. Select the multisig wallet you want to modify from the dropdown menu from the top field. This will convert the “Operation Type” to “Modifying account multisig properties”.
1. Select the new “Min. Approval” number. In this case, we want to change it to “2”. Click “Send”. Review the information on the popup. Enter your wallet password and click “Confirm”.
1. If the multisig account has the “minimum approval” set to a number greater than 1, log in to another cosignatory account and cosign the transaction. Repeat this step until the minimum approval number is satisfied.
1. Once the Aggregate Transaction is confirmed, you can check its new properties in the “Multisig” menu.

## Method #02: Using the SDK¶

One of the cosignatory accounts, for example Alice’s, will announce a MultisigAccountModificationTransaction to increase minApprovalDelta.

1. Open a new file. Then, define Alice’s account public key and the multisig account private key into new variables.
// replace with network type
const networkType = NetworkType.TEST_NET;
// replace with cosignatory private key
const cosignatoryPrivateKey = '1111111111111111111111111111111111111111111111111111111111111111';
const cosignatoryAccount = Account.createFromPrivateKey(cosignatoryPrivateKey, networkType);
// replace with multisig account private key
const multisigAccountPublicKey = '3A537D5A1AF51158C42F80A199BB58351DBF3253C4A6A1B7BD1014682FB595EA';
const multisigAccount = PublicAccount.createFromPublicKey(multisigAccountPublicKey, networkType);

// replace with network type
const networkType = symbol_sdk_1.NetworkType.TEST_NET;
// replace with cosignatory private key
const cosignatoryPrivateKey = '1111111111111111111111111111111111111111111111111111111111111111';
const cosignatoryAccount = symbol_sdk_1.Account.createFromPrivateKey(cosignatoryPrivateKey, networkType);
// replace with multisig account private key
const multisigAccountPublicKey = '3A537D5A1AF51158C42F80A199BB58351DBF3253C4A6A1B7BD1014682FB595EA';
const multisigAccount = symbol_sdk_1.PublicAccount.createFromPublicKey(multisigAccountPublicKey, networkType);

1. Define a MultisigAccountModificationTransaction to increase the minAprovalDelta by one unit.
const multisigAccountModificationTransaction = MultisigAccountModificationTransaction.create(
1,
0,
[],
[],
networkType);

const multisigAccountModificationTransaction = symbol_sdk_1.MultisigAccountModificationTransaction.create(symbol_sdk_1.Deadline.create(), 1, 0, [], [], networkType);

Note

If you want to decrease the minApproval property, set minApprovalDelta with a negative value. For example, to reduce the number of required signers by one unit, you should set minApprovalDelta to -1.

1. Wrap the MultisigAccountModificationTransaction in an AggregateTransaction, attaching the multisig public key as the signer.

An AggregateTransaction is complete if, before announcing it to the network, all required cosignatories have signed it. If valid, it will be included in a block. As only one cosignature is required (1-of-2), Alice can sign define the aggregate as complete, sign the transaction, and announce it to the network.

const aggregateTransaction = AggregateTransaction.createComplete(
[multisigAccountModificationTransaction.toAggregate(multisigAccount)],
networkType,
[],
UInt64.fromUint(2000000));

// replace with meta.networkGenerationHash (nodeUrl + '/node/info')
const networkGenerationHash = '1DFB2FAA9E7F054168B0C5FCB84F4DEB62CC2B4D317D861F3168D161F54EA78B';
const signedTransaction = cosignatoryAccount.sign(aggregateTransaction, networkGenerationHash);
// replace with node endpoint
const nodeUrl = 'http://api-01.us-east-1.096x.symboldev.network:3000';
const repositoryFactory = new RepositoryFactoryHttp(nodeUrl);
const transactionHttp = repositoryFactory.createTransactionRepository();

transactionHttp
.announce(signedTransaction)
.subscribe((x) => console.log(x), (err) => console.error(err));

const aggregateTransaction = symbol_sdk_1.AggregateTransaction.createComplete(symbol_sdk_1.Deadline.create(), [multisigAccountModificationTransaction.toAggregate(multisigAccount)], networkType, [], symbol_sdk_1.UInt64.fromUint(2000000));
// replace with meta.networkGenerationHash (nodeUrl + '/node/info')
const networkGenerationHash = '1DFB2FAA9E7F054168B0C5FCB84F4DEB62CC2B4D317D861F3168D161F54EA78B';
const signedTransaction = cosignatoryAccount.sign(aggregateTransaction, networkGenerationHash);
// replace with node endpoint
const nodeUrl = 'http://api-01.us-east-1.096x.symboldev.network:3000';
const repositoryFactory = new symbol_sdk_1.RepositoryFactoryHttp(nodeUrl);
const transactionHttp = repositoryFactory.createTransactionRepository();
transactionHttp
.announce(signedTransaction)
.subscribe((x) => console.log(x), (err) => console.error(err));

1. Once confirmed, the minApproval value of the multisig will be set to 2, having our 2-of-2 multisig.

Note

If more than one cosignature is required to announce the transaction (e.g., the multisig is a 2-of-2 account), the transaction must be defined as aggregate bonded, and all other required multisig participants should cosign it in order to be confirmed. Follow the next guide to announce aggregate bonded transactions involving a multisig account.

Follow the next guide to add a new signer to the multisig account.


text:
## Minimizing Quantity Part 5: Principle of Stationary Action

Last post, I hinted that finding the path that minimizes quantities is very fundamental to physics. You can formulate an alternative to Newton’s laws using it. With Newton’s second law, you use F=ma in order to build a differential equation that models an object’s motion. In something called Lagrangian mechanics, you do it by using the Euler Lagrange equation on a functional called the Lagrangian. The Lagrangian is the kinetic energy minus the potential energy. In a Lagrangian, kinetic energy is T and the potential is V, so L=T-V. By using the E-L equation on the Lagrangian, you find the path in which a quantity S called action is stationary. It looks like this:

1) $S=\int^{t2}_{t1} L(t, q, \dot{q}) dt$

2) $0= \frac{\partial L}{\partial q} - \frac{d}{dt}(\frac{\partial L}{\partial \dot{q}})$

This is called the principle of stationary action, and it is another way to formulate the laws of mechanics. And the above statement is equivalent to Newton’s second law. First of all, kinetic energy is:

3) $T=\frac{1}{2} m \dot{q}^2$

Since kinetic energy is represented by the velocity, the partial derivative of it over position is zero, so:

4) $\frac{\partial L}{\partial q}=\frac{dV}{dq}$

Since the potential of the force is defined as the integral of the force over position, and energy is conserved, the negative of its reverse is true:

5) $-\frac{dV}{dq}=F$

As for the right component of the right and side of equation 2, since the potential does not depend on the velocity, that is zero. So:

6) $\frac{d}{dt} (\frac{\partial}{\partial \dot{q}} \frac{1}{2}m \dot{q}^2) = \frac{d}{dt} m \dot{q}$

7) $\frac{d}{dt} \dot{q} = m \ddot{q}$

Inserting 7 and 5 into 2 gets us Newton’s second law as expected:

8) $F=m \ddot{q}$

What an amazing result! This is telling us that every object moves in such a way that it minimizes the quantity called action. At the same time, it does seems suspicious, doesn’t it? What is this Lagrangian and action and how did anyone think of doing things this way? And we have Newton’s second law, why would we ever want to use this Lagrangian mechanics? It is, after all, going to get us the same results.

Well, all of these scientific principles involving variational calculus were done by people like Maupertuis, D’Alember, Lagrange, Euler, Fermat, Hamilton, etc who believed that nature did things in ways that was the most efficient. The fact that Fermat’s principle worked to explain the path of light stoked their ambition. The Lagrangian itself comes out of something called D’Alembert principle. D’Alembert principle basically puts all forces in a standing still reference frame. Objectss that are being accelerated are to be made seem standing still by adding a pretend force that opposes such acceleration, creating a non inertial frame of reference. Here is a material I found which explains more about the Lagrangian and how it comes out of D’Alembert.

As for why we would ever use Lagrangian mechanics, well, it allows us to use other kinds of coordinate systems instead of just the cartesian one. Some problems are easier in alternate coordinate systems. You also don’t have to deal with a bunch of equations built from the various forces. As an example, I will show you how we can do the pendulum problem using this method, and we shall do it in polar coordinates, which consists of angle and radius from the center of the coordinate. I will label the radius l and the angle theta. First of all, here is the setup, with height being zero at the pendulum’s lowest point:

Now, instead of drawing the forces, we have to determine the kinetic and potential energy:

1) $T=\frac{1}{2}mv^2$

In order to transform it for polar coordinates, you have to remember that in a rotating motion:

2) $v=\dot{\theta} l$

Plugging equation 2 back in the first one:

3) $T=\frac{1}{2}ml^2 \dot{\theta}^2$

Potential energy is much simpler:

4) $V=mgh=mgl(1-cos(\theta))$

So the Lagrangian is:

5) $L=\frac{1}{2} ml^2 \dot{\theta}^2 - mgl(1-cos(\theta))$

Use the following Euler Lagrange equation:

6) $\frac{\partial L}{\partial \theta} - \frac{d}{dt}( \frac{\partial L}{\partial \dot{\theta}})=0$

Doing the partial derivatives gets us:

7) $-mgl sin(\theta) - ml^2 \ddot{\theta} = 0$

Dividing both sides by -ml^2 gets us:

8) $\ddot{\theta} + \frac{g}{l} sin(\theta) = 0$

That is indeed the equation of motion for the pendulum. Further simplification is possible by having the angle close to zero. After all, I don’t feel like dealing with the elliptical integral of  the first kind, which I don’t even know how to use. The linear expansion of sin(x) is x, so:

9)  $\ddot{\theta} + \frac{g}{l} \theta = 0$

See? It gets us the same results, but instead by using concepts of energy and variational calculus.

The five parts posts on minimizing, or as you have eventually learned, finding the stationary points, is a taste of what variational calculus can bring into physics. As you can tell, a lot of problems involving extremizing behavior that are hard to grasp becomes possible with these new set of tools, and there is the added bonus of having another framework of analyzing classical mechanics problem via the Lagrangian. Now, I know that for many of you, these series of posts are pretty useless for your personal life. For most of you it is probably true, and these posts were mostly done in order to learn about variational calculus physics myself, and crystallize what I have learned. Despite all that, hopefully you got something out of this, whether your interest in physics has been piked, or your mind got blown away by the principle of stationary action (it did with mine!) or you learned new ways to do certain physics problems.


text:
# Calculus Problem (involes critical numbers)

1. Mar 15, 2004

### Cod

The directions state to find any critical numbers of the function within the interval 0 < x < 2pi. The function is:

$$h(x) = sin^2(x) + cos(x)$$

I've already found that the derivative is:

$$2sin(x)cos(x) - sin(x)$$

I've set that equal to zero, and that's where I'm stuck. I guess this is more of an algebra question than anything. The answer I keep getting is:

$$tan(x)/sin(x) = 2$$

However, I don't think its correct. So any help would be greatly appreciated.

2. Mar 15, 2004

$$2\sin{x}\cos{x} - \sin{x} = 0$$
$$2\sin{x}\cos{x}= \sin{x}$$
$$2\cos{x}=0$$
$$\cos{x}=0$$

...?

3. Mar 15, 2004

### Cod

Ohhhhh, I'm an idiot. I was adding $$sin x$$ to both sides then dividing by $$cos x$$ to get $$tan x$$. Well, I guess I was just looking over the obvious the whole time.

Thanks for the assistance.

4. Mar 15, 2004

### HallsofIvy

Staff Emeritus
cod: Don't call yourself an idiot. Let's reserve that for cookiemonster! (Hey, it's not often I can do that!!)

NO, 2sin x cos x= cos x does NOT immediately lead to
"2cos x= 0"- it leads to 2cos x= 1 !

In fact, the best way to do this is to factor the original form:
2sin x cos x- sin x= sin x(2 cos x- 1)= 0 so

either sin x= 0 or 2 cos x-1= 0. That is, either sin x= 0
or cos x= 1/2. You can get x itself from those.

5. Feb 10, 2011

### pinakeenya

the answer for: Find any critical numbers of the function. (Enter your answers as a comma-separated list.)
(sin(x))2 + cos(x) 0 < x < 2π

is: Pi/3 , Pi, 5Pi/3 so you know