Welcome to TiddlyWiki created by Jeremy Ruston, Copyright © 2007 UnaMesa Association
Type the text for '14 December 2009'
Type the text for '2 December 2009'
\[
R_{xx}[k] = \sum_{n=0}^{N} x[n] x[n+k]
\]
$p(w)=N(w|m_o,S_o)$ and $p(t|w) =N(t|\Phi w, \beta^{-1})$ giving $p(w|t) \propto p(w)p(t|w)$
This can be found by completing the square to discover the mean and variance.
\[m_N = S_N (S_o^{-1} m_o + \beta \Phi^T t) \]
\[S_N^{-1} = S_o^{-1} + \beta \Phi^T \Phi \]
If we assume $p(w|\alpha) = N(w|0,\alpha^{-1}I)$ then
\[m_N = \beta S_N \Phi^T t \]
\[S_N^{-1} = \alpha I + \beta \Phi^T \Phi \]
For higher freqs, think of it as a bucket brigade which the electrons move back and forth moving the electric field along.
The closed formula for a Fibonacci Number is:
\[
\begin{eqnarray}
\phi & = & \frac{1+\sqrt{5}}{2} \\
\tau & = & \frac{1-\sqrt{5}}{2} \\
F_n & = & \frac{\phi^n - \tau^n}{\sqrt{5}}
\end{eqnarray}
\]
From __An Introduction to Number Theory__ Lecture 6
Humans can sense 1 mA.
Currents over 40mA possibly lethal.
Contact resistance 100 ohms sweaty skin and 100 kohms dry skin.
Internal resistance limb-to-limb 500 ohms.
Most dangerous freq is 5 Hz to 500 Hz (peak at 60 Hz 2-3x DC danger).
Frequency danger tied to signals in the nervous system signals and can cause muscles to lock up leaving a person unable to let go of the voltage source.
Type the text for 'Chaos'
When Electrical length is 1/20 (component length / wavelength) can use RF techniques.
Digital clock rise times set the effective fequency of the circuit. E.g. 10MHz clock period is 100nsec but rise time is 10nsec.
At higher frequencies the energy is carried between the wires. (See BetweenWires)
Background: #fff
Foreground: #000
PrimaryPale: #8cf
PrimaryLight: #18f
PrimaryMid: #04b
PrimaryDark: #014
SecondaryPale: #ffc
SecondaryLight: #fe8
SecondaryMid: #db4
SecondaryDark: #841
TertiaryPale: #eee
TertiaryLight: #ccc
TertiaryMid: #999
TertiaryDark: #666
Error: #f88
The solution of this equation
\[
A p =
\left[ \begin{array}{ccc}
-\lambda & \lambda & 0 \\
\mu & -\lambda-\mu & \lambda \\
0 & \mu & -\mu \\
1 & 1 & 1
\end{array} \right]
\left[ \begin{array}{c} p_0 \\ p_1 \\ p_2 \end{array} \right] =
\left[ \begin{array}{c} 0 \\ 0 \\ 0 \\ 1 \end{array} \right] = b
\]
Or
\[
A p = b
\]
can be viewed as finding the 3D vector $p$ that maps closest to the 4D vector $b$. This is precisely the least squares problem from linear regression though the dimension of $b$ is usually much larger than that of $p$.
So what linear combination of the $A$'s column vectors are closest to $b$? Assuming the column vectors are linearly independent, they form a 3D subspace of $\Re^4$. We need to map $b$ to the closest point in the space formed by $A$'s column vectors. This will be the projection of $b$ onto the column vectors of $A$ or $A^Tb$. To get this, multiply both sides of the equation by $A^T$ and solve for $p$.
\[
\begin{eqnarray}
A^TAp & = & A^Tb \\
p & = & (A^TA)^{-1}A^Tb
\end{eqnarray}
\]
Using properties of [[QR Decomposition]], its easy to show how QR decomposition can be used to solve this equation.
\[
\begin{eqnarray}
A^TAp &=& A^Tb \\
(QR)^TQRp & = & (QR)^T b \\
R^TQ^TQRp & = & R^TQ^Tb \\
R^TRp & = & R^T Q^T b \\
p & = & R^{-1} (R^T)^{-1} R^T Q^T b \\
p & = & R^{-1} Q^Tb
\end{eqnarray}
\]
This tiddler uses [[link|http://tutorial.math.lamar.edu/Classes/LinAlg/LeastSquares.aspx]] as source material for this.
Correlation is defined as:
\[ R_{xy}[k] = \sum_{n=0}^{N} x[n] y[n+k] \]
/***
|''Name:''|CryptoFunctionsPlugin|
|''Description:''|Support for cryptographic functions|
***/
//{{{
if(!version.extensions.CryptoFunctionsPlugin) {
version.extensions.CryptoFunctionsPlugin = {installed:true};
//--
//-- Crypto functions and associated conversion routines
//--
// Crypto "namespace"
function Crypto() {}
// Convert a string to an array of big-endian 32-bit words
Crypto.strToBe32s = function(str)
{
var be = Array();
var len = Math.floor(str.length/4);
var i, j;
for(i=0, j=0; i<len; i++, j+=4) {
be[i] = ((str.charCodeAt(j)&0xff) << 24)|((str.charCodeAt(j+1)&0xff) << 16)|((str.charCodeAt(j+2)&0xff) << 8)|(str.charCodeAt(j+3)&0xff);
}
while (j<str.length) {
be[j>>2] |= (str.charCodeAt(j)&0xff)<<(24-(j*8)%32);
j++;
}
return be;
};
// Convert an array of big-endian 32-bit words to a string
Crypto.be32sToStr = function(be)
{
var str = "";
for(var i=0;i<be.length*32;i+=8)
str += String.fromCharCode((be[i>>5]>>>(24-i%32)) & 0xff);
return str;
};
// Convert an array of big-endian 32-bit words to a hex string
Crypto.be32sToHex = function(be)
{
var hex = "0123456789ABCDEF";
var str = "";
for(var i=0;i<be.length*4;i++)
str += hex.charAt((be[i>>2]>>((3-i%4)*8+4))&0xF) + hex.charAt((be[i>>2]>>((3-i%4)*8))&0xF);
return str;
};
// Return, in hex, the SHA-1 hash of a string
Crypto.hexSha1Str = function(str)
{
return Crypto.be32sToHex(Crypto.sha1Str(str));
};
// Return the SHA-1 hash of a string
Crypto.sha1Str = function(str)
{
return Crypto.sha1(Crypto.strToBe32s(str),str.length);
};
// Calculate the SHA-1 hash of an array of blen bytes of big-endian 32-bit words
Crypto.sha1 = function(x,blen)
{
// Add 32-bit integers, wrapping at 32 bits
add32 = function(a,b)
{
var lsw = (a&0xFFFF)+(b&0xFFFF);
var msw = (a>>16)+(b>>16)+(lsw>>16);
return (msw<<16)|(lsw&0xFFFF);
};
// Add five 32-bit integers, wrapping at 32 bits
add32x5 = function(a,b,c,d,e)
{
var lsw = (a&0xFFFF)+(b&0xFFFF)+(c&0xFFFF)+(d&0xFFFF)+(e&0xFFFF);
var msw = (a>>16)+(b>>16)+(c>>16)+(d>>16)+(e>>16)+(lsw>>16);
return (msw<<16)|(lsw&0xFFFF);
};
// Bitwise rotate left a 32-bit integer by 1 bit
rol32 = function(n)
{
return (n>>>31)|(n<<1);
};
var len = blen*8;
// Append padding so length in bits is 448 mod 512
x[len>>5] |= 0x80 << (24-len%32);
// Append length
x[((len+64>>9)<<4)+15] = len;
var w = Array(80);
var k1 = 0x5A827999;
var k2 = 0x6ED9EBA1;
var k3 = 0x8F1BBCDC;
var k4 = 0xCA62C1D6;
var h0 = 0x67452301;
var h1 = 0xEFCDAB89;
var h2 = 0x98BADCFE;
var h3 = 0x10325476;
var h4 = 0xC3D2E1F0;
for(var i=0;i<x.length;i+=16) {
var j,t;
var a = h0;
var b = h1;
var c = h2;
var d = h3;
var e = h4;
for(j = 0;j<16;j++) {
w[j] = x[i+j];
t = add32x5(e,(a>>>27)|(a<<5),d^(b&(c^d)),w[j],k1);
e=d; d=c; c=(b>>>2)|(b<<30); b=a; a = t;
}
for(j=16;j<20;j++) {
w[j] = rol32(w[j-3]^w[j-8]^w[j-14]^w[j-16]);
t = add32x5(e,(a>>>27)|(a<<5),d^(b&(c^d)),w[j],k1);
e=d; d=c; c=(b>>>2)|(b<<30); b=a; a = t;
}
for(j=20;j<40;j++) {
w[j] = rol32(w[j-3]^w[j-8]^w[j-14]^w[j-16]);
t = add32x5(e,(a>>>27)|(a<<5),b^c^d,w[j],k2);
e=d; d=c; c=(b>>>2)|(b<<30); b=a; a = t;
}
for(j=40;j<60;j++) {
w[j] = rol32(w[j-3]^w[j-8]^w[j-14]^w[j-16]);
t = add32x5(e,(a>>>27)|(a<<5),(b&c)|(d&(b|c)),w[j],k3);
e=d; d=c; c=(b>>>2)|(b<<30); b=a; a = t;
}
for(j=60;j<80;j++) {
w[j] = rol32(w[j-3]^w[j-8]^w[j-14]^w[j-16]);
t = add32x5(e,(a>>>27)|(a<<5),b^c^d,w[j],k4);
e=d; d=c; c=(b>>>2)|(b<<30); b=a; a = t;
}
h0 = add32(h0,a);
h1 = add32(h1,b);
h2 = add32(h2,c);
h3 = add32(h3,d);
h4 = add32(h4,e);
}
return Array(h0,h1,h2,h3,h4);
};
}
//}}}
The Digital Fourier Transform $(1)$ and the inverse DFT $(2)$ are defined as:
\[
\begin{eqnarray}
X[k] & = & \sum_{n=0}^{N-1} x[n] e^{2 \pi \frac{k}{N} n } & (1) \\
x[n] & = & \frac{1}{N} \sum_{n=0}^{N-1} X[k] e^{2 \pi \frac{k}{N} n} & (2)
\end{eqnarray}
\]
$N$ is the number of frequency samples and the number of time samples. The digital frequency is:
\[
\begin{eqnarray}
\Theta(k) &=& \frac{2 \pi k}{N} & = & \text{Radian Digital Frequency} \\
\theta(k) &=& \frac{k}{N} & = & \text{Fractional Digital Frequency}
\end{eqnarray}
\]
Or in terms of the sample time $T_s$:
\[
\begin{eqnarray}
T_s & = & \text{ Sample Period } \\
f_s & = & \text{Sample Frequency} \\
\end{eqnarray}
\]
So the frequency of the DFT component is:
\[
\begin{eqnarray}
X(k) & = & \sum_{n=0}^{N-1} x(n*T_s) e^{2 \pi \frac{k}{N} f_s n T_s } \\
f(k) & = & \frac{f_s k}{N}
\end{eqnarray}
\]
/***
|''Name:''|DeprecatedFunctionsPlugin|
|''Description:''|Support for deprecated functions removed from core|
***/
//{{{
if(!version.extensions.DeprecatedFunctionsPlugin) {
version.extensions.DeprecatedFunctionsPlugin = {installed:true};
//--
//-- Deprecated code
//--
// @Deprecated: Use createElementAndWikify and this.termRegExp instead
config.formatterHelpers.charFormatHelper = function(w)
{
w.subWikify(createTiddlyElement(w.output,this.element),this.terminator);
};
// @Deprecated: Use enclosedTextHelper and this.lookaheadRegExp instead
config.formatterHelpers.monospacedByLineHelper = function(w)
{
var lookaheadRegExp = new RegExp(this.lookahead,"mg");
lookaheadRegExp.lastIndex = w.matchStart;
var lookaheadMatch = lookaheadRegExp.exec(w.source);
if(lookaheadMatch && lookaheadMatch.index == w.matchStart) {
var text = lookaheadMatch[1];
if(config.browser.isIE)
text = text.replace(/\n/g,"\r");
createTiddlyElement(w.output,"pre",null,null,text);
w.nextMatch = lookaheadRegExp.lastIndex;
}
};
// @Deprecated: Use <br> or <br /> instead of <<br>>
config.macros.br = {};
config.macros.br.handler = function(place)
{
createTiddlyElement(place,"br");
};
// Find an entry in an array. Returns the array index or null
// @Deprecated: Use indexOf instead
Array.prototype.find = function(item)
{
var i = this.indexOf(item);
return i == -1 ? null : i;
};
// Load a tiddler from an HTML DIV. The caller should make sure to later call Tiddler.changed()
// @Deprecated: Use store.getLoader().internalizeTiddler instead
Tiddler.prototype.loadFromDiv = function(divRef,title)
{
return store.getLoader().internalizeTiddler(store,this,title,divRef);
};
// Format the text for storage in an HTML DIV
// @Deprecated Use store.getSaver().externalizeTiddler instead.
Tiddler.prototype.saveToDiv = function()
{
return store.getSaver().externalizeTiddler(store,this);
};
// @Deprecated: Use store.allTiddlersAsHtml() instead
function allTiddlersAsHtml()
{
return store.allTiddlersAsHtml();
}
// @Deprecated: Use refreshPageTemplate instead
function applyPageTemplate(title)
{
refreshPageTemplate(title);
}
// @Deprecated: Use story.displayTiddlers instead
function displayTiddlers(srcElement,titles,template,unused1,unused2,animate,unused3)
{
story.displayTiddlers(srcElement,titles,template,animate);
}
// @Deprecated: Use story.displayTiddler instead
function displayTiddler(srcElement,title,template,unused1,unused2,animate,unused3)
{
story.displayTiddler(srcElement,title,template,animate);
}
// @Deprecated: Use functions on right hand side directly instead
var createTiddlerPopup = Popup.create;
var scrollToTiddlerPopup = Popup.show;
var hideTiddlerPopup = Popup.remove;
// @Deprecated: Use right hand side directly instead
var regexpBackSlashEn = new RegExp("\\\\n","mg");
var regexpBackSlash = new RegExp("\\\\","mg");
var regexpBackSlashEss = new RegExp("\\\\s","mg");
var regexpNewLine = new RegExp("\n","mg");
var regexpCarriageReturn = new RegExp("\r","mg");
}
//}}}
In an equation like:
\[ \dot{x} + \alpha x = \beta sin(t) \]
You can change this into a 2nd order problem:
\[
\begin{eqnarray}
\dot{x_1} & = & -\alpha x + \beta sin(x_2) \\
\dot{x_2} & = & 1
\end{eqnarray}
\]
\[
\int_{-inf}^{inf} \delta(\alpha x) f(x) dx = \frac{f(0)}{|\alpha|}
\]
For a smooth function $ g(x) $:
\[
\int_{-inf}^{inf} \delta(g(x)) f(x) dx = \sum_i \frac{f(x_i)}{|g'(x_i)|}
\]
where $x_i$ is the $i^{th}$ root of $g(x)$.
{{{
from scipy import *
import scipy.linalg as l
M=matrix('[0.5 0.5; 1.0 0]')
a,lv,rv=l.eig(M,left=True)
lv0=matrix(lv[:,0])
lv0*T
rv0=matrix(rv[:,0]).transpose()
T*rv0
}}}
|!Freq (Hz)|!Lambda (m)|!Apps|!Names|!Techniques|
|30|10M|Audio| Radio|Circuit|
|300|1M|Audio|Radio|Circuit|
|3k|100k|Audio|Radio|Circuit|
|30k|10k|LF|Radio|Circuit, RF|
|300k|1k|MF AM|Radio|Circuit,RF|
|3M|100|HF Shortwave|Radio|Circuit RF|
|30M|10|VHF TV FM|Radio|Circuit RF|
|300M|1|UHF Cellular TV|Microwave|Circuit RF|
|3G|10c|Satellite TV Cellular|Microwave|Circuit RF Microwave|
|30G|1 m|Radar|Microwave|Circuit RF Microwave Optics|
|300G|100 u||Far Infrared|Circuit RF Microwave Optics|
|3T|100u||Far Infrared|Microwave Optics|
|30T|10u|Fiber Optics (850-1550 nm)|Near Infrared|Optics Photonics|
|300T|1u|Visible Light|Light|Optics Photonics|
|3P|100n||Ultraviolet|Optics|
|30P|10n||X-Ray||
|300P|1n||X-Ray||
|3E|1A|Medical X-Ray|X-Ray||
|30E|10p||Gamma Rays||
|300E|1p||Gamma Rays||
pg 5 Electromagnetics Explained by Ron Shmitt
Electrostatic Induction is the induction of polarization on a non-charged object when a charged object is brought near.
To detect 60 Hz AC on a wire, the detector detect 60Hz Electrostatic Induction.
This is not receiving the 60Hz radiated wave or near field induction. I don't know if you can measure current, voltage or power strength.
The evidence function is
\[ ln p(t|\alpha,\beta) = \frac{M}{2} ln \alpha + \frac{N}{2} ln \beta - E(m_N) - \frac{1}{2} ln |A| - \frac{N}{2} ln 2 \pi \]
with
\[A = \alpha I + \beta \Phi^T \Phi \]
\[ m_N = \beta A^{-1} \Phi^T t \]
\[ E(m_N) = \frac{\beta}{2} || t - \Phi m_N ||^2 + \frac{\alpha}{2} m_N^T m_N \]
This is maximized to find $\alpha$ and $\beta$.
This found by finding:
\[ p(t | \alpha \beta) - \int p(t|w,\beta) p(w|\alpha) dw \]
Where $\beta$ is the precision of the noise added and $\alpha$ is the precision of the distribution on alpha.
Using $p(w|\alpha)$:
\[ p(w|\alpha) = \frac{1}{(2 \pi)^{M/2}} \frac{1}{(\alpha^{-1})^{1/2}} e^{\frac{-w^T w}{2 \alpha^{-1}}}\]
and the likelihood function $p(t|w,\beta)$:
\[p(t|w,\beta) = \frac{1}{(2 \pi)^{N/2}} \frac{1}{(\beta^{-1})^{1/2}} e^{\frac{-(t-\Phi w)^T (t - \Phi w)}{2 \beta^{-1}}}\]
Completing the square on the likelihood function for $w$ results in:
\[A = \alpha I + \beta \Phi^T \Phi \]
$A$ is called the //Hessian matrix//. Note that it is equal to $S_N^{-1}$.
\[ m_N = \beta A^{-1} \Phi^T t \]
FITS are the number of expected Faults in a billion hours.
\[ FITS = \frac{10^9}{MTBF} \]
Failure rate is defined as:
\[
F_r = \frac{\text{Number failed in the instant}}{\text{Alive at the beginning of the instance}}
\]
The limit is taken as the instance width goes to zero.
\[
F_r(t) = \frac{f(t)}{R(t)}
\]
\[
f_n = f_{n-1} + f_{n-2}
\]
\[
\begin{eqnarray}
f_0 &= &1 \\
f_1 &=& 1
\end{eqnarray}
\]
1 1 2 3 5 8 13 21 34 55
From __An Introduction to Number Theory__ Lecture 5
[img(auto,300px)[Images/frobenius-perron-equation.png]]
\[
p_{n+1}(y) = \int \delta(y-T(x)) p_n(x) dx
\]
see [[Dirac Delta Function]]
\[
\begin{eqnarray}
\Gamma(\alpha) = \int_0^\infty z^{\alpha-1}e^{-z} dz & \alpha>0
\end{eqnarray}
\]
Properties:
\[
\begin{eqnarray}
\Gamma(1) & = &1 \\
\Gamma(\alpha) &= & (\alpha-1) \Gamma(\alpha-1)
\end{eqnarray}
\]
Type the text for 'New Tiddler'
\[
\dot{x}=r x + x^3 - x^5
\]
/***
|Name|ImageSizePlugin|
|Source|http://www.TiddlyTools.com/#ImageSizePlugin|
|Version|1.2.1|
|Author|Eric Shulman|
|License|http://www.TiddlyTools.com/#LegalStatements|
|~CoreVersion|2.1|
|Type|plugin|
|Description|adds support for resizing images|
This plugin adds optional syntax to scale an image to a specified width and height and/or interactively resize the image with the mouse.
!!!!!Usage
<<<
The extended image syntax is:
{{{
[img(w+,h+)[...][...]]
}}}
where ''(w,h)'' indicates the desired width and height (in CSS units, e.g., px, em, cm, in, or %). Use ''auto'' (or a blank value) for either dimension to scale that dimension proportionally (i.e., maintain the aspect ratio). You can also calculate a CSS value 'on-the-fly' by using a //javascript expression// enclosed between """{{""" and """}}""". Appending a plus sign (+) to a dimension enables interactive resizing in that dimension (by dragging the mouse inside the image). Use ~SHIFT-click to show the full-sized (un-scaled) image. Use ~CTRL-click to restore the starting size (either scaled or full-sized).
<<<
!!!!!Examples
<<<
{{{
[img(100px+,75px+)[images/meow2.jpg]]
}}}
[img(100px+,75px+)[images/meow2.jpg]]
{{{
[<img(34%+,+)[images/meow.gif]]
[<img(21% ,+)[images/meow.gif]]
[<img(13%+, )[images/meow.gif]]
[<img( 8%+, )[images/meow.gif]]
[<img( 5% , )[images/meow.gif]]
[<img( 3% , )[images/meow.gif]]
[<img( 2% , )[images/meow.gif]]
[img( 1%+,+)[images/meow.gif]]
}}}
[<img(34%+,+)[images/meow.gif]]
[<img(21% ,+)[images/meow.gif]]
[<img(13%+, )[images/meow.gif]]
[<img( 8%+, )[images/meow.gif]]
[<img( 5% , )[images/meow.gif]]
[<img( 3% , )[images/meow.gif]]
[<img( 2% , )[images/meow.gif]]
[img( 1%+,+)[images/meow.gif]]
{{tagClear{
}}}
<<<
!!!!!Revisions
<<<
2009.02.24 [1.2.1] cleanup width/height regexp, use '+' suffix for resizing
2009.02.22 [1.2.0] added stretchable images
2008.01.19 [1.1.0] added evaluated width/height values
2008.01.18 [1.0.1] regexp for "(width,height)" now passes all CSS values to browser for validation
2008.01.17 [1.0.0] initial release
<<<
!!!!!Code
***/
//{{{
version.extensions.ImageSizePlugin= {major: 1, minor: 2, revision: 1, date: new Date(2009,2,24)};
//}}}
//{{{
var f=config.formatters[config.formatters.findByField("name","image")];
f.match="\\[[<>]?[Ii][Mm][Gg](?:\\([^,]*,[^\\)]*\\))?\\[";
f.lookaheadRegExp=/\[([<]?)(>?)[Ii][Mm][Gg](?:\(([^,]*),([^\)]*)\))?\[(?:([^\|\]]+)\|)?([^\[\]\|]+)\](?:\[([^\]]*)\])?\]/mg;
f.handler=function(w) {
this.lookaheadRegExp.lastIndex = w.matchStart;
var lookaheadMatch = this.lookaheadRegExp.exec(w.source)
if(lookaheadMatch && lookaheadMatch.index == w.matchStart) {
var floatLeft=lookaheadMatch[1];
var floatRight=lookaheadMatch[2];
var width=lookaheadMatch[3];
var height=lookaheadMatch[4];
var tooltip=lookaheadMatch[5];
var src=lookaheadMatch[6];
var link=lookaheadMatch[7];
// Simple bracketted link
var e = w.output;
if(link) { // LINKED IMAGE
if (config.formatterHelpers.isExternalLink(link)) {
if (config.macros.attach && config.macros.attach.isAttachment(link)) {
// see [[AttachFilePluginFormatters]]
e = createExternalLink(w.output,link);
e.href=config.macros.attach.getAttachment(link);
e.title = config.macros.attach.linkTooltip + link;
} else
e = createExternalLink(w.output,link);
} else
e = createTiddlyLink(w.output,link,false,null,w.isStatic);
addClass(e,"imageLink");
}
var img = createTiddlyElement(e,"img");
if(floatLeft) img.align="left"; else if(floatRight) img.align="right";
if(width||height) {
var x=width.trim(); var y=height.trim();
var stretchW=(x.substr(x.length-1,1)=='+'); if (stretchW) x=x.substr(0,x.length-1);
var stretchH=(y.substr(y.length-1,1)=='+'); if (stretchH) y=y.substr(0,y.length-1);
if (x.substr(0,2)=="{{")
{ try{x=eval(x.substr(2,x.length-4))} catch(e){displayMessage(e.description||e.toString())} }
if (y.substr(0,2)=="{{")
{ try{y=eval(y.substr(2,y.length-4))} catch(e){displayMessage(e.description||e.toString())} }
img.style.width=x.trim(); img.style.height=y.trim();
config.formatterHelpers.addStretchHandlers(img,stretchW,stretchH);
}
if(tooltip) img.title = tooltip;
// GET IMAGE SOURCE
if (config.macros.attach && config.macros.attach.isAttachment(src))
src=config.macros.attach.getAttachment(src); // see [[AttachFilePluginFormatters]]
else if (config.formatterHelpers.resolvePath) { // see [[ImagePathPlugin]]
if (config.browser.isIE || config.browser.isSafari) {
img.onerror=(function(){
this.src=config.formatterHelpers.resolvePath(this.src,false);
return false;
});
} else
src=config.formatterHelpers.resolvePath(src,true);
}
img.src=src;
w.nextMatch = this.lookaheadRegExp.lastIndex;
}
}
config.formatterHelpers.addStretchHandlers=function(e,stretchW,stretchH) {
e.title=((stretchW||stretchH)?'DRAG=stretch/shrink, ':'')
+'SHIFT-CLICK=show full size, CTRL-CLICK=restore initial size';
e.statusMsg='width=%0, height=%1';
e.style.cursor='move';
e.originalW=e.style.width;
e.originalH=e.style.height;
e.minW=Math.max(e.offsetWidth/20,10);
e.minH=Math.max(e.offsetHeight/20,10);
e.stretchW=stretchW;
e.stretchH=stretchH;
e.onmousedown=function(ev) { var ev=ev||window.event;
this.sizing=true;
this.startX=!config.browser.isIE?ev.pageX:(ev.clientX+findScrollX());
this.startY=!config.browser.isIE?ev.pageY:(ev.clientY+findScrollY());
this.startW=this.offsetWidth;
this.startH=this.offsetHeight;
return false;
};
e.onmousemove=function(ev) { var ev=ev||window.event;
if (this.sizing) {
var s=this.style;
var currX=!config.browser.isIE?ev.pageX:(ev.clientX+findScrollX());
var currY=!config.browser.isIE?ev.pageY:(ev.clientY+findScrollY());
var newW=(currX-this.offsetLeft)/(this.startX-this.offsetLeft)*this.startW;
var newH=(currY-this.offsetTop )/(this.startY-this.offsetTop )*this.startH;
if (this.stretchW) s.width =Math.floor(Math.max(newW,this.minW))+'px';
if (this.stretchH) s.height=Math.floor(Math.max(newH,this.minH))+'px';
clearMessage(); displayMessage(this.statusMsg.format([s.width,s.height]));
}
return false;
};
e.onmouseup=function(ev) { var ev=ev||window.event;
if (ev.shiftKey) { this.style.width=this.style.height=''; }
if (ev.ctrlKey) { this.style.width=this.originalW; this.style.height=this.originalH; }
this.sizing=false;
clearMessage();
return false;
};
e.onmouseout=function(ev) { var ev=ev||window.event;
this.sizing=false;
clearMessage();
return false;
};
}
//}}}
[[Windows Instructions|http://pubpages.unh.edu/~jsh3/jsMath/]]
\[
\begin{eqnarray}
\int \frac{dx}{1-x^2} & = & \int \frac{dx}{(1-x)(1+x)} \\
\int \frac{A}{1-x} dx + \int \frac{B}{1+x} dx & = & -A \cdot ln(1-x) + B \cdot ln(1+x) \\
\int \frac{\frac{1}{2}}{1-x} dx + \int \frac{\frac{1}{2}}{1+x} dx & = & -\frac{1}{2} ln(1-x) + \frac{1}{2} ln(1+x)
\end{eqnarray}
\]
You can use [[Partial Fraction Expansion]] to determine A and B.
{{{
from sympy import *
integrate(x+sinh(x),x)
}}}
/***
|Name|Plugin: jsMath|
|Created by|BobMcElrath|
|Email|my first name at my last name dot org|
|Location|http://bob.mcelrath.org/tiddlyjsmath.html|
|Version|1.5.1|
|Requires|[[TiddlyWiki|http://www.tiddlywiki.com]] ≥ 2.0.3, [[jsMath|http://www.math.union.edu/~dpvc/jsMath/]] ≥ 3.0|
!Description
LaTeX is the world standard for specifying, typesetting, and communicating mathematics among scientists, engineers, and mathematicians. For more information about LaTeX itself, visit the [[LaTeX Project|http://www.latex-project.org/]]. This plugin typesets math using [[jsMath|http://www.math.union.edu/~dpvc/jsMath/]], which is an implementation of the TeX math rules and typesetting in javascript, for your browser. Notice the small button in the lower right corner which opens its control panel.
!Installation
In addition to this plugin, you must also [[install jsMath|http://www.math.union.edu/~dpvc/jsMath/download/jsMath.html]] on the same server as your TiddlyWiki html file. If you're using TiddlyWiki without a web server, then the jsMath directory must be placed in the same location as the TiddlyWiki html file.
I also recommend modifying your StyleSheet use serif fonts that are slightly larger than normal, so that the math matches surrounding text, and \\small fonts are not unreadable (as in exponents and subscripts).
{{{
.viewer {
line-height: 125%;
font-family: serif;
font-size: 12pt;
}
}}}
If you had used a previous version of [[Plugin: jsMath]], it is no longer necessary to edit the main tiddlywiki.html file to add the jsMath <script> tag. [[Plugin: jsMath]] now uses ajax to load jsMath.
!History
* 11-Nov-05, version 1.0, Initial release
* 22-Jan-06, version 1.1, updated for ~TW2.0, tested with jsMath 3.1, editing tiddlywiki.html by hand is no longer necessary.
* 24-Jan-06, version 1.2, fixes for Safari, Konqueror
* 27-Jan-06, version 1.3, improved error handling, detect if ajax was already defined (used by ZiddlyWiki)
* 12-Jul-06, version 1.4, fixed problem with not finding image fonts
* 26-Feb-07, version 1.5, fixed problem with Mozilla "unterminated character class".
* 27-Feb-07, version 1.5.1, Runs compatibly with TW 2.1.0+, by Bram Chen
!Examples
|!Source|!Output|h
|{{{The variable $x$ is real.}}}|The variable $x$ is real.|
|{{{The variable \(y\) is complex.}}}|The variable \(y\) is complex.|
|{{{This \[\int_a^b x = \frac{1}{2}(b^2-a^2)\] is an easy integral.}}}|This \[\int_a^b x = \frac{1}{2}(b^2-a^2)\] is an easy integral.|
|{{{This $$\int_a^b \sin x = -(\cos b - \cos a)$$ is another easy integral.}}}|This $$\int_a^b \sin x = -(\cos b - \cos a)$$ is another easy integral.|
|{{{Block formatted equations may also use the 'equation' environment \begin{equation} \int \tan x = -\ln \cos x \end{equation} }}}|Block formatted equations may also use the 'equation' environment \begin{equation} \int \tan x = -\ln \cos x \end{equation}|
|{{{Equation arrays are also supported \begin{eqnarray} a &=& b \\ c &=& d \end{eqnarray} }}}|Equation arrays are also supported \begin{eqnarray} a &=& b \\ c &=& d \end{eqnarray} |
|{{{I spent \$7.38 on lunch.}}}|I spent \$7.38 on lunch.|
|{{{I had to insert a backslash (\\) into my document}}}|I had to insert a backslash (\\) into my document|
!Code
***/
//{{{
// AJAX code adapted from http://timmorgan.org/mini
// This is already loaded by ziddlywiki...
if(typeof(window["ajax"]) == "undefined") {
ajax = {
x: function(){try{return new ActiveXObject('Msxml2.XMLHTTP')}catch(e){try{return new ActiveXObject('Microsoft.XMLHTTP')}catch(e){return new XMLHttpRequest()}}},
gets: function(url){var x=ajax.x();x.open('GET',url,false);x.send(null);return x.responseText}
}
}
// Load jsMath
jsMath = {
Setup: {inited: 1}, // don't run jsMath.Setup.Body() yet
Autoload: {root: new String(document.location).replace(/[^\/]*$/,'jsMath/')} // URL to jsMath directory, change if necessary
//Autoload: {root: new String('/home/erhart/Documents/Wiki/Math/jsMath/')} // URL to jsMath directory, change if necessary
};
var jsMathstr;
try {
jsMathstr = ajax.gets(jsMath.Autoload.root+"jsMath.js");
} catch(e) {
alert("jsMath was not found: you must place the '../jsMath' directory in the same place as this file. "
+"The error was:\n"+e.name+": "+e.message);
throw(e); // abort eval
}
try {
window.eval(jsMathstr);
} catch(e) {
alert("jsMath failed to load. The error was:\n"+e.name + ": " + e.message + " on line " + e.lineNumber);
}
jsMath.Setup.inited=0; // allow jsMath.Setup.Body() to run again
// Define wikifers for latex
config.formatterHelpers.mathFormatHelper = function(w) {
var e = document.createElement(this.element);
e.className = this.className;
var endRegExp = new RegExp(this.terminator, "mg");
endRegExp.lastIndex = w.matchStart+w.matchLength;
var matched = endRegExp.exec(w.source);
if(matched) {
var txt = w.source.substr(w.matchStart+w.matchLength,
matched.index-w.matchStart-w.matchLength);
if(this.keepdelim) {
txt = w.source.substr(w.matchStart, matched.index+matched[0].length-w.matchStart);
}
e.appendChild(document.createTextNode(txt));
w.output.appendChild(e);
w.nextMatch = endRegExp.lastIndex;
}
}
config.formatters.push({
name: "displayMath1",
match: "\\\$\\\$",
terminator: "\\\$\\\$\\n?", // 2.0 compatability
termRegExp: "\\\$\\\$\\n?",
element: "div",
className: "math",
handler: config.formatterHelpers.mathFormatHelper
});
config.formatters.push({
name: "inlineMath1",
match: "\\\$",
terminator: "\\\$", // 2.0 compatability
termRegExp: "\\\$",
element: "span",
className: "math",
handler: config.formatterHelpers.mathFormatHelper
});
var backslashformatters = new Array(0);
backslashformatters.push({
name: "inlineMath2",
match: "\\\\\\\(",
terminator: "\\\\\\\)", // 2.0 compatability
termRegExp: "\\\\\\\)",
element: "span",
className: "math",
handler: config.formatterHelpers.mathFormatHelper
});
backslashformatters.push({
name: "displayMath2",
match: "\\\\\\\[",
terminator: "\\\\\\\]\\n?", // 2.0 compatability
termRegExp: "\\\\\\\]\\n?",
element: "div",
className: "math",
handler: config.formatterHelpers.mathFormatHelper
});
backslashformatters.push({
name: "displayMath3",
match: "\\\\begin\\{equation\\}",
terminator: "\\\\end\\{equation\\}\\n?", // 2.0 compatability
termRegExp: "\\\\end\\{equation\\}\\n?",
element: "div",
className: "math",
handler: config.formatterHelpers.mathFormatHelper
});
// These can be nested. e.g. \begin{equation} \begin{array}{ccc} \begin{array}{ccc} ...
backslashformatters.push({
name: "displayMath4",
match: "\\\\begin\\{eqnarray\\}",
terminator: "\\\\end\\{eqnarray\\}\\n?", // 2.0 compatability
termRegExp: "\\\\end\\{eqnarray\\}\\n?",
element: "div",
className: "math",
keepdelim: true,
handler: config.formatterHelpers.mathFormatHelper
});
// The escape must come between backslash formatters and regular ones.
// So any latex-like \commands must be added to the beginning of
// backslashformatters here.
backslashformatters.push({
name: "escape",
match: "\\\\.",
handler: function(w) {
w.output.appendChild(document.createTextNode(w.source.substr(w.matchStart+1,1)));
w.nextMatch = w.matchStart+2;
}
});
config.formatters=backslashformatters.concat(config.formatters);
window.wikify = function(source,output,highlightRegExp,tiddler)
{
if(source && source != "") {
if(version.major == 2 && version.minor > 0) {
var wikifier = new Wikifier(source,getParser(tiddler),highlightRegExp,tiddler);
wikifier.subWikifyUnterm(output);
} else {
var wikifier = new Wikifier(source,formatter,highlightRegExp,tiddler);
wikifier.subWikify(output,null);
}
jsMath.ProcessBeforeShowing();
}
}
//}}}
asdf
$$\int_a^b \sin x = -(\cos b - \cos a)$$
asdf
If you have a set of equations:
\[
\begin{eqnarray}
\dot{x} &=& f(x,y) \\
\dot{y} &=& g(x,y)
\end{eqnarray}
\]
The Jacobian is a matrix:
\[
J =
\left[ \begin{array}{cc}
\frac{\partial f}{\partial x} & \frac{\partial f}{\partial y} \\
\frac{\partial g}{\partial x} & \frac{\partial g}{\partial y}
\end{array} \right]
\]
This [[article|http://lwn.net/Articles/237924/]] summarizes two important disk drive failure studies presented in 2007 at the USENIX File Systems and Storage Technology Conference.
[[CMU HDD Failure Study]] and the [[Google HDD Failure Study]]
Predictions are based on linear combinations of a kernel function evaluated at the training data points.
For a fixed non-linear feature space mapping $\phi(x)$ the kernel is given:
\[k(x,x') = \phi(x)^T \phi(x')\]
The kernel leads to the following prediction for $y(x)$ :
\[ y(x) = k(x)^T (K+\lambda I_N)^{-1} t \]
\[ k_n(x) = k(x_n,x) \]
This is found by minimizing regulized sum of squares:
\[ J(w) = \frac{1}{2} \sum_{n=1}^{N} \{ w^T \phi(x_n) - t_n \}^2 + \frac{\lambda}{2} w^T w\]
Taking the gradient wrt $w$, setting it to 0, and solving for $w$ yields:
\[w= -\frac{1}{\lambda} \sum_{n=1}^{N} \{ w^T \phi(x_x) - t_n \} \phi(x_n) = \sum_{n=1}^{N} a_n \phi(x_n) = \Phi^T a \]
\[a_n = - \frac{1}{\lambda}\{ w^T \phi(x_n) - t_n \} \]
$\Phi$ defined as:
\[ \Phi = \left[ \begin{array}{cccc}
\phi_0(x_1) & \phi_1(x_1) & \cdots & \phi_{M-1}(x_1) \\
\phi_0(x_2) & \phi_1(x_2) & \cdots & \phi_{M-1}(x_2) \\
\vdots & \vdots & \ddots & \vdots \\
\phi_0(x_N) & \phi_1(x_N) & \cdots & \phi_{M-1}(x_N) \\
\end{array} \right] \]
Rather than working with $w$, we substitute $a$ back into $J(w)$.
\[J(a) = \frac{1}{2} a^T \Phi \Phi^T \Phi \Phi^T a - a^T \Phi \Phi^T t + \frac{1}{2} t^T t + \frac{\lambda}{2} a^T \Phi \Phi^T a \]
\[K = \Phi \Phi^T \]
\[J(a)= \frac{1}{2} a^T K K^T a - a^T K t + \frac{1}{2} t^T t + \frac{\lambda}{2} a^T K a \]
Setting the gradient of $J(a)$ wrt to a to 0, we get:
\[a = (K + \lambda I_N)^{-1} t \]
\[y(x) = w^T \phi(x) = a^T \Phi \phi(x) = k(x)^T (K+\lambda I_N)^{-1} t\]
Note that $K+\lambda I_N$ is a NxN matrix. So this is worse than finding $w$ directly as it requires inverting an NxN matrix rather than a typically smaller MxM matrix.
To do bra and kets:
\\langle \\psi \\mid \\Psi \\rangle
\[
\langle \psi \mid \Psi \rangle
\]
/***
|''Name:''|LegacyStrikeThroughPlugin|
|''Description:''|Support for legacy (pre 2.1) strike through formatting|
|''Version:''|1.0.2|
|''Date:''|Jul 21, 2006|
|''Source:''|http://www.tiddlywiki.com/#LegacyStrikeThroughPlugin|
|''Author:''|MartinBudden (mjbudden (at) gmail (dot) com)|
|''License:''|[[BSD open source license]]|
|''CoreVersion:''|2.1.0|
***/
//{{{
// Ensure that the LegacyStrikeThrough Plugin is only installed once.
if(!version.extensions.LegacyStrikeThroughPlugin) {
version.extensions.LegacyStrikeThroughPlugin = {installed:true};
config.formatters.push(
{
name: "legacyStrikeByChar",
match: "==",
termRegExp: /(==)/mg,
element: "strike",
handler: config.formatterHelpers.createElementAndWikify
});
} //# end of "install only once"
//}}}
{{{
from sympy import *
x=Symbol("x")
limit(sin(x)/x,x,0)
help limit
}}}
[img(400px,auto)[lorenz_attractor_python_one.png]] [img(400px,auto)[lorenz_attractor_python_two.png]]
Generated as described in [[Python Lorenz Attractor in Python]]
Here are the Lorenz Equations:
\[
\begin{eqnarray}
\dot{x} & = & \sigma (y-x) \\
\dot{y} & = & rx - y - xz \\
\dot{z} & = & xy - bz
\end{eqnarray}
\]
With: \[ \sigma,r,b > 0 \]
See [[Lorenz Attractor Plots]]
Fibonacci with $ f_0 = 2 $ and $ f_1 = 1 $.
2 1 3 4 7 11 18 29 47 76 ...
1 1 2 3 5 8
_ _ 3 4 7 ...
$ l_n = f_{n} + f_{n-2} $
From __An Introduction to Number Theory__ Lecture 5
!Math
[[NonLinear ODE]]
[[Chaos]]
!Systems Engineering
[[Reliability]]
[[Capacity]]
[[Performance]]
!EE
[[Emag]]
For the 3 State Markov Model
[img[state_3_graph.jpg]]
with $\mu=10$ and $\lambda=5$
The Markov Transition Matrix can be written as
\[ P_t = \left[ \begin{array}{ccc}
1-\lambda & \mu & 0 \\
\mu & 1-\lambda-\mu & \lambda \\
0 & \mu & 1-\mu
\end{array} \right] \]
We are looking for the set point where:
\[ p_o = P_t p_o =
\left[ \begin{array}{ccc}
1-\lambda & \lambda & 0 \\
\mu & 1-\lambda-\mu & \lambda \\
0 & \mu & 1-\mu
\end{array} \right]
\left[ \begin{array}{c} p_0 \\ p_1 \\ p_2 \end{array} \right]
\]
Simplify $p_o = P_t p_o$ to $0 = (P_t - I) p_o$ and define $P_e = (P_t - I)$. Now we need to find $p_o$ that satisfies this equation with the constraint that $p_0 + p_1 +p_2 = 1$.
To do this, form
\[
\left[ \begin{array}{c} 0 \\ 0 \\ 0 \\ 1 \end{array} \right]
=
\left[ \begin{array}{ccc}
-\lambda & \lambda & 0 \\
\mu & -\lambda-\mu & \lambda \\
0 & \mu & -\mu \\
1 & 1 & 1
\end{array} \right]
\left[ \begin{array}{c} p_0 \\ p_1 \\ p_2 \end{array} \right] = P p_o
\]
3 State Markov Model
[img[state_3_graph.jpg]]
Let $\mu=10$ and $\lambda=5$
Because of the structure, you can solve for the static probabilities by writing down the transition equations for state 0 and state 1.
\[ p_0 = (1 - \lambda) p_0 + \mu p_1 \]
\[ p_1 = \lambda p_0 + \mu p_2 + (1 - \lambda -\mu) p_1 \]
Solving for these
\[ p_1 = \frac{\lambda}{\mu} p_0 \]
\[ p_2 = \frac{\lambda}{\mu} p_1 \]
with
\[ 1 = p_0 + p_1 + p_2 = p_0 + \frac{\lambda}{\mu} + \frac{\lambda}{\mu}^2 \]
to get
\[ p_0 = \frac{1}{1+\frac{\lambda}{\mu}+\frac{\lambda}{\mu}^2} = 0.57143\]
\[ p_1 = \frac{\frac{\lambda}{\mu}}{1+\frac{\lambda}{\mu}+\frac{\lambda}{\mu}^2} = 0.28572\]
\[ p_2 = \frac{\frac{\lambda}{\mu}^2}{1+\frac{\lambda}{\mu}+\frac{\lambda}{\mu}^2} = 0.14286\]
If you make a matrix with state transition probabilities, you can find the static probabilities by multiplying the matrix by any distribution over and over.
To see why this work form the matrix
\[
P = \left[ \begin{array}{ccc}
p_{00} & p_{10} & p_{20} \\
p_{01} & p_{11} & p_{21} \\
p_{02} & p_{12} & p_{22}
\end{array} \right]
\]
where $p_{ij}$ is the probability of transitioning from state $i$ to state $j$ given that the current state is $i$.
If multiply by a probability vector ($\left[\begin{array}{ccc} q_0 & q_1 & q_2 \end{array} \right]^T$), we can see how this will form a new vector where the elements sum to one (i.e. a new probability vector).
\[
PQ = \left[\begin{array}{ccccc}
p_{00} q_0 & + & p_{01} q_1 & + & p_{02} q_2 \\
p_{01} q_0 & + & p_{11} q_1 & + & p_{21} q_2 \\
p_{02} q_0 & + & p_{12} q_1 & + & p_{22} q_2
\end{array}\right]
\]
Note if you sum the rows of the resulting vector, you get
\[
( p_{00} + p_{01} + p_{02} ) q_0 +
( p_{10} + p_{11} + p_{12} ) q_1 +
( p_{20} + p_{21} + p_{22} ) q_2 = q_0 + q_1 + q_2 = 1
\]
So if the all the columns of $P$ sum to one and each element in the column is greater than 0, you should be able to find the static probabilities by raising $P$ to some largish power. Though this really isn't solid ...
\[ ln p(t|\alpha,\beta) = \frac{M}{2} ln \alpha + \frac{N}{2} ln \beta - E(m_N) - \frac{1}{2} ln |A| - \frac{N}{2} ln 2 \pi \]
Three terms depend on $\alpha$: $ln |A|$, $E(m_N)$ and $ ln \alpha$. Find the following eigenvalues:
\[ (\beta \Phi^T \Phi) u_i = \lambda_i u_i \]
$A$ will then have the eigenvalues $\alpha+\lambda_i$ and the $ln |A|$ term can be addressed by
\[ \frac{d}{d \alpha} ln |A| = \frac{d}{d \alpha} ln \Pi (\lambda_i + \alpha) - \sum_{i} \frac{1}{\lambda_i + \alpha} \]
So solve:
\[ 0 = \frac{M}{2 \alpha} - \frac{1}{2} m_N^T m_N - \frac{1}{2} \sum_i \frac{1}{\lambda_i + \alpha} \]
or
\[ \alpha m_N^T m_N = M - \alpha \sum_i \frac{1}{\lambda_i + \alpha} = \gamma \]
$\gamma$ can be written
\[\gamma = \sum_i \frac{\lambda_i}{\alpha+\lambda_i}\]
and, finally,
\[\alpha=\frac{\gamma}{m_N^T m_N}\]
Since $m_N$ and $\gamma$ depend on $\alpha$, an initial $\alpha$ is chosen and then recalculated once $m_N$ and $\gamma$ is calculated. The process then repeats until $\alpha$ converges.
A similar function for $\beta$ can be derived.
\[ \frac{1}{\beta} = \frac{1}{N-\gamma} ||t - \Phi m_N ||^2\]
or
\[ \frac{1}{\beta} = \frac{1}{N-\gamma} \sum_{n=1}^{N} \{t_n - m_N^T \phi(x_n)\}^2\]
/***
!Code
***/
//{{{
function MainMenu()
{
this.subMenuShowing = 0;
this.timeout = 500;
this.closeTimer = 0;
var myClass = this;
this.close = function() {
if (this.subMenuShowing) {
document.getElementById(this.subMenuShowing).style.visibility
= "hidden";
this.subMenuShowing = 0;
}
}
this.onTimerExpiry = function() {
myClass.close();
}
this.open = function(id) {
this.stopCloseTimer();
this.close();
document.getElementById(id).style.visibility = "visible";
this.subMenuShowing = id;
}
this.startCloseTimer = function() {
this.closeTimer = window.setTimeout(this.onTimerExpiry,this.timeout);
}
this.stopCloseTimer = function() {
if (this.closeTimer) {
window.clearTimeout(this.closeTimer);
this.closeTimer = null;
}
}
}
mainMenu=new MainMenu();
//}}}
http://users.cse.ucdavis.edu/~chaos/courses/nlp/
This main tag covers Non-Linear Ordinary Differential Equations
This particular equation arises in a lot of areas.
\[
\dot{\theta} = \omega - a \sin(\theta)
\]
[img(auto,300px)[nonuniform_osc_thetadot.png]]
For the case where \(\omega\ > a \), the system spends most of its time in the region where \( \dot{\theta} \) is low.
The period of the [Nonuniform Oscillator] can be calculated by integrating little steps of time over the change of \(\theta\) through a \(2\pi\) cycle.
\[
T=\int_0^{2\pi} \frac{dt}{d\theta} d\theta = \int_0^{2\pi} \frac{1}{\dot{\theta}} d\theta
\]
Subing in:
\[
T= = \int_0^{2\pi} \frac{1}{ \omega - a \sin(\theta) } d\theta
\]
Using [Integration in sympy], we get ... junk.
$4^{th}$ order Runge-Kutta method achieves good balance of computational cost and accuracy. For $\dot{x} = f(x)$, $x_{n+1}$ in terms of $x_n$ can be found by finding:
\[
\begin{eqnarray}
k_1 & = & f(x_n) \Delta t \\
k_2 & = & f(x_n + \frac{1}{2} k_1) \Delta t \\
k_3 & = & f(x_n + \frac{1}{2} k_2) \Delta t \\
k_4 & = & f(x_n + k_3) \Delta t
\end{eqnarray}
\]
Then $x_{n+1}$ is given by
\[
x_{n+1} = x_n + \frac{1}{6} ( k_1 + 2 k_2 + 2 k+3 + k_4)
\]
An operator can also be expressed in the form:
\[
X = a \mid 0 \rangle \langle 0 \mid +
b \mid 0 \rangle \langle 1 \mid +
c \mid 1 \rangle \langle 0 \mid +
d \mid 1 \rangle \langle 1 \mid
\]
Using the [[Operator Matrix Notation]], you can find \(a\),\(b\),\(c\) and \(d\). This is particularly easy when the basis vectors are orthanormal:
\[
\begin{eqnarray}
\langle 0 \mid X \mid 0 \rangle & = &\langle 0 \mid
\left(
a \mid 0 \rangle \langle 0 \mid +
b \mid 0 \rangle \langle 1 \mid +
c \mid 1 \rangle \langle 0 \mid +
d \mid 1 \rangle \langle 1 \mid
\right) \\
& = &
a \langle 0 \mid 0 \rangle \langle 0 \mid 0 \rangle +
b \langle 0 \mid 0 \rangle \langle 1 \mid 0 \rangle +
c \langle 0 \mid 1 \rangle \langle 0 \mid 0 \rangle +
d \langle 0 \mid 1 \rangle \langle 1 \mid 0 \rangle \\
& = &
a \cdot 1 \cdot 1 +
b \cdot 1 \cdot 0 +
c \cdot 0 \cdot 0 +
d \cdot 0 \cdot 0 \\
& = & a
\end{eqnarray}
\]
This leads to the following dirac representation of operator \(X\):
\[
X = \mid 0 \rangle \langle 1 \mid + \mid 1 \rangle \langle 0 \mid
\]
An operator can be represented as:
\[
X = \left[ \begin{array}{cc}
\langle 0 \mid X \mid 0 \rangle & \langle 0 \mid X \mid 1 \rangle \\
\langle 1 \mid X \mid 0 \rangle & \langle 1 \mid X \mid 1 \rangle
\end{array} \right]
\]
Example and operator is defined as:
\[
\begin{eqnarray}
X \mid 0 \rangle & = & \mid 1 \rangle \\
X \mid 1 \rangle & = & \mid 0 \rangle
\end{eqnarray}
\]
Substitute \( X \mid 0 \rangle \) and \( X \mid 1 \rangle \) in:
\[
X= \left[ \begin{array}{cc}
\langle 0 \mid 1 \rangle & \langle 0 \mid 0 \rangle \\
\langle 1 \mid 1 \rangle & \langle 1 \mid 0 \rangle
\end{array} \right]
= \left[ \begin{array}{cc}
0 & 1 \\
1 & 0
\end{array} \right]
\]
These InterfaceOptions for customising TiddlyWiki are saved in your browser
Your username for signing your edits. Write it as a WikiWord (eg JoeBloggs)
<<option txtUserName>>
<<option chkSaveBackups>> SaveBackups
<<option chkAutoSave>> AutoSave
<<option chkRegExpSearch>> RegExpSearch
<<option chkCaseSensitiveSearch>> CaseSensitiveSearch
<<option chkAnimate>> EnableAnimations
----
Also see AdvancedOptions
<!--{{{-->
<div class='header' >
<div class='headerShadow'>
<span class='siteTitle' refresh='content' tiddler='SiteTitle'></span>
<span class='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span>
</div>
<div class='headerForeground'>
<span class='siteTitle' refresh='content' tiddler='SiteTitle'></span>
<span class='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span>
</div>
</div>
<div class="headerHR">
<hr></hr>
</div>
<div id="TopMenu">
<span class="tmitem" onmouseover="mainMenu.open('MainMenu')"
onmouseout="mainMenu.startCloseTimer()"
>
Main</span>
<span class="tmitem" onmouseover="mainMenu.open('WikiMenu')"
onmouseout="mainMenu.startCloseTimer()"
>
Wikis</span>
<span class="tmitem" onmouseover="mainMenu.open('LibraryMenu')"
onmouseout="mainMenu.startCloseTimer()"
>
Library</span>
<span class="tmitem" onmouseover="mainMenu.open('DocumentsMenu')"
onmouseout="mainMenu.startCloseTimer()"
>
Documents</span>
<span class="tmitem" onmouseover="mainMenu.open('SoftwareMenu')"
onmouseout="mainMenu.startCloseTimer()"
>
Software</span>
</div>
<div class="smitem" id="MainMenu" style="visibility: hidden"
onmouseover="mainMenu.stopCloseTimer()"
onmouseout="mainMenu.startCloseTimer()"
>
<a href="../../index.html">Goto Main Page</a>
</div>
<div class="smitem" id="WikiMenu" style="visibility: hidden"
onmouseover="mainMenu.stopCloseTimer()"
onmouseout="mainMenu.startCloseTimer()"
>
<a href="../../Wiki/Math/math.html">Math</a>
<a href="../../Wiki/Linux/linux.html">Linux</a>
<a href="../../Wiki/FPGA/FPGA.html">FPGA</a>
<a href="../../Wiki/Books/Books.html">Book Notes</a>
</div>
<div class="smitem" id="LibraryMenu" style="visibility: hidden"
onmouseover="mainMenu.stopCloseTimer()"
onmouseout="mainMenu.startCloseTimer()"
>
<a href="http://ergochaos.com/wordpress">Blog</a>
<a href="http://www.librarything.com/catalog/weserg">Library</a>
<a href="http://www.flickr.com/photos/weserg/">Flikr</a>
</div>
<div class="smitemplace" style="visibility: hidden">
hide
</div>
<div class="smitem" id="DocumentsMenu" style="visibility: hidden"
onmouseover="mainMenu.stopCloseTimer()"
onmouseout="mainMenu.startCloseTimer()"
>
Machine Learning
</div>
<div class="smitem" id="SoftwareMenu" style="visibility: hidden"
onmouseover="mainMenu.stopCloseTimer()"
onmouseout="mainMenu.startCloseTimer()"
>
Mayflower
Python
</div>
<div id='mainMenu' refresh='content' tiddler='MainMenu'></div>
<div id='sidebar'>
<div id='sidebarOptions' refresh='content' tiddler='SideBarOptions'></div>
<div id='sidebarTabs' refresh='content' force='true' tiddler='SideBarTabs'></div>
</div>
<div id='displayArea'>
<div id='messageArea'></div>
<div id='tiddlerDisplay'></div>
</div>
<!--}}}-->
For a simple factored denominator,
\[
\frac{1}{(x-a)(x-b)(x-c)} = \frac{A}{x-a} + \frac{B}{x-b} + \frac{C}{x-c}
\]
$A$, $B$, and $C$ can be found by
\[ \begin{eqnarray}
A & = & (x-a) \left( \frac{A}{x-a} + \frac{B}{x-b} + \frac{C}{x-c}\ \right) |_{x=a} \\
A & = & (x-a) \left( \frac{1}{(x-a)(x-b)(x-c)} \right) |_{x=a}
\end{eqnarray}
\]
!!!Energy in a particle is equal to:
\[
E=\frac{h}{2\pi}f = \hbar \omega
\]
aka Einstein Light Quanta Hypothesis
!!!Momentum of a particle is equal to:
\[
p = \frac{h}{\lambda} = \hbar k
\]
aka de Broglie Hypothesis
Used to map probabilities. When there is a mapping
\[
y=T(x)
\]
The differential probability has to be equal:
\[
\begin{eqnarray}
p_1(y)dy & = & p_o(x)dx \\
p_1(y) & = & p_o(x) \frac{dx}{dy} \\
p_1(y) & = & \frac{p_o(x)}{| T'(x) |}
\end{eqnarray}
\]
[img(auto,300px)[Images/probability_conservation.png]]
http://cse.ucdavis.edu/~chaos/courses/ncaso/Lectures/Lecture10Slides.pdf
!! Euclid's //Fundamental Theorem of Arithmatic//:
Any natural number can be expressed as a product of primes and the primes making up the product or unique.
!! The Sieve of Ratosthenes
To find the primes of 1 to $N$ start with 2 and mark off every second number continue until you've hit all the primes less than $sqrt{N}$.
This works because, if you assume that there is a number that a product of primes greater than $sqrt{N}$, that number would be greater than $N$.
!! Euclid determined there are an infinite number of primes
This can be seen by the fact that $P_1 \times P_2 \times P_3 \times ... \times P_N + 1$ is a prime. So, any prime you can make a larger one by multiplying all the previous primes and adding 1. (All the previous primes will divide into this with a remainder of 1).
//"Most mathematicians regard Euler's proof as one of the most elegant mathematical arguments in all of mathematics."//
!!There are arbitrary long runs of composite (non-prime) natural numbers
This can be shown by taking the number $K = 2 \times 3 \times 4 \times 5 \times 6 ... \times N$ and considering numbers from $K+2, ..., K+N$. This range is guaranteed to have composite numbers divisible by $2, 3, ... N$ respectively.
From __An Introduction to Number Theory__ Lecture 7
Complex numbers
{{{
In [13]: c=1+2j
In [14]: d=1/c
In [15]: d
Out[15]: (0.20000000000000001-0.40000000000000002j)
}}}
There is a python library sympy that provides for symbolic math.
Just did a:
{{{
yum search sympy
yum install sympy
}}}
Used the following equations
{{{
s = 10.0
r = 28.0
b = 8.0/3.0
def wlq(xv,t):
x=xv[0];y=xv[1];z=xv[2]
xdot = array([0.0,0.0,0.0])
xdot[0] = s*(y-x)
xdot[1] = r*x - y - x*z
xdot[2] = x*y - b*z
return xdot
}}}
And the following
{{{
from scipy import *
from pylab import *
import scipy.integrate
from mpl_toolkits.mplot3d import Axes3D
tStep = 0.0001
tStart = 0.0
tStop = 20.0
tArray=arange(tStart,tStop,tStep)
xo=array([3.0,3.0,3.0])
xArray=scipy.integrate.odeint(wlq,xo,tArray)
fig=figure();ax=Axes3D(fig);ax.plot(xArray[:,0],xArray[:,1],xArray[:,2]);show()
}}}
If the columns of $A$ (a $NxM$ Matrix) are independent, $A$ can be decomposed:
\[
A = Q_{NxM} R_{NxN}
\]
The $Q$ matrix has the property that
\[
Q^TQ=I_M
\]
Oxford video by Prof Binney -- simple
<html><embed src="http://sciencestage.com/flvplayer.swf" quality="high" width="450" height="367" name="VideoPlayer" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" FlashVars="file=uploads/mUyObUyrE4HhD3LofiIZ.flv&width=450&height=367&displaywidth=450&displayheight=367&overstretch=true&autostart=true&showfsbutton=false&logo=http://sciencestage.com/image_s/playerlogo.png&link=http://sciencestage.com/v/29665/introduction-to-quantum-mechanics,-probability-amplitudes-and-quantum-states-university-of-oxford.html&linktarget=_blank&backcolor=0xFFFFFF" wmode="transparent" border="0"></embed></html>
Equations of the type:
\[
\dot{x} = r+x^2
\]
Plot for different r values:
[img[./saddle_node_bifurcation_xdot_x_plot.jpg]]
Plot of fixed points as a function of r:
[img[./saddle_node_bifurcation_fixed_points.jpg]]
Integration
{{{
sage: print integral(-1/(2*(x-1))+1/(2*(1+x)),x)
log(x + 1) log(x - 1)
---------- - ----------
2 2
sage: print integral(1/(2*(1-x))+1/(2*(1+x)),x)
log(x + 1) log(1 - x)
---------- - ----------
2 2
}}}
I do not know why $ln(1-x)$ is equal to $ln(x-1)$.
I had to install sip and PyQt under sage. This was really "simple". Here's what I had to do:
1. pull down sip and PyQt
2. untar both
3. for each one, move the content to src.
4. write a spkg-install script (setting the contents to the steps in the package's README file)
5. run 'sage -i <whatever>.spkg
For the PyQt one, I had to run /usr/local/down/sage-4.2.1-linux-Fedora_release_11_Leonidas-x86_64-Linux/sage -sh
Once in the shell I realized that I had to run the python configure with the -q <path to Qt4 qmake> and the -g option.
Finally, it has to be launched with either sage -pylab or sage -ipython -pylab
http://wiki.sagemath.org/sage_matlab
For a general quantum system:
\[
i\hbar \frac{\partial}{\partial t} \Psi(r,t) = \hat{H} \Psi(r,t)
\]
For a particle in 3-D:
\[
i\hbar \frac{\partial}{\partial t} \Psi(r,t) =
-\frac{\hbar^2}{2m} \nabla^2 \Psi(r,t) + V(r) \Psi(r,t)
\]
[[Schrodinger Equation]] is an energy equation using the [[Particle Energy and Momentum]] which I guess applies to any particle.
The total energy \(E\) of a particle is:
\[ E = T + V = \frac{p^2}{2m} + V \]
If we assume the particle can be expressed as a wave:
\[ \Psi(x,t) = Ae^{k \cdot x - \omega t} \]
The energy operator applied to this particle is:
\[ E \Psi(x,t) =
\hbar \omega \Psi =
i \hbar \frac{\partial}{\partial t} \Psi \]
The looking at the kinetic energy part:
\[ \frac{\partial }{\partial x} \Psi = i k_x \Psi \]
and ...
\[ \frac{\partial^2}{\partial x^2} \Psi = - k_x^2 \Psi \]
leading to
\[ p^2 \Psi =
\left( p_x^2 + p_y^2 + p_z^2 \right) \Psi =
- \hbar^2 \left( \frac{\partial^2}{\partial x^2} +
\frac{\partial^2}{\partial y^2} +
\frac{\partial^2}{\partial z^2} \right)
\Psi =
-\hbar^2 \nabla^2 \Psi
\]
So throwing it all together:
\[ i \hbar \frac{\partial}{\partial t} \Psi =
- \frac{\hbar}{2m} \nabla^2 \Psi + V \Psi
\]
Matlab like free software:
[[SciLab home page|http://www.scilab.org/]]
It has graphing though it is not as visually appealing as the Python matplotlib or Java ptplot or freegraph.
In SciLab, we can check the equation from the [[Markov Analysis Simple Example]].
{{{
--> po=0.57143
-->p=[po .5*po .25*po]'
-->P=[-5 10 0; 5 -15 10; 0 5 -10; 1 1 1]
-->P*p
ans =
0.
- 4.441D-16
0.
1.0000025
}}}
To solve for $p$ in SciLab, you can use QR decomposition. (This is similar to the way you solve a linear regression problem where you are finding the best values for an over specified system). In SciLab, this is easy using the '\' operation.
{{{
-->v=[0 0 0 1]'
v =
0.
0.
0.
1.
-->P\v
ans =
0.5714286
0.2857143
0.1428571
}}}
This is somewhat hokey but at least I know how it works as opposed to some hidden ode solver that blows up on me.
{{{
// wesode(x0,t,mf)
// t is a (1 N) vector
// mf is the function that determines x dot
// x0 is the initial starting point
//
// This function does a very simple
// runge-kutta method that will hopefully
// work better than the more complex
// ode function
//
function [x]=wesode(x0,t,mf)
sx=size(x0); st=size(t);
// size is a 2 element vector (1,2) position 2 is the number of columns
//
x(:,1)=x0; // go ahead and put x0 in the X matrix
for n=2:st(2) // for each t value
if abs(x(1,n-1))>1e6 then // if we are over 1e6 lets just stop
break;
end;
if abs(x(2,n-1))>1e6 then
break;
end;
dt=t(n)-t(n-1); // get our delta t
// find out k parameters
k1=mf(t(n),x(:,n-1))*dt;
k2=mf(t(n),x(:,n-1)+.5*k1)*dt;
k3=mf(t(n),x(:,n-1)+.5*k2)*dt;
k4=mf(t(n),x(:,n-1)+k3)*dt;
// calculate our new x
newx=1/6*(k1+2*k2+2*k3+k4)+x(:,n-1);
// check again
if abs(newx(1))>1e6 then
break;
end;
if abs(newx(2))>1e6 then
break;
end;
x=[x newx]; // add the new x on
end
endfunction
}}}
Distribution name: stats.weibull_min
{{{
theta = 2
shp = 2
w = stats.weibull_min(shp,scale=theta)
x=arange(0,10,0.001)
y = w.cdf(x)
}}}
Graph - Windows GPL [[link|http://www.padowan.dk]]
non-linear math and science notes
/***
|''Name:''|SparklinePlugin|
|''Description:''|Sparklines macro|
***/
//{{{
if(!version.extensions.SparklinePlugin) {
version.extensions.SparklinePlugin = {installed:true};
//--
//-- Sparklines
//--
config.macros.sparkline = {};
config.macros.sparkline.handler = function(place,macroName,params)
{
var data = [];
var min = 0;
var max = 0;
var v;
for(var t=0; t<params.length; t++) {
v = parseInt(params[t]);
if(v < min)
min = v;
if(v > max)
max = v;
data.push(v);
}
if(data.length < 1)
return;
var box = createTiddlyElement(place,"span",null,"sparkline",String.fromCharCode(160));
box.title = data.join(",");
var w = box.offsetWidth;
var h = box.offsetHeight;
box.style.paddingRight = (data.length * 2 - w) + "px";
box.style.position = "relative";
for(var d=0; d<data.length; d++) {
var tick = document.createElement("img");
tick.border = 0;
tick.className = "sparktick";
tick.style.position = "absolute";
tick.src = "data:image/gif,GIF89a%01%00%01%00%91%FF%00%FF%FF%FF%00%00%00%C0%C0%C0%00%00%00!%F9%04%01%00%00%02%00%2C%00%00%00%00%01%00%01%00%40%02%02T%01%00%3B";
tick.style.left = d*2 + "px";
tick.style.width = "2px";
v = Math.floor(((data[d] - min)/(max-min)) * h);
tick.style.top = (h-v) + "px";
tick.style.height = v + "px";
box.appendChild(tick);
}
};
}
//}}}
Ionization field in air is 5000V/cm.
Walking accross carpet results in the [[Tribolectric]] effect. The body takes on a charge and develops a voltage of 5kV to 15kV and peak current at discharge of 1 usec (only last 1 usec).
At the fixed point, the solution is stable if:
\[
\frac{d f(x)}{dx} < 0
\]
This can be found by:
\[
\begin{eqnarray}
\dot{x} &=& f(x) \\
\dot{x} & = & f(x_o + \eta) \\
\dot{x} & = & f(x_o) + \eta \frac{d f(x_o)}{dx} +O(2) \\
\dot{x} & = & 0 +\eta \frac{d f(x_o)}{dx} +O(2) \\
\dot{x} & = & \eta \frac{d f(x_o)}{dx}
\end{eqnarray}
\]
body {font-family:Verdana, Arial, Helvetica, sans-serif; margin:0em; padding:0;}
.siteTitle{color:orange; font-family:Verdana, Arial, Helvetica, sans-serif;font-size:2.6em; font-style:normal; font-weight: bold;}
.header {position:relative; margin:.75em}
.header a:hover {background:transparent;}
.headerShadow {position:relative; visibility:hidden; padding:1.9em .5em 1.4em .8em; left:0px; top:0px;}
.headerForeground {position:absolute; padding:001em 0em .001em .75em; left:0px; top:0px;}
.headerHR {margin:.75em;}
#TopMenu {
padding: .1em 0em 0em .8em;
}
.tmitem {
color: grey;
cursor: hand;
cursor: pointer;
font-size: 1.35em;
}
.smitem {
float: top;
position: absolute;
top: 130px;
font-size: 1.35em;
}
#MainMenu { left: 20px; }
#WikiMenu { left: 65px; }
#LibraryMenu {left: 108px; }
#DocumentsMenu { left: 175px; }
#SoftwareMenu { left: 275px; }
/*{{{*/
body {background:[[ColorPalette::Background]]; color:[[ColorPalette::Foreground]];}
a {color:[[ColorPalette::PrimaryMid]];}
a:hover {background-color:[[ColorPalette::PrimaryMid]]; color:[[ColorPalette::Background]];}
a img {border:0;}
h1,h2,h3,h4,h5,h6 {color:[[ColorPalette::SecondaryDark]]; background:transparent;}
h1 {border-bottom:2px solid [[ColorPalette::TertiaryLight]];}
h2,h3 {border-bottom:1px solid [[ColorPalette::TertiaryLight]];}
.button {color:[[ColorPalette::PrimaryDark]]; border:1px solid [[ColorPalette::Background]];}
.button:hover {color:[[ColorPalette::PrimaryDark]]; background:[[ColorPalette::SecondaryLight]]; border-color:[[ColorPalette::SecondaryMid]];}
.button:active {color:[[ColorPalette::Background]]; background:[[ColorPalette::SecondaryMid]]; border:1px solid [[ColorPalette::SecondaryDark]];}
.header {background:[[ColorPalette::PrimaryMid]];}
.headerShadow {color:[[ColorPalette::Foreground]];}
.headerShadow a {font-weight:normal; color:[[ColorPalette::Foreground]];}
.headerForeground {color:[[ColorPalette::Background]];}
.headerForeground a {font-weight:normal; color:[[ColorPalette::PrimaryPale]];}
.tabSelected{color:[[ColorPalette::PrimaryDark]];
background:[[ColorPalette::TertiaryPale]];
border-left:1px solid [[ColorPalette::TertiaryLight]];
border-top:1px solid [[ColorPalette::TertiaryLight]];
border-right:1px solid [[ColorPalette::TertiaryLight]];
}
.tabUnselected {color:[[ColorPalette::Background]]; background:[[ColorPalette::TertiaryMid]];}
.tabContents {color:[[ColorPalette::PrimaryDark]]; background:[[ColorPalette::TertiaryPale]]; border:1px solid [[ColorPalette::TertiaryLight]];}
.tabContents .button {border:0;}
#sidebar {}
#sidebarOptions input {border:1px solid [[ColorPalette::PrimaryMid]];}
#sidebarOptions .sliderPanel {background:[[ColorPalette::PrimaryPale]];}
#sidebarOptions .sliderPanel a {border:none;color:[[ColorPalette::PrimaryMid]];}
#sidebarOptions .sliderPanel a:hover {color:[[ColorPalette::Background]]; background:[[ColorPalette::PrimaryMid]];}
#sidebarOptions .sliderPanel a:active {color:[[ColorPalette::PrimaryMid]]; background:[[ColorPalette::Background]];}
.wizard {background:[[ColorPalette::PrimaryPale]]; border:1px solid [[ColorPalette::PrimaryMid]];}
.wizard h1 {color:[[ColorPalette::PrimaryDark]]; border:none;}
.wizard h2 {color:[[ColorPalette::Foreground]]; border:none;}
.wizardStep {background:[[ColorPalette::Background]]; color:[[ColorPalette::Foreground]];
border:1px solid [[ColorPalette::PrimaryMid]];}
.wizardStep.wizardStepDone {background:[[ColorPalette::TertiaryLight]];}
.wizardFooter {background:[[ColorPalette::PrimaryPale]];}
.wizardFooter .status {background:[[ColorPalette::PrimaryDark]]; color:[[ColorPalette::Background]];}
.wizard .button {color:[[ColorPalette::Foreground]]; background:[[ColorPalette::SecondaryLight]]; border: 1px solid;
border-color:[[ColorPalette::SecondaryPale]] [[ColorPalette::SecondaryDark]] [[ColorPalette::SecondaryDark]] [[ColorPalette::SecondaryPale]];}
.wizard .button:hover {color:[[ColorPalette::Foreground]]; background:[[ColorPalette::Background]];}
.wizard .button:active {color:[[ColorPalette::Background]]; background:[[ColorPalette::Foreground]]; border: 1px solid;
border-color:[[ColorPalette::PrimaryDark]] [[ColorPalette::PrimaryPale]] [[ColorPalette::PrimaryPale]] [[ColorPalette::PrimaryDark]];}
#messageArea {border:1px solid [[ColorPalette::SecondaryMid]]; background:[[ColorPalette::SecondaryLight]]; color:[[ColorPalette::Foreground]];}
#messageArea .button {color:[[ColorPalette::PrimaryMid]]; background:[[ColorPalette::SecondaryPale]]; border:none;}
.popupTiddler {background:[[ColorPalette::TertiaryPale]]; border:2px solid [[ColorPalette::TertiaryMid]];}
.popup {background:[[ColorPalette::TertiaryPale]]; color:[[ColorPalette::TertiaryDark]]; border-left:1px solid [[ColorPalette::TertiaryMid]]; border-top:1px solid [[ColorPalette::TertiaryMid]]; border-right:2px solid [[ColorPalette::TertiaryDark]]; border-bottom:2px solid [[ColorPalette::TertiaryDark]];}
.popup hr {color:[[ColorPalette::PrimaryDark]]; background:[[ColorPalette::PrimaryDark]]; border-bottom:1px;}
.popup li.disabled {color:[[ColorPalette::TertiaryMid]];}
.popup li a, .popup li a:visited {color:[[ColorPalette::Foreground]]; border: none;}
.popup li a:hover {background:[[ColorPalette::SecondaryLight]]; color:[[ColorPalette::Foreground]]; border: none;}
.popup li a:active {background:[[ColorPalette::SecondaryPale]]; color:[[ColorPalette::Foreground]]; border: none;}
.popupHighlight {background:[[ColorPalette::Background]]; color:[[ColorPalette::Foreground]];}
.listBreak div {border-bottom:1px solid [[ColorPalette::TertiaryDark]];}
.tiddler .defaultCommand {font-weight:bold;}
.shadow .title {color:[[ColorPalette::TertiaryDark]];}
.title {color:[[ColorPalette::SecondaryDark]];}
.subtitle {color:[[ColorPalette::TertiaryDark]];}
.toolbar {color:[[ColorPalette::PrimaryMid]];}
.toolbar a {color:[[ColorPalette::TertiaryLight]];}
.selected .toolbar a {color:[[ColorPalette::TertiaryMid]];}
.selected .toolbar a:hover {color:[[ColorPalette::Foreground]];}
.tagging, .tagged {border:1px solid [[ColorPalette::TertiaryPale]]; background-color:[[ColorPalette::TertiaryPale]];}
.selected .tagging, .selected .tagged {background-color:[[ColorPalette::TertiaryLight]]; border:1px solid [[ColorPalette::TertiaryMid]];}
.tagging .listTitle, .tagged .listTitle {color:[[ColorPalette::PrimaryDark]];}
.tagging .button, .tagged .button {border:none;}
.footer {color:[[ColorPalette::TertiaryLight]];}
.selected .footer {color:[[ColorPalette::TertiaryMid]];}
.sparkline {background:[[ColorPalette::PrimaryPale]]; border:0;}
.sparktick {background:[[ColorPalette::PrimaryDark]];}
.error, .errorButton {color:[[ColorPalette::Foreground]]; background:[[ColorPalette::Error]];}
.warning {color:[[ColorPalette::Foreground]]; background:[[ColorPalette::SecondaryPale]];}
.lowlight {background:[[ColorPalette::TertiaryLight]];}
.zoomer {background:none; color:[[ColorPalette::TertiaryMid]]; border:3px solid [[ColorPalette::TertiaryMid]];}
.imageLink, #displayArea .imageLink {background:transparent;}
.annotation {background:[[ColorPalette::SecondaryLight]]; color:[[ColorPalette::Foreground]]; border:2px solid [[ColorPalette::SecondaryMid]];}
.viewer .listTitle {list-style-type:none; margin-left:-2em;}
.viewer .button {border:1px solid [[ColorPalette::SecondaryMid]];}
.viewer blockquote {border-left:3px solid [[ColorPalette::TertiaryDark]];}
.viewer table, table.twtable {border:2px solid [[ColorPalette::TertiaryDark]];}
.viewer th, .viewer thead td, .twtable th, .twtable thead td {background:[[ColorPalette::SecondaryMid]]; border:1px solid [[ColorPalette::TertiaryDark]]; color:[[ColorPalette::Background]];}
.viewer td, .viewer tr, .twtable td, .twtable tr {border:1px solid [[ColorPalette::TertiaryDark]];}
.viewer pre {border:1px solid [[ColorPalette::SecondaryLight]]; background:[[ColorPalette::SecondaryPale]];}
.viewer code {color:[[ColorPalette::SecondaryDark]];}
.viewer hr {border:0; border-top:dashed 1px [[ColorPalette::TertiaryDark]]; color:[[ColorPalette::TertiaryDark]];}
#.viewer {
# line-height: 125%;
# font-family: serif;
# font-size: 12pt;
#}
.highlight, .marked {background:[[ColorPalette::SecondaryLight]];}
.editor input {border:1px solid [[ColorPalette::PrimaryMid]];}
.editor textarea {border:1px solid [[ColorPalette::PrimaryMid]]; width:100%;}
.editorFooter {color:[[ColorPalette::TertiaryMid]];}
#backstageArea {background:[[ColorPalette::Foreground]]; color:[[ColorPalette::TertiaryMid]];}
#backstageArea a {background:[[ColorPalette::Foreground]]; color:[[ColorPalette::Background]]; border:none;}
#backstageArea a:hover {background:[[ColorPalette::SecondaryLight]]; color:[[ColorPalette::Foreground]]; }
#backstageArea a.backstageSelTab {background:[[ColorPalette::Background]]; color:[[ColorPalette::Foreground]];}
#backstageButton a {background:none; color:[[ColorPalette::Background]]; border:none;}
#backstageButton a:hover {background:[[ColorPalette::Foreground]]; color:[[ColorPalette::Background]]; border:none;}
#backstagePanel {background:[[ColorPalette::Background]]; border-color: [[ColorPalette::Background]] [[ColorPalette::TertiaryDark]] [[ColorPalette::TertiaryDark]] [[ColorPalette::TertiaryDark]];}
.backstagePanelFooter .button {border:none; color:[[ColorPalette::Background]];}
.backstagePanelFooter .button:hover {color:[[ColorPalette::Foreground]];}
#backstageCloak {background:[[ColorPalette::Foreground]]; opacity:0.6; filter:'alpha(opacity:60)';}
/*}}}*/
/*{{{*/
* html .tiddler {height:1%;}
body {font-size:.75em; font-family:arial,helvetica; margin:0; padding:0;}
h1,h2,h3,h4,h5,h6 {font-weight:bold; text-decoration:none;}
h1,h2,h3 {padding-bottom:1px; margin-top:1.2em;margin-bottom:0.3em;}
h4,h5,h6 {margin-top:1em;}
h1 {font-size:1.35em;}
h2 {font-size:1.25em;}
h3 {font-size:1.1em;}
h4 {font-size:1em;}
h5 {font-size:.9em;}
hr {height:1px;}
a {text-decoration:none;}
dt {font-weight:bold;}
ol {list-style-type:decimal;}
ol ol {list-style-type:lower-alpha;}
ol ol ol {list-style-type:lower-roman;}
ol ol ol ol {list-style-type:decimal;}
ol ol ol ol ol {list-style-type:lower-alpha;}
ol ol ol ol ol ol {list-style-type:lower-roman;}
ol ol ol ol ol ol ol {list-style-type:decimal;}
.txtOptionInput {width:11em;}
#contentWrapper .chkOptionInput {border:0;}
.externalLink {text-decoration:underline;}
.indent {margin-left:3em;}
.outdent {margin-left:3em; text-indent:-3em;}
code.escaped {white-space:nowrap;}
.tiddlyLinkExisting {font-weight:bold;}
.tiddlyLinkNonExisting {font-style:italic;}
/* the 'a' is required for IE, otherwise it renders the whole tiddler in bold */
a.tiddlyLinkNonExisting.shadow {font-weight:bold;}
#mainMenu .tiddlyLinkExisting,
#mainMenu .tiddlyLinkNonExisting,
#sidebarTabs .tiddlyLinkNonExisting {font-weight:normal; font-style:normal;}
#sidebarTabs .tiddlyLinkExisting {font-weight:bold; font-style:normal;}
.header {position:relative;}
.header a:hover {background:transparent;}
.headerShadow {position:relative; padding:4.5em 0em 1em 1em; left:-1px; top:-1px;}
.headerForeground {position:absolute; padding:4.5em 0em 1em 1em; left:0px; top:0px;}
.siteTitle {font-size:3em;}
.siteSubtitle {font-size:1.2em;}
#mainMenu {position:absolute; left:0; width:10em; text-align:right; line-height:1.6em; padding:1.5em 0.5em 0.5em 0.5em; font-size:1.1em;}
#sidebar {position:absolute; right:3px; width:16em; font-size:.9em;}
#sidebarOptions {padding-top:0.3em;}
#sidebarOptions a {margin:0em 0.2em; padding:0.2em 0.3em; display:block;}
#sidebarOptions input {margin:0.4em 0.5em;}
#sidebarOptions .sliderPanel {margin-left:1em; padding:0.5em; font-size:.85em;}
#sidebarOptions .sliderPanel a {font-weight:bold; display:inline; padding:0;}
#sidebarOptions .sliderPanel input {margin:0 0 .3em 0;}
#sidebarTabs .tabContents {width:15em; overflow:hidden;}
.wizard {padding:0.1em 1em 0em 2em;}
.wizard h1 {font-size:2em; font-weight:bold; background:none; padding:0em 0em 0em 0em; margin:0.4em 0em 0.2em 0em;}
.wizard h2 {font-size:1.2em; font-weight:bold; background:none; padding:0em 0em 0em 0em; margin:0.4em 0em 0.2em 0em;}
.wizardStep {padding:1em 1em 1em 1em;}
.wizard .button {margin:0.5em 0em 0em 0em; font-size:1.2em;}
.wizardFooter {padding:0.8em 0.4em 0.8em 0em;}
.wizardFooter .status {padding:0em 0.4em 0em 0.4em; margin-left:1em;}
.wizard .button {padding:0.1em 0.2em 0.1em 0.2em;}
#messageArea {position:fixed; top:2em; right:0em; margin:0.5em; padding:0.5em; z-index:2000; _position:absolute;}
.messageToolbar {display:block; text-align:right; padding:0.2em 0.2em 0.2em 0.2em;}
#messageArea a {text-decoration:underline;}
.tiddlerPopupButton {padding:0.2em 0.2em 0.2em 0.2em;}
.popupTiddler {position: absolute; z-index:300; padding:1em 1em 1em 1em; margin:0;}
.popup {position:absolute; z-index:300; font-size:.9em; padding:0; list-style:none; margin:0;}
.popup .popupMessage {padding:0.4em;}
.popup hr {display:block; height:1px; width:auto; padding:0; margin:0.2em 0em;}
.popup li.disabled {padding:0.4em;}
.popup li a {display:block; padding:0.4em; font-weight:normal; cursor:pointer;}
.listBreak {font-size:1px; line-height:1px;}
.listBreak div {margin:2px 0;}
.tabset {padding:1em 0em 0em 0.5em;}
.tab {margin:0em 0em 0em 0.25em; padding:2px;}
.tabContents {padding:0.5em;}
.tabContents ul, .tabContents ol {margin:0; padding:0;}
.txtMainTab .tabContents li {list-style:none;}
.tabContents li.listLink { margin-left:.75em;}
#contentWrapper {display:block;}
#splashScreen {display:none;}
#displayArea {margin:1em 17em 0em 14em;}
.toolbar {text-align:right; font-size:.9em;}
.tiddler {padding:1em 1em 0em 1em;}
.missing .viewer,.missing .title {font-style:italic;}
.title {font-size:1.6em; font-weight:bold;}
.missing .subtitle {display:none;}
.subtitle {font-size:1.1em;}
.tiddler .button {padding:0.2em 0.4em;}
.tagging {margin:0.5em 0.5em 0.5em 0; float:left; display:none;}
.isTag .tagging {display:block;}
.tagged {margin:0.5em; float:right;}
.tagging, .tagged {font-size:0.9em; padding:0.25em;}
.tagging ul, .tagged ul {list-style:none; margin:0.25em; padding:0;}
.tagClear {clear:both;}
.footer {font-size:.9em;}
.footer li {display:inline;}
.annotation {padding:0.5em; margin:0.5em;}
* html .viewer pre {width:99%; padding:0 0 1em 0;}
.viewer {line-height:1.4em; padding-top:0.5em;}
.viewer .button {margin:0em 0.25em; padding:0em 0.25em;}
.viewer blockquote {line-height:1.5em; padding-left:0.8em;margin-left:2.5em;}
.viewer ul, .viewer ol {margin-left:0.5em; padding-left:1.5em;}
.viewer table, table.twtable {border-collapse:collapse; margin:0.8em 1.0em;}
.viewer th, .viewer td, .viewer tr,.viewer caption,.twtable th, .twtable td, .twtable tr,.twtable caption {padding:3px;}
table.listView {font-size:0.85em; margin:0.8em 1.0em;}
table.listView th, table.listView td, table.listView tr {padding:0px 3px 0px 3px;}
.viewer pre {padding:0.5em; margin-left:0.5em; font-size:1.2em; line-height:1.4em; overflow:auto;}
.viewer code {font-size:1.2em; line-height:1.4em;}
.editor {font-size:1.1em;}
.editor input, .editor textarea {display:block; width:100%; font:inherit;}
.editorFooter {padding:0.25em 0em; font-size:.9em;}
.editorFooter .button {padding-top:0px; padding-bottom:0px;}
.fieldsetFix {border:0; padding:0; margin:1px 0px 1px 0px;}
.sparkline {line-height:1em;}
.sparktick {outline:0;}
.zoomer {font-size:1.1em; position:absolute; overflow:hidden;}
.zoomer div {padding:1em;}
* html #backstage {width:99%;}
* html #backstageArea {width:99%;}
#backstageArea {display:none; position:relative; overflow: hidden; z-index:150; padding:0.3em 0.5em 0.3em 0.5em;}
#backstageToolbar {position:relative;}
#backstageArea a {font-weight:bold; margin-left:0.5em; padding:0.3em 0.5em 0.3em 0.5em;}
#backstageButton {display:none; position:absolute; z-index:175; top:0em; right:0em;}
#backstageButton a {padding:0.1em 0.4em 0.1em 0.4em; margin:0.1em 0.1em 0.1em 0.1em;}
#backstage {position:relative; width:100%; z-index:50;}
#backstagePanel {display:none; z-index:100; position:absolute; margin:0em 3em 0em 3em; padding:1em 1em 1em 1em;}
.backstagePanelFooter {padding-top:0.2em; float:right;}
.backstagePanelFooter a {padding:0.2em 0.4em 0.2em 0.4em;}
#backstageCloak {display:none; z-index:20; position:absolute; width:100%; height:100px;}
.whenBackstage {display:none;}
.backstageVisible .whenBackstage {display:block;}
/*}}}*/
\[
\dot{x} = r x + x^3
\]
$x^3$ term acts as a destabilizing force.
Plot of $\dot{x}$ for various $r$.
[img(400px,auto)[subcritical_pitchfork_bifurcation_xdot_x_plot.jpg]]
Plot of fixed points as a function of $r$.
[img(400px,auto)[subcritical_pitchfork_bifurcation_fixed_points.jpg]]
\[
\dot{x} = r x - x^3
\]
$x^3$ term acts as a stabilizing force pulling $\dot{x}$ back towards $x=0$.
$\dot{x}$ for different values of $r$.
[img[./supercritical_pitchfork_bifurcation_xdot_x_plot.jpg]]
Graph of fixed points as a function of $r$.
[img[./supercritical_pitchfork_bifurcation_fixed_points.jpg]]
The differential equation for a falling object is:
\[ m \dot{v} = m g - k v^2 \]
$k>0$ Find $v(t)$:
\[ \begin{eqnarray}
\dot{v} & = & g - \frac{k}{m} v^2 \\
\frac{\dot{v}}{ (1 -\frac{k}{gm} v^2) }& = & g \\
\sqrt{\frac{mg}{k}} & = & v_T \\
\frac{\dot{v}}{ (1 -(\frac{ v}{v_T})^2) } & = & g \\
\int \frac{dv}{ (1 -(\frac{ v}{v_T})^2) } & = & \int g dt \\
\int \frac{dv}{ (1 -(\frac{ v}{v_T})^2) } & = & gt \\
u = \frac{v}{v_T} & & du = \frac{dv}{v_T} \\
\int \frac{v_T du}{1-u^2} & = & gt \\
\int \frac{du}{1-u^2} + \int \frac{du}{1+u} &=& 2 \frac{g t}{v_T} \\
-ln(1-\frac{v}{v_T}) + ln(1+\frac{v}{v_T}) &=& 2 \frac{g t}{v_T} \\
\frac{1-\frac{v}{v_T}}{1+\frac{v}{v_T}} &= &e^{-2\frac{g}{v_T}t} \\
v&=& v_T \frac{1-e^{-2\frac{g}{v_T}}}{1+e^{-2\frac{g}{v_T}}} \\
v(t) &=& v_t \tanh \frac{g}{v_T}t
\end{eqnarray}
\]
Find $\displaystyle\lim_{t\to\infty}$:
\[\begin{eqnarray}
v_T&=& \displaystyle\lim_{t\to\infty} v_T \frac{1-e^{-2\frac{g}{v_T}}}{1+e^{-2\frac{g}{v_T}}} \\
v_T & = & v_T
\end{eqnarray} \]
The Golden ratio is the limit of the ratio of the numbers of the Fibonacci sequence.
\[
\phi = 1 + \frac{1}{\phi}
\]
Solution for:
\[ \phi^2 - \phi -1 \]
\[ \phi = 1.61803... \]
From __An Introduction to Number Theory__ Lecture 5
Transcritical Bifurcation always has a fixed point.
\[
\dot{x}=r x - x^2
\]
Depending on $r$, there might be another fixed point. Here is $\dot{x}$ for different values of $r$.
[img[./transcritical_bifurcation_xdot_x_plot.jpg]]
The $r$ plot looks like:
[img[./transcritical_bifurcation_fixed_points.jpg]]
Charge separation when certain marterials are placed and/or rubbed together and then pulled apart
\[
\begin{eqnarray}
f(x) = \alpha \beta x^{\beta-1} e^{-\alpha x^\beta} & x>0 \\
& \alpha >0 \\
& \beta > 0 \\
\theta & = & \alpha^{-1/\beta} \\
\alpha & = & \theta^{-\beta}
\end{eqnarray}
\]
\theta is the "characteristic parameter" and when describing reliability has units of time.
Values see [[Weibull Distribution Mean]]
\[
\begin{eqnarray}
\mu &= &\alpha^{-1/\beta}\Gamma(1+1/\beta) \\
\sigma^2 & = & \alpha^{-2/\beta}\Gamma(1+2/\beta) - \mu^2
\end{eqnarray}
\]
Cumulative Distribution function:
\[
\begin{eqnarray}
F(x) & = & 1-e^{-\alpha t^\beta} \\
R(x) & = & e^{-\alpha t^\beta}
\end{eqnarray}
\]
[img[weibull_cumulative_dist.jpg]]
The mean for the [[Weibull Distribution]] can be found by integrating the pdf.
\[
\begin{eqnarray}
\mu = E[x] & = & \int_0^\infty x \alpha \beta x^{\beta-1}e^{-\alpha x^\beta} dx \\
z & = & \alpha x^\beta \\
x & = & (z/\alpha)^{1/\beta} \\
dz & = & \alpha x^{\beta-1} dx \\
E[x] & = & \int_0^\infty (z/\alpha)^{1/\beta}e^{-\alpha z} dz \\
& = & \alpha^{-1/\beta} \Gamma(1+1/\beta)
\end{eqnarray}
\]
GNU radio's audio sinks spit out 'aU' for audio under run meaning that the sound device is waiting on input.
This is in: gr-audio-alsa/src/audio_alsa_sink.cc
{{{
while (nframes > 0){
int r = snd_pcm_writei (d_pcm_handle, buffer, nframes);
if (r == -EAGAIN)
continue; // try again
else if (r == -EPIPE){ // underrun
d_nunderuns++;
fputs ("aU", stderr);
if ((r = snd_pcm_prepare (d_pcm_handle)) < 0){
output_error_msg ("snd_pcm_prepare failed. Can't recover from underrun", r);
return false;
}
continue; // try again
}
}}}
[img[cos_a_plus_b_figure.png]]
[img[sin_a_plus_b_figure.png]]