text:
XQuery/eXist Crib sheet

= Imports and Declarations =

XQuery declaration
xquery version "1.0";

import a module
import module namespace geo="http://www.cems.uwe.ac.uk/exist/coord" at "coord.xqm";

Base eXist namespace
declare namespace exist = "http://exist.sourceforge.net/NS/exist";

Standard eXist modules
Optional in an XQuery script but required in a module in 1.2 but not in 1.3

import module namespace xmldb = "http://exist-db.org/xquery/xmldb"; import module namespace util = "http://exist-db.org/xquery/util"; import module namespace request = "http://exist-db.org/xquery/request"; import module namespace response = "http://exist-db.org/xquery/response"; import module namespace session = "http://exist-db.org/xquery/session"; import module namespace transform = "http://exist-db.org/xquery/transform"; import module namespace text = "http://exist-db.org/xquery/text"; import module namespace system = "http://exist-db.org/xquery/system";

declare a namespace
declare namespace tx="http://www.transxchange.org.uk/";

declare a default element namespace
declare default element namespace "http://www.w3.org/1999/xhtml";

Be VERY careful if you use a default namespace. This means that everything that does not have a namespace prefix will automatically be serialized into this namespace. It also PREVENTS you from using the null namespace unless you specifically declare it as xmlns="". Note that you do NOT associate a prefix with the default namespace.

declare a default function namespace
declare default function namespace "http://www.transxchange.org.uk/";

declare a java binding namespace
declare namespace math="java:java.lang.Math";

Note that the java binding is disabled by default due to security issues. Math functions can now be invoked via the maths extension module.

= Serialization Options =

output XML document
This is the default, but can be declared explictly: declare option exist:serialize "method=xml media-type=text/xml omit-xml-declaration=no indent=yes";

output SVG document
declare option exist:serialize "method=svg media-type=application/svg+xml omit-xml-declaration=no indent=yes";

output XHTML document
declare option exist:serialize "method=xhtml media-type=text/html omit-xml-declaration=no indent=yes        doctype-public=-//W3C//DTD&#160;XHTML&#160;1.0&#160;Transitional//EN        doctype-system=http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";

If your code contains a lot of XML fragments that are in the NULL namespace (xmlns="") then there is a method of automatically converting everything in the null namespace to automatically get put into the XHTML namespace. declare option exist:serialize "method=xhtml enforce-xhtml=yes";

output HTML4 document
declare option exist:serialize "method=xhtml media-type=text/html omit-xml-declaration=no indent=yes        doctype-public=-//W3C//DTD&#160;HTML&#160;4.01&#160;Transitional//EN        doctype-system=http://www.w3.org/TR/loose.dtd";

output HTML5 document
declare option exist:serialize "method=html5 media-type=text/html omit-xml-declaration=yes indent=yes";

output HTML document with no doctype
declare option exist:serialize "method=html media-type=text/html omit-xml-declaration=yes indent=yes";

output XHTML document with no doctype
declare option exist:serialize "method=xhtml media-type=text/html omit-xml-declaration=yes indent=yes";

output plain text document with no doctype
declare option exist:serialize "method=text media-type=text/plain omit-xml-declaration=yes";

output kml document
declare option exist:serialize "method=xhtml media-type=application/vnd.google-earth.kml+xml highlight-matches=none";

output XForms document
declare option exist:serialize "method=xhtml media-type=text/xml indent=yes";

= Modules and Functions =

module header
module namespace c="http://www.cems.uwe.ac.uk/exist/coord";

function declaration
declare function local:times($tt, $dt) { if (exists($dt)) then local:times(($tt, $tt[last]+ $dt[1]), remove($dt,1)) else $tt };
 * in the default namespace in an XQuery script

 * in the namespace of a module

module namespace time = 'http://www.cems.uwe.ac.uk/fold/time'; declare function time:times($tt, $dt) { if (exists($dt)) then time:times(($tt, $tt[last]+ $dt[1]), remove($dt,1)) else $tt };

declare variable
declare variable $pi as xs:double := 3.14159265;

in a module with namespace prefix fxx:

declare variable $fxx:file := doc('/db/me/file.xml');

embedded CSS stylesheet
 <![CDATA[ .good {background-color: green;} .bad {background-color:red;} ]]>

Get HTTP POST URL Parameters
To get two URL parameters from an HTTP POST http://localhost:8080/exist/rest/db/my-collection/my-xquery.xq?color=blue&shape=circle Add the following: let $my-color := request:get-parameter('color', 'red') let $my-shape := request:get-parameter('shape', '' )

If no color parameter is supplied a default color of "red" will be used.

Get HTTP POST Data
To get all the XML data from an HTTP POST let $my-data := request:get-data

Extend the Output Size Limit
By default the output size in 10,000 bytes. You can extend this by adding the following

For example to triple the size limit of the output use the following line:

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/

title: XQuery/eXist Crib sheet


text:
XQuery/Simple XForms Examples

Motivation
Although static XForms can be held in the eXist database, XForms can also be generated dynamically using XQuery. In this section, we first show static forms being output and executed by some XForms client-side engines, the FireFox add-in, the Javascript FormFaces and the XSLT/Javascript XSLTForms.

Then we look at dynamic form generation.

A wide range of XForms examples can be found in the XForms Wikibook

XForms Engines
These examples use:

 * Firefox addin
 * Requires Firefox with the XForms add-in
 * media-type set to application/xhtml+xml

 * FormFaces
 * Cross-browser support - examples tested on Firefox and IE6
 * The Javascript source is stored in the eXist database and linked to each form
 * media-type set to text/html

 * XSLTForms
 * Uses XSLT to transform to an HTML page and JavaScript to execute.
 * The XSLT transformation may be either server-side (via eXist) or client-side.

All examples use the same css stylesheet

Firefox

Execute

FormFaces
declare option exist:serialize "method=xhtml media-type=text/html indent=yes";

 Output a Model value

Execute

XSLTForms
  </form:output>

Execute

Simple Controls
Firefox Formfaces  XSLTForms

Observations

 * FormFaces : breaks on Firefox
 * XSLTForms : Changes only made when triggered

Multiple instances
A model can contain multiple instances, whose root node is accessed with the instance(id) construct.

</xf:instance> <xf:instance id="seasons" xmlns=""> </xf:instance> <xf:instance id="months" xmlns=""> <item name="January" season="winter"/> <item name="February" season="winter"/> <item name="March" season="spring"/> <item name="April" season="spring"/> <item name="May" season="spring"/> <item name="June" season="summer"/> <item name="July" season="summer"/> <item name="August" season="summer"/> <item name="September" season="autumn"/> <item name="October" season="autumn"/> <item name="November" season="autumn"/> <item name="December" season="winter"/> </xf:instance> </xf:model> Test conditional selection lists - month selector depends on the current season <xf:select1 ref="instance('data')/selected-season"> <xf:label>Season:</xf:label> <xf:itemset nodeset="instance('seasons')/item"> <xf:label ref="@name"/> <xf:value ref="@name"/> </xf:itemset> </xf:select1> <xf:select1 ref="instance('data')/selected-month"> <xf:label>Month:</xf:label> <xf:itemset nodeset="instance('months')/item[@season=instance('data')/selected-season]"> <xf:label ref="@name"/> <xf:value ref="@name"/> </xf:itemset> </xf:select1> <xf:output ref="instance('data')/selected-season"> <xf:label>selected-season: </xf:label> </xf:output> <xf:output ref="instance('data')/selected-month"> <xf:label>selected-month: </xf:label> </xf:output>

FireFox

Date Entry

 * Firefox generates a drop-down calendar. Firefox

 * Formfaces currently has no Calendar widget Formfaces

Server Interaction
Interaction with a server can be via GET or POST. This example is based on Dan McCreary's example in the XForms Wiki book.

On Firefox:

<html xmlns:xf="http://www.w3.org/2002/xforms" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns="http://www.w3.org/1999/xhtml"> XQuery Tester <link rel="stylesheet" type="text/css" href="xforms.css" /> <xf:model> <xf:instance> </xf:instance> <xf:submission id="get-instance" method="get" replace="instance" action="adderGet.xq" separator="&"> </xf:submission> <xf:submission id="post-instance" method="post" replace="instance" action="adderPost.xq"> </xf:submission> </xf:model> XForm interaction with XQuery <xf:input ref="input/arg1" incremental="true"> <xf:label>Arg1:</xf:label> </xf:input> <xf:input ref="input/arg2" incremental="true"> <xf:label>Arg2:</xf:label> </xf:input> <xf:output ref="result/sum"> <xf:label> Sum:</xf:label> </xf:output> <xf:submit submission="get-instance"> <xf:label>Get</xf:label> </xf:submit> <xf:submit submission="post-instance"> <xf:label>Post</xf:label> </xf:submit>

Firefox Formfaces

The respective server scripts are
 * GET

xquery version "1.0"; declare namespace request="http://exist-db.org/xquery/request";

let $arg1 := number(request:get-parameter("arg1", "0")) let $arg2 := number(request:get-parameter("arg2", "0")) return

xquery version "1.0"; declare namespace request="http://exist-db.org/xquery/request";
 * POST

let $data := request:get-data

let $arg1 := number($data/arg1) let $arg2 := number($data/arg2) return

In this example, the whole model is updated and returned to the client. Alternatively, part of the model can be updated (tbc)

Tabular example
A simple approach to generic XForms is illustrated in this script based on an example in the XForms wikibook

declare option exist:serialize "method=xhtml media-type=application/xhtml+xml indent=yes";

let $data := return

<html xmlns:xf="http://www.w3.org/2002/xforms" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns="http://www.w3.org/1999/xhtml"> Formatting XForms <link rel="stylesheet" type="text/css" href="xforms.css" />

<style type="text/css"> { for $item in $data/* let $width := string-length($item) return concat('._',name($item),' .xf-value {width:', $width,'em}
') }     <xf:model> <xf:instance xmlns=""> {$data} </xf:instance> </xf:model> Name and Address {for $item in $data/* return (      <xf:input class="_{name($item)}" ref="/Data/{name($item)}">         <xf:label>{name($item)}:  </xf:label>       </xf:input>,        ) }

In this simple tabular example, the XForm and accompanying CSS to define input field widths is generated by reflection on the supplied instance.

This example works correctly in Firefox but the styling fails in Formfaces

Simple Forms Schema
More control over the generated XForms can be provided by a simple Schema. This example is still for a simple tabular structure: declare option exist:serialize "method=xhtml media-type=application/xhtml+xml indent=yes";

let $data := let $schema := <Schema> <Row name="GivenName" label="First Name" width="20"/> <Row name="Surname" label="Surname" width="15"/> <Row name="CityName" label="City" width="15"/> <Row name="StateCode" label="State" width="3"/> <Row name="PostalID" label="ZipCode" width="8"/> </Schema> return

<html xmlns:xf="http://www.w3.org/2002/xforms" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns="http://www.w3.org/1999/xhtml"> Formatting XForms <link rel="stylesheet" type="text/css" href="xforms.css" />

<style type="text/css"> { for $item in $schema/* let $id := concat("_",$item/@name) let $width := $item/@width return concat('.',$id,' .xf-value {width:', $width,'em}
') }     <xf:model> <xf:instance xmlns=""> {$data} </xf:instance> </xf:model> Name and Address {for $item in $schema/* let $id := concat("_",$item/@name) let $label := string( $item/@label) return (      <xf:input class="{$id}" ref="/Data/{$item/@name}">         <xf:label>{$label}:  </xf:label>       </xf:input>,        ) }

Firefox

title: XQuery/Simple XForms Examples


text: Template:New book

title: Template:New book


text:
Aros/Developer/Docs/Logging

This is currently a draft page ...

=Logging Subsystem Components=

 * log.resource             : Generic API to logging.

 * debug.logger         : hardcoded processor for debug log output. used for
 * other log types until exec can handle memory requests.

 * generic.logger       : hardcoded processor used after log.resource:init to process all but debug logging.
 * NB -: should not be used inside allocmem/freemem (since it may use them) or IRQs

 * seriallog.resource       : rom resident listener which dumps DEBUG type log output to the serial device
 * (configurable via grub command line)

Support Commands

 * C:BufferLog LOGTYPE OUTPUTFILE
 * Registers a listener for the specified LOGTYPE which Buffers log output to an OUTPUTFILE.

 * SYS:Tools/LogViewer LOGFILE
 * Tool used to display LOGFILE's buffered with C:BufferLog.

=Logging Subsystem Operations=

=Logging API's=

 * LOG_TYPEID:   LOG_DATA
 * LOG_TYPE_DEBUG
 * DEBUG_ERROR
 * DEBUG_WARN
 * DEBUG_INFO

 * LOG_TYPE_SYSTEM
 * SYSTEM_ERROR
 * SYSTEM_WARN
 * SYSTEM_INFO

 * LOG_TYPE_APPLICATION
 * APPLICATION_ERROR
 * APPLICATION_WARN
 * APPLICATION_INFO

IPTR LOGR_RegisterProcessor(LOG_TYPEID, struct LogProcessor *)

IPTR LOGR_RegisterListener(LOG_TYPEID, struct LogListener *)

BOOL LOGR_LogEvent(LOG_TYPEID, LOG_DATA, char *LOG_SRC, char *LOG_TEMPLATE, args ...)

IPTR LOGR_ObtainLogEvents(LOG_TYPEID, LOG_EVENTFLAGS)

IPTR LOGR_LogEventNext(IPTR)

IPTR LOGR_LogEventDelete(IPTR)

IPTR LOGR_ReleaseLogEvents(IPTR)

LOGR_LogEvent
Used to output data to a specified log.

LOGR_ObtainLogEvents
Returns a per caller handle. if (LOG_EVENTFLAGS == LOG_EVENTLIST_UNIQUE) then it will only succeed if no other access is occurring.

internal: sets handle->active_event to the first log entry and increases its access count.

LOGR_LogEventNext
(semaphore protected?)

internal: sets handle->active_event to the next log entry - decreasing the current one's access count and increasing the next's access count

LOGR_LogEventDelete
(semaphore protected?)

Deletes a log entry.

internal: deletes handle->active_event - or marks it for deletion if its access count > 0

LOGR_ReleaseLogEvents
Must be called with a handle obtained with LOGR_ObtainLogEvents. decreases the handle->active_event's access count, and frees the per caller handle.

title: Aros/Developer/Docs/Logging


text:
Category:New Books

This category is for recently created books.

title: Category:New Books


text:
Using Wikibooks/Advanced Administration

Advanced Topics
In this page we are going to discuss a variety of administrator-related topics. Some topics are for all admins, while others are only for bureaucrats or checkusers.

History Merging
The Wikibooks site licenses (GFDL and Creative Commons) require that the history pages, and thus the trail of authorship and attribution, must be preserved. This is one of the reasons why we have the import tool, instead of simply using copy and paste moves from other wikis. The import tool preserves the page history, which helps us to stay in compliance with the license.

Copy and paste mergers between pages are technically a violation of the license. There are two ways to avoid this problem. The first is to provide a backlink to the history of the merged page. This can be done with a short note in the edit summary including a permanent link to the version copied. The better method is to merge the histories.

How to Merge
Historically administrators used some loopholes in the deletion system to merge the histories:

 * 1) Open the edit view for the top revision of the target page in another window or tab;
 * 2) Move the source page to the target page;
 * 3) *You will be warned that the target page already exists, and asked if you would like to delete it;
 * 4) *Delete the target page;
 * 5) Go to the history view for the target page and undelete the deleted revisions with a reason like "history merge";
 * 6) Go to the edit view you opened at the beginning;
 * 7) *Save this revision with an edit summary like "restoring current version"

If all has gone according to plan, you will have your chosen revision on top, with all previous history of both pages mixed together in the page history. More recently a Merge History tool has been developed and is available to Administrators.

User Renames
User renaming is reserved for stewards and global renamers because the account can be used on all the foundation wikis, and is very much ignored in policy or guideline documentation. Because of this, they are given wide latitude in determining whether and when to rename users. This section will attempt to outline some of the common practices, but should not be misconstrued as a description of things that "always" happen, or that "must" happen.

The renaming process is typically facilitated through email, so people who are requesting a username change should have a valid email address registered, and should have their preferences set to accept emails from other users. In this way, if there is a problem with the rename, the steward can stay in touch with the user.

Doppelgangers
A doppelganger is when a person creates the same username on Wikibooks as a real user on another WMF project, such as Wikipedia. This often happens as a form of harassment or personal attack, and is generally not tolerated.

Another common occurrence is for people to create usernames that appear similar to another screenname, in order to impersonate or harass other users. A MediaWiki extension was created that prevents usernames from being created if they are too similar to an existing username. Unfortunately, this extension creates new problems, as legitimate users may be prevented from registering a desired username. Admins (not just bureaucrats) may follow this link to create a username and bypass the protection mechanism: | CREATE NEW ACCOUNT.

When you create a new account for a user, make sure you get that user's email address. You can then email them the username and the password. Make sure the user does the following immediately:
 * 1) Change the password to something strong.
 * 2) Register an email address for contact, in case there is a problem.

Usurpation
Usurpation is the act where one user assumes a username owned by another person. Wikipedia has a number of strict guidelines on this subject, but Wikibooks does not. However, a lack of rules on the subject does not mean that username usurpations are performed regularly or without proper consideration.

While all the details are left up to the judgment of the stewards, a usurped username typically needs to be:
 * 1) Blocked indefinitely with little or no hope of ever being unblocked
 * 2) Have few if any legitimate edits, and few if any log entries (such as file uploads, page moves, etc)
 * 3) Have been created a long time ago, and not having been used for a long time.

If the username to be usurped has an associated email address, a request should typically be sent to ensure that the current owner of the username is amenable to the usurpation process.

Admin Promotions
Admin promotions, bureaucrat promotions, and granting the bot flag are performed by a bureaucrat in response to affirmative community support. Exactly what numerical value of support votes a bureaucrat must see before they will perform the promotion is variable.

About 10 support votes, or so, is a decent number of votes needed to promote an admin. Admins can be, and have been in the past, promoted with as few as 5 votes, but typically a bureaucrat should wait for a greater showing of support before any promotions. Promoting a new bureaucrat is a much more conservative process, and a bureaucrat should wait to see significantly more votes than they would expect for an average admin promotion before promoting a bureaucrat. All of these are just suggestions, of course, and depend on the activity level of the community, the reasoning behind support and opposition votes, and other factors.

Bots and the Bot Flag
Granting a bot flag is an issue where bureaucrats on Wikibooks have historically been very conservative. The bot flag really exists to prevent an active bot from flooding the RC list and thereby preventing vandalism monitoring operations. It's the general opinion that an account should only be given a bot flag if they have demonstrated an ability to flood the RC list on a regular basis.

Many people use automated and semi-automated scripts from regular user accounts. However, this is strongly discouraged if the user does not have the Reviewer right. If the account does not have the Reviewer flag, then every single automated change will have to be manually reviewed. Before contemplating making automated or semi-automated changes, ensure that you have the Reviewer flag on the account you plan to use. The Bot flag includes the Reviewer right.

title: Using Wikibooks/Advanced Administration


text:
User:Nkandah

'''Hey everyone. This wikipage is designed to be a running commentary of the things being studied in German classes at Enloe High School.'''

Bold text

title: User:Nkandah


text:
Using Wikibooks/Advanced Techniques

Templates
We already mentioned templates briefly in our section on tagging. Now we're going to get into some of the more advanced features of them. Templates, their features, and their uses is a huge topic of discussion and is far too big for the scope of this book alone. The book Editing Wikitext will include more information about Templates than this book does, but even that isn't comprehensive resource. The best way to learn is to see other templates in action, or to ask some of our active users for help and see what solutions they come up with.

Templates have several benefits. First is that templates help to hide large, complex features from the page. That means that when new users contribute to a page, they don't need to dig through large quantities of formatting first. Second, templates can be used to apply very similar markups to multiple pages (or to multiple points in a single page) without having to copy and paste large amounts of code. Finally, through the use of parameters, templates can help to automate many tasks that otherwise would need to be performed by hand.

Templates are a special case of including pages. To include, or transclude, a page in the current one, the syntax is. For the main namespace, you leave the namespace part blank and just use. The default namespace is Template:, so just putting in will try to include Template:page name, which is good if you are using templates.

Try including a page in the sandbox, E.g. include the main page using

This is how print versions of books are created. Each page is included in order on the print version page. Anything that shouldn't show up on the print version is put between in the code of the pages being included, which stops it being included when the page is included in another one. This is used to hide the navigation links and other stuff that only people looking at the book online would be interested in. Conversely if you want something to only appear for people viewing your print version, you use.

Templates use the same idea, only for different purposes and with some added features. An example of a simple template, which is used with just, could be

which makes

This is an example of a standard template just to save time. Tags like this can also be used to generate lists of books which are incomplete. If you go to Template:incomplete and click on the "What links here" link in the toolbox, the pages which have "(inclusion)" listed after them are pages which have included the template. For the template, an editor could use this to get a list of pages which are incomplete.

When you type, you are actually including the code from Template:incomplete, which looks like:

The text in its current form is incomplete.

That's pretty boring. You can use ... to mark sections of a template that should appear when transcluded, but should not appear on the template page itself. You can use ... to mark sections that should not be included. You can use this, for instance, to include the template in one category, but include pages that template is transcluded onto in another category. You can also display documentation on the template page about proper use of the template, without that documentation appearing everywhere you use the template. So if you wanted someone who went to look at the template page for to see what its purpose was after "The text in its current form is incomplete." you could replace the code with

The text in its current form is incomplete. Purpose:
 * This template is used to designate a page as incomplete

which would show people

When they looked at the template page but only The text in its current form is incomplete. when they included it.

You can also be tricky with your categories:

The text in its current form is incomplete.

Purpose:
 * This template is used to designate a page as incomplete

Template Parameters
The template is a little more complex because it uses parameters. Parameters are values which a template will use when making its code for a page including it. When you include Template:Message_box, You need to pass it parameters. If you just do

you get

Huh? This template actually has 2 parameters which we need to pass arguments to. If we include the template like

you get

When including Templates, you don't need to worry about spaces or capitalizing the first letter, but the page names are still case sensitive for all the other letters, so if you type

you get

Because of the "Box" instead of "box".

Back to the example... heading and message are the names of the parameters of Template:Message_box. The actual code for the template looks like

Wow, now that is complicated. Everything with three pairs of braces around it is a parameter. So there are 5 parameters, which are backgroundcolor, image, alt, heading, and message. The first 3 parameters have pipe characters in them. These create default values for the parameters, so that even if we only pass values for heading and message, the background is still transparent, the image shown is still the Wikibooks logo and the alternate text of that image is still "logo". If a parameter doesn't have a default value and you don't pass a value to it, it just shows the parameters name in 3 pairs of braces, which is why it made and  the first time.

But that doesn't mean we can't change these values. Say we want to get a green background, with a smiley image, and the alternate text "smile", with the same heading and message we used last time. To get this you would type

and get

It doesn't matter what order you pass arguments to the parameters in, as long as they are named. It does matter if the parameters use numbered parameters like. If the parameter is numbered then you need to put it in the right place, so if it is it would be the first value you pass.

The only thing limiting what you can achieve with templates is your imagination and your knowledge of HTML and CSS (used to make things look pretty), as well as a knowledge of variables and parser functions. That, and the template limits of the mediawiki software to avoid large workloads on the server, but this only really matters if you are transcluding a page which transcludes a page which transcludes a page, and will probably only bug you if you are a book writer trying to sort all your pages into chapter pages, and then trying to include those chapter pages in a print version, or something like that. When you try to include a page which includes other pages and it goes over the include limit, a link will just be placed onto the page pointing to the page you wanted to transclude, and I think there is some kind of error message generated in the HTML code as a comment.

Advanced Editing
There are a number of advanced tools that an editor can use to create better pages and templates. Many of these features are extensions to the MediaWiki software. New extensions can be added to Wikibooks, on occasion. If you can think of a feature that we don't have here, you can check out the list of available extensions on Mediawiki.org. Before anything gets installed, however, you need to get community approval on the Technical Reading Room.

Extensions that We Can't Get
There are a number of extensions that Wikibookians have asked for in the past, but that we cannot have installed. Frequently, this is because of performance issues: Some extensions take up too many server resources. Sometimes, it's because of security: some extensions just haven't been rigourously tested enough to go live on a big site like Wikibooks. Here is a list of extensions and functionality that we have asked for and have not been able to get:

 * DPL:We do have an old version of DPL installed, but the new version has many more options and much more power. Unfortunately, all that power comes at the price of increased server load. Until the efficiency of this extension goes up, we are unlikely to see an upgraded version here on Wikibooks.
 * GNU LilyPond:Lilypond is an extension for allowing all sorts of LaTeX-based markups, including graphics, music, etc. Unfortunately, this extension has multiple components, many of which have not been rigourously security-tested.
 * StringFunctions:Like the parser functions, these are parser hooks that can be used to manipulate string data. This includes tokenizing, manipulating, etc. This extension also requires too much server power, and so it can't be installed here on Wikibooks.

HTML and CSS
Wikitext is converted to HTML by the MediaWiki software. We use wikitext because it is easier to read and edit than plain HTML. However, there are plenty of occasions where we need to use HTML and CSS to perform a variety of tasks.

CSS Classes
Here are some common CSS classes that are used around wikibooks. Making use of these classes in your own work will help to keep everything standardized, and can save a lot of effort if you are trying to duplicate complicated styles.

 * PrettyTextBox:PrettyTextBox is a CSS class that produces a box with a grey background and a grey border. Examples of this textbox are and . A common implemention of this is.
 * wikitable and wikitable: These classes are used for tables that are similar to the PrettyTextBox color theme, above. The regular table cells are grey, header cells are darker grey, and all the cells have a grey border around them. This format is commonly used in many places, such as The Reading Room.
 * metadata, noprint: These classes cause items on your page not to appear when you print a book. This is useful for certain message or note templates that are intended more for writers than for readers.
 * printonly: Like those above, but opposite. Objects with class printonly will only appear when you print a page, but will not appear when you view the page online.
 * plainlinks:When you create an external link, the software automatically includes a little icon next to the link to indicate what type of resource that link points to. Using the plainlinks class will hide these little icons.

Parser Functions
Parser functions are powerful but complicated. They are best served in the template namespace, where their complexity can be hidden from people who edit books and pages. Using parser functions in a book page will make the code more difficult to read and understand. Therefore, the page will be more difficult for regular contributors to edit. The version of the parser functions that we have is not the complete, nor the most recent version. Documentation for our version is located here:

 * http://www.mediawiki.org/wiki/Help:Extension:ParserFunctions

We do not have the "Extended" version of the parser functions, nor the "StringFunctions" extension, nor any of the other related extensions.

Math Tags
Visit the sciences, math, or engineering subject pages, and you are likely to see mathematical formulae. These are rendered using a LaTeX variant specifically designed for mathematics. You can see the complete markup help sheet at meta:Help:Displaying a formula. A more comprehensive version of this page can be found on meta and Wikipedia.

Dynamic Page Lists
Dynamic page lists (DPL) is an extension that automatically generates a list of pages based on the category and namespaces of those pages. Complete documentation for our version of DPL (which is not the most recent version, see the note above) is located at:

 * mw:Extension:DynamicPageList/old

This feature is used mostly on organizational pages, such as the Wikibooks stacks, and other places. It is not commonly found in books, but it can be.

Flattening DPL Lists
DPL Lists, by default, appear in a vertical bulleted list. However, using the CSS class  we can force the list to be horizontal instead. For example:

...

This use is demonstrated on.

title: Using Wikibooks/Advanced Techniques


text:
User:ABurke/Othello

This a copy of the William Shakespeare's Works/Tragedies/Othello work as it appeared May 14 2006.

ACT 1. SCENE I. Venice. A street.
This play opens with a bang as the author sets up the characters and action in one movement. First we are introduced to Iago and Roderigo, who are talking outside Senator Brabantino's balcony. They speak of Othello as if he were something other than human, an outsider, an animal. He is presented as the dark violator of the purity and innocence of the senator's daughter /Desdemona/. The imagery is of a horse copulating and begetting other horses, of creating the "beast with two backs'. If the audience believes what Iago says about Othello he is seen as a despicable villain.

We are given a window into the darkness that lies within /Iago/, who is possibly Shakespeare's most malevolent character. Iago openly professes his hatred for the Moor. At the same time Iago is powerful in his ability to manipulate others as we see him leading Roderigo by the hand to the senator's window. This comes in to play later in the play as Iago continues to connive others in order to appease his own jealousy and desire for vengeance.

Iago's words about Cassio reveal a bit about his proposed movivation: Othello passed Iago up to give an important promotion to Cassio. Iago describes Cassio as a mathemetician or theoretician, someone who knows only theory and no practise. We can see Iago in contrast as someone without scruples, who is willing to use any means to achieve the (evil) end he desires.

We are left wondering, who is this misterious man, Othello ? Are the things he is accused of true ? And feeling apprehension about his accused violation of the young Desdemona.

This scene contains one of my favorite lines:

Brabantio: Thou art a villain.

Iago: You are--a senator.

This displays both Iago's quick wit, total cynicism and shamelessness in wrongdoing even in the face of authority. Besides being very funny.

Also in this scene we see Roderigo as a bit of a bumbler, a follower and at a loss when not directed by Iago.

Notice that Iago leaves before his presence can be detected. Throughout the play he works to be an invisible force working against the best interests of the other characters, especially Othello.

Iago is a destroyer and detests authority.

ACT 1. SCENE II. Another street.
Iago is suddenly a different man, prostrating himself before Othello and professing a foolish lack of self-defending iniquity.

When the senator arrives to confront Othello, the Moor's following lines quickly show him to be a person of noble character:

Othello: Keep up your bright swords, for the dew will rust them. Good signior, you shall more command with years Than with your weapons.

Othello is not afraid or defensive, rather he is respectful towards the elder senator. Another man would wet his pants at the sight of a group of men with swords drawn in his opponence, but Othello delivers them a toungue-in-cheek, tension-diffusing response. Even when the senator charges ahead with threats and accusations the Moor is unshaken, inviting the senator to another place to speak.

In all the audience is presented with an Othello entirely different than the one suggested by third person in the first scene.

ACT 3. SCENE III. The garden of the castle.
Shakespeare was a Stoic refers to Iago's line

Who steals my purse steals trash...

by referencing Karl Polanyi, in The Great Transformation:

The outstanding discovery of recent historical and anthropological research is that man's economy, as a rule, is submerged in his social relationships. He does not act so as to safeguard his individual interest in the possession of material goods; he acts so as to safeguard his social standing, his social claims, his social assets. He values material goods only in so far as they serve this end.

title: User:ABurke/Othello


text:
Wikijunior:Languages/Nahuatl

What writing system(s) does this language use?
Before the Spanish colonization of Mexico, Nahuatl was not actually written. When a text needed to be written, a special style of drawing that followed specific rules was used. Those drawings often served more as reminders than actual written stories.

After the arrival of the Spaniards, Nahuatl was written in a variant of the Spanish script that is still usually used today.
 * cu is pronounced like qu in queen.It is written uc at the end of words or before a consonant.
 * qu, c, s, z
 * hu is pronounced like w. It is written uh at the end of words or before a consonant.
 * h
 * tl
 * x
 * ch
 * tz
 * tz

How many people speak this language?
Approximatively 1.7 million speak Nahuatl as a native language.

Where is this language spoken?
Nahuatl is spoken in Mexico. Its speakers are found in a large part of the country, but are mostly concentrated West and Southwest of Mexico City, in the states of Puebla, Veracruz, Guerrero, and Hidalgo.

What is the history of this language?
Nahuatl is known to have been spoken for nearly a millennium. Classical Nahuatl was a language of administration and culture. After the arrival of the Spanish, Nahuatl, unlike several Native American languages, was frequently written for communication, and literate Aztecs and Spaniards transcribed legends,songs and poetry, as well as letters to lords. Since the classical Nahuatl era, the dialects of Nahuatl have become quite different, and many are now considered languages separate from each others, although the term "Nahuatl" is still used to describe the group.

Who are some famous authors or poets in this language?
Nezahualpilli was not only ruler of the city state Texcoco from 1473 to 1515 but was also a poet. Unfortunately only one of his poems still exist. It is called "Icuic Nezahualpilli yc tlamato huexotzinco" ("Song of Nezahualpilli during the war with Huexotzinco").

There are other poems and poets who wrote in Nahuatl but unfortunately no one is sure who the poets were that wrote the poems that are still in existence.

What are some basic words in this language that I can learn?

 * calli: house
 * cihuātl: woman
 * cochi: to sleep
 * cualli: good, something good
 * cuīcatl: song
 * ehēcatl: wind
 * itta: to see
 * miqui: to die
 * oquichtli: man
 * tlahtoa: to speak
 * ce: one
 * ome: two
 * yei: three
 * nahui: four
 * macuilli: five
 * chicuace: six
 * chicome: seven
 * chicueyi: eight
 * chiconahui: nine
 * ma'tlactli: ten
 * ni mits neki: i love you
 * ahuacatl: avocado
 * xipotli: a dried (red) jalapeño

What is a simple song/poem/story that I can learn in this language?
Quititi, quititi, quiti tocoto, tocoti tocoto tocoti zan ic mocueptiuh.

1. Ma xochicuicoya ma ichtoa nichuana ayyahue teyhuinti xochitl ao ya noyehcoc ye nica poyoma xahuallan timaliuhtihuitz ay yo.

2. Ma xochitl oyecoc ye nican ayyahuc can tlaahuixochitla moyahuaya motzetzeloa ancazo yehuatl in nepapaxochitl ayyo. Zan commoni huchuetl ma ya netotilo.

3. Yn quetzal poyomatl ayc ihcuilihuic noyol nicuicanitl in xochitl ayan tzetzelihui ya ancuel ni cuiya ma xonahuacan ayio zan noyolitic ontlapanion cuicaxochitl nicyamoyahuaya yxoochitla.

4. Cuicatl ya ninoquinilotehuaz in quemmanian xochineneliuhtiaz noyollo yehuan tepilhuan oonteteuctin in ca yio.

5. Zan ye ic nichoca in quemanian zan nicaya ihtoa noxochiteyo nocuicatoca nictlalitehuaz in quemanian xochineneliuhtiaz, etc.

Quititi, quititi, quiti tocoto, tocoti, tocoto, tocoti, then it is to turn back again.

1. Let me pluck flowers, let me see them, let me gather the really intoxicating flowers; the flowers are ready, many colored, varied in hue, for our enjoyment.

2. The flowers are ready here in this retired spot, this spot of fragrant flowers, many sorts of flowers are poured down and scattered about; let the drum be ready for the dance.

3. I the singer take and pour down before you from my soul the beautiful poyomatl, not to be painted, and other flowers; let us rejoice, while I alone within my soul disclose the songs of flowers, and scatter them abroad in the place of flowers.

4. I shall leave my songs in order that sometime I may mingle the flowers of my heart with the children and the nobles.

5. I weep sometimes as I see that I must leave the earth and my flowers and songs, that sometime these flowers will be vain and useless.

title: Wikijunior:Languages/Nahuatl


text:
Advanced Mathematics for Engineers and Scientists/Introduction and Classifications

Introduction and Classifications
The intent of the prior chapters was to provide a shallow introduction to PDEs and their solution without scaring anyone away. A lot of fundamentals and very important details were left out. After this point, we are going to proceed with a little more rigor; however, knowledge past one undergraduate ODE class alongside some set theory and countless hours on Wikipedia should be enough.

Some Definitions and Results
An equation of the form

 * $$f(u) = C\,$$

is called a partial differential equation if $$u$$ is unknown and the function $$f$$ involves partial differentiation. More concisely, $$f$$ is an operator or a map which results in (among other things) the partial differentiation of $$u$$. $$u$$ is called the dependent variable, the choice of this letter is common in this context. Examples of partial differential equations (referring to the definition above):

 * $$\frac{\partial^2 u}{\partial y^2} + u \frac{\partial^2 u}{\partial x^2} + 2 = 0 \qquad \mbox{where} \quad

f(u) = \frac{\partial^2 u}{\partial y^2} + u \frac{\partial^2 u}{\partial x^2} \, \quad C = -2$$

 * $$\frac{\partial u}{\partial t} = \frac{\partial^2 u}{\partial y^2} \qquad \mbox{where} \quad

f(u) = \frac{\partial u}{\partial t} - \frac{\partial^2 u}{\partial y^2} \, \quad C = 0$$

 * $$\frac{\partial^4 u}{\partial x^4} = 0 \qquad \mbox{where} \quad

f(u) = \frac{\partial^4 u}{\partial x^4} \, \quad C = 0$$

Note that what exactly $$u$$ is made of is unspecified, it could be a function, several functions bundled into a vector, or something else; but if $$u$$ satisfies the partial differential equation, it is called a solution.

Another thing to observe is seeming redundancy of $$C$$, its utility draws from the study of linear equations. If $$C = 0$$, the equation is called homogeneous, otherwise it's nonhomogeneous or inhomogeneous.

It's worth mentioning now that the terms "function", "operator", and "map" are loosely interchangeable, and that functions can involve differentiation, or any operation. This text will favor, not exclusively, the term function.

The order of a PDE is the order of the highest derivative appearing, but often distinction is made between variables. For example the equation

 * $$\frac{\partial^2}{\partial x^2}\left(EI \frac{\partial^2 u}{\partial x^2}\right) = -\mu \frac{\partial^2 u}{\partial t^2}\,$$

is second order in $$t$$ and fourth order in $$x$$ (fourth derivatives will result regardless of the form of $$EI$$).

Linear Partial Differential Equations
Suppose that $$f(u) = L(u)$$, and that $$L$$ satisfies the following properties:

 * $$L(u + v) = L(u) + L(v)\,$$
 * $$L(\alpha u) = \alpha L(u)\,$$

for any scalar $$\alpha$$. The first property is called additivity, and the second one is called homogeneity. If $$L$$ is additive and homogeneous, it is called a linear function, additionally if it involves partial differentiation and

 * $$L(u) = C\,$$

then the equation above is a linear partial differential equation. This is where the importance of $$C$$ shows up. Consider the equation

 * $$\frac{\partial u}{\partial t} = \frac{\partial^2 u}{\partial x^2} + A$$

where $$A$$ is not a function of $$u$$. Now, if we represent the equation through

 * $$L(u) = 0\quad \mbox{where} \quad L(u) = \frac{\partial u}{\partial t} - \frac{\partial^2 u}{\partial x^2} - A\,$$

then $$L$$ fails both additivity and homogeneity and so is nonlinear (Note: the equation defining the condition is 'homogeneous', but in a distinct usage of the term). If instead

 * $$L(u) = A\quad \mbox{where} \quad L(u) = \frac{\partial u}{\partial t} - \frac{\partial^2 u}{\partial x^2}\,$$

then $$L$$ is now linear. Note then that the choice of $$L$$ and $$C$$ is generally not unique, but if an equation could be written in a linear form it is called a linear equation.

Linear equations are very popular. One of the reasons for this popularity is a little piece of magic called the superposition principle. Suppose that both $$u_1$$ and $$u_2$$ are solutions of a linear, homogeneous equation (here onwards, $$L$$ will denote a linear function), ie

 * $$L(u_1) = 0 \quad \mbox{and} \quad L(u_2) = 0\,$$

for the same $$L$$. We can feed a combination of $$u_1$$ and $$u_2$$ into the PDE and, recalling the definition of a linear function, see that

 * $$L(a_1 u_1 + a_2 u_2) = 0\,$$

 * $$a_1 L(u_1) + a_2 L(u_2) = 0\,$$

for some constants $$a_1$$ and $$a_2$$. As stated previously, both $$u_1$$ and $$u_2$$ are solutions, which means that

 * $$a_1 \cdot 0 + a_2 \cdot 0 = 0 \qquad (\mbox{Since} \quad L(u_1) = 0 \quad \mbox{and} \quad L(u_2) = 0)\,$$

 * $$0 = 0\,$$

What all this means is that if both $$u_1$$ and $$u_2$$ solve the linear and homogeneous equation $$L(u) = 0$$, then the quantity $$a_1 u_1 + a_2 u_2$$ is also a solution of the partial differential equation. The quantity $$a_1 u_1 + a_2 u_2$$ is called a linear combination of $$u_1$$ and $$u_2$$. The result would hold for more combinations, and generally,

 * {|width=600 class="wikitable"

Suppose that in the equation
 * The Superposition Principle
 * style="background:#FFFFFF;" |
 * style="background:#FFFFFF;" |
 * style="background:#FFFFFF;" |

 * $$L(u) = 0\,$$

the function $$L$$ is linear. If some sequence $$u_i$$ satisfies the equation, that is if

 * $$L(u_0) = 0 \, \ L(u_1) = 0 \ , \ L(u_2) = 0 \ , \ \dots \,$$

then any linear combination of the sequence also satisfies the equation:

 * $$L\left(\sum a_i u_i\right) = 0\,$$

where $$a_i$$ is a sequence of constants and the sum is arbitrary.
 * }

Note that there is no mention of partial differentiation. Indeed, it's true for any linear equation, algebraic or integro-partial differential-whatever. Concerning nonhomogeneous equations, the rule can be extended easily. Consider the nonhomogeneous equation

 * $$L(u) = C\,$$

Let's say that this equation is solved by $$u_p$$ and that a sequence $$u_i$$ solves the "associated homogeneous problem",

 * $$L(u_p) = C\,$$

 * $$L(u_i) = 0\,$$

where $$L$$ is the same between the two. An extension of superposition is observed by, say, the specific combination $$u_p + a_1 u_1 + a_2 u_2$$:

 * $$L(u_p + a_1 u_1 + a_2 u_2) = C\,$$

 * $$L(u_p) + a_1 L(u_1) + a_2 L(u_2) = C\,$$

 * $$C + a_1 \cdot 0 + a_2 \cdot 0 = C\,$$

 * $$C = C\,$$

More generally,

 * {|width=600 class="wikitable"

Suppose that in the nonhomogeneous equation
 * The Extended Superposition Principle
 * style="background:#FFFFFF;" |
 * style="background:#FFFFFF;" |
 * style="background:#FFFFFF;" |

 * $$L(u) = C\,$$

the function $$L$$ is linear. Suppose that this equation is solved by some $$u_p$$, and that the associated homogeneous problem

 * $$L(u) = 0\,$$

is solved by a sequence $$u_i$$. That is,

 * $$L(u_p) = C \ ; \ L(u_0) = 0 \, \ L(u_1) = 0 \ , \ L(u_2) = 0 \ , \ \dots \,$$

Then $$u_p$$ plus any linear combination of the sequence $$u_i$$ satisfies the original (nonhomogeneous) equation:

 * $$L\left(u_p + \sum a_i u_i\right) = C\,$$

where $$a_i$$ is a sequence of constants and the sum is arbitrary.
 * }

The possibility of combining solutions in an arbitrary linear combination is precious, as it allows the solutions of complicated problems be expressed in terms of solutions of much simpler problems.

This part of is why even modestly nonlinear equations pose such difficulties: in almost no case is there anything like a superposition principle.

Classification of Linear Equations
A linear second order PDE in two variables has the general form

 * $$A \frac{\partial^2 u}{\partial x^2} + 2 B \frac{\partial^2 u}{\partial x \partial y} + C \frac{\partial^2 u}{\partial y^2} + D \frac{\partial u}{\partial x} + E \frac{\partial u}{\partial y} + F = 0$$

If the capital letter coefficients are constants, the equation is called linear with constant coefficients, otherwise linear with variable coefficients, and again, if $$F$$ = 0 the equation is homogeneous. The letters $$x$$ and $$y$$ are used as generic independent variables, they need not represent space. Equations are further classified by their coefficients; the quantity

 * $$B^2 - A C\,$$

is called the discriminant. Equations are classified as follows:

 * $$B^2 - A C < 0 \ \Rightarrow \ \mathrm{The \ PDE \ is \ \underline{elliptic}.}$$

 * $$B^2 - A C = 0 \ \Rightarrow \ \mathrm{The \ PDE \ is \ \underline{parabolic}.}$$

 * $$B^2 - A C > 0 \ \Rightarrow \ \mathrm{The \ PDE \ is \ \underline{hyperbolic}.}$$

Note that if coefficients vary, an equation can belong to one classification in one domain and another classification in another domain. Note also that all first order equations are parabolic.

Smoothness of solutions is interestingly affected by equation type: elliptic equations produce solutions that are smooth (up to the smoothness of coefficients) even if boundary values aren't, parabolic equations will cause the smoothness of solutions to increase along the low order variable, and hyperbolic equations preserve lack of smoothness.

Generalizing classifications to more variables, especially when one is always treated temporally (ie associated with ICs, but we haven't discussed such conditions yet), is not too obvious and the definitions can vary from context to context and source to source. A common way to classify is with what's called an elliptic operator.

 * {|width=600 class="wikitable"

A second order operator $$E$$ of the form
 * Definition: Elliptic Operator
 * style="background:#FFFFFF;" |
 * style="background:#FFFFFF;" |
 * style="background:#FFFFFF;" |

 * $$E(u) = -\sum_{k,j} A_{k j} \frac{\partial^2 u}{\partial x_j \partial x_k} + \sum_l B_l i^{-1} \frac{\partial u}{\partial x_l} + C u$$

is called elliptic if $$A$$, an array of coefficients for the highest order derivatives, is a positive definite symmetric matrix. $$i$$ is the imaginary unit. More generally, an $$n^{th}$$ order elliptic operator is

 * $$E(u) = \sum_{m = 0}^n \ \sum_{k, j, l, \dots} A^m_{k, j, l, \dots} i^{-m} \frac{\partial^m u}{\partial x_j \partial x_k \partial x_k ...}$$

if the $$n$$ dimensional array of coefficients of the highest ($$n^{th}$$) derivatives is analogous to a positive definite symmetric matrix.

Not commonly, the definition is extended to include negative definite matrices.
 * }

The negative of the Laplacian, $$-\nabla^2 u$$, is elliptic with $$A_{k j} = -\delta_{k, j}$$. The definition for the second order case is separately provided because second order operators are by a large margin the most common.

Classifications for the equations are then given as

 * $$E(u) = 0 \ \Rightarrow \ \mathrm{The \ equation \ is \ \underline{elliptic}.}$$

 * $$E(u) + k \frac{\partial u}{\partial t} = 0 \ \Rightarrow \ \mathrm{The \ equation \ is \ \underline{parabolic}.}$$

 * $$E(u) + k \frac{\partial^2 u}{\partial t^2} = 0 \ \Rightarrow \ \mathrm{The \ equation \ is \ \underline{hyperbolic}.}$$

for some constant k. The most classic examples of these equations are obtained when the elliptic operator is the Laplacian: Laplace's equation, linear diffusion, and the wave equation are respectively elliptic, parabolic, and hyperbolic and are all defined in an arbitrary number of spatial dimensions.

Quasilinear
The linear form

 * $$A \frac{\partial^2 u}{\partial x^2} + 2 B \frac{\partial^2 u}{\partial x \partial y} + C \frac{\partial^2 u}{\partial y^2} + D \frac{\partial u}{\partial x} + E \frac{\partial u}{\partial y} + F = 0$$

was considered previously with the possibility of the capital letter coefficients being functions of the independent variables. If these coefficients are additionally functions of $$u$$ which do not produce or otherwise involve derivatives, the equation is called quasilinear. It must be emphasized that quasilinear equations are not linear, no superposition or other such blessing; however these equations receive special attention. They are better understood and are easier to examine analytically, qualitatively, and numerically than general nonlinear equations.

A common quasilinear equation that'll probably be studied for eternity is the advection equation

 * $$\frac{\partial u}{\partial t} + \nabla \cdot (u \mathbf{v}) = 0$$

which describes the conservative transport (advection) of the quantity $$u$$ in a velocity field $$\mathbf{v}$$. The equation is quasilinear when the velocity field depends on $$u$$, as it usually does. A specific example would be a traffic flow formulation which would result in

 * $$\frac{\partial u}{\partial t} + 2 u \frac{\partial u}{\partial x} = 0$$

Despite resemblance, this equation is not parabolic since it is not linear. Unlike its parabolic counterparts, this equation can produce discontinuities even with continuous initial conditions.

General Nonlinear
Some equations defy classification because they're too abnormal. A good example of an equation is the one that defines a minimal surface expressible as $$u = u(x, y)$$:

 * $$\left(1 + \left(\frac{\partial u}{\partial y}\right)^2\right) \frac{\partial^2 u}{\partial x^2}

- 2 \frac{\partial u}{\partial x} \frac{\partial u}{\partial y} \frac{\partial^2 u}{\partial x \partial y} + \left(1 + \left(\frac{\partial u}{\partial x}\right)^2\right) \frac{\partial^2 u}{\partial y^2} = 0$$

where $$u$$ is the height of the surface.


text:
Advanced Mathematics for Engineers and Scientists/Vector Spaces: Mathematic Playgrounds

Vector Spaces: Mathematic Playgrounds
The study of partial differential equations requires a clear definition of what kind of numbers are being dealt with and in what way. PDEs are normally studied in certain kinds of vector spaces, which have a number of properties and rules associated with them which make possible the analysis and unifies many notions.

The Real Field
A field is a set that is bundled with two operations on the set called addition and multiplication which obey certain rules, called axioms. The letter $$F$$ will be used to represent the field, and from definition a field requires the following ($$a, b,$$ and $$c$$ are in $$F$$):

 * Closure under addition and multiplication: the addition and multiplication of field members produces members of the same field.
 * Addition and multiplication are associative: $$a + (b + c) = (a + b) + c$$ and $$a (b c) = (a b) c$$.
 * Addition and multiplication are commutative: $$a + b = b + a$$ and $$a b = b a$$.
 * Addition and multiplication are distributive: $$a (b + c) = a b + a c$$ and $$a b = b a$$.
 * Existence of additive identity: there is an element in $$F$$ notated 0, sometimes called the sum of no numbers, such that $$a + 0 = a$$.
 * Existence of multiplicative identity: there is an element in $$F$$ notated 1 different from 0, sometimes called the product of no numbers, such that $$a \ 1 = a$$.
 * Existence of additive inverse: there is an element in $$F$$ associated with $$a$$ notated $$-a$$ such that $$a - a = 0$$.
 * Existence of multiplicative inverse: there is an element in $$F$$ associated with $$a$$ (if $$a$$ is nonzero), notated $$1/a$$ such that $$a \ 1/a = 1$$.

These are called the field axioms. The field that we deal with, by far the most common one, is the real field. The set associated with the real field is the set of real numbers, and addition and multiplication are the familiar operations that everyone knows about.

Another example of a set that can form a field is the set of rational numbers, numbers which are expressible as the ratio of two integers. An example of a common set that doesn't form a field is the set of integers: there generally is no multiplicative inverse since the reciprocal of an integer generally is not an integer.

Note that when we say that an object is in $$F$$, what is meant is that the object is a member of the set associated in the field and that it complies with the field axioms.

The Vector
Most non-mathematics students are taught that vectors are ordered groups ("tuples") of quantities. This is not complete, vectors are a lot more general than that. Informally, a vector is defined as an object that can be scaled and added with other vectors. This will be made more specific soon.

Examples of vectors:

 * The real numbers.
 * Pairs, triples, etc of real numbers.
 * Polynomials.
 * Most functions.

Examples of objects that are not vectors:

 * Members of the extended real numbers. Specifically, the infinity and negative infinity elements neither scale nor add.
 * The integers, at least when scaled by real numbers (since the result will not necessarily be an integer).

An interesting (read: confusing) fact to note is that, by the definition above, matrices and even tensors qualify as vectors since they can be scaled or added, even though these objects are considered generalizations of more "conventional" vectors, and calling a tensor a vector will lead to confusion.

The Vector Space
A vector space can be thought of as a generalization of a field.

Letting $$F$$ represent some field, a vector space $$V$$ over $$F$$ is a set of vectors bundled with two operations called vector addition and scalar multiplication, notated:

 * Vector addition: $$u + v = w$$, where $$u, v, w \in V$$.
 * Scalar multiplication: $$a u = v$$, where $$u, v \in V$$ and $$a \in F$$.

The members of $$V$$ are called vectors, and the members of the field $$F$$ associated with $$V$$ are called scalars. Note that these operations imply closure (see the first field axiom), so that it does not have to be explicitly stated. Note also that this is essentially where a vector is defined: objects that can be added and scaled. The vector space must comply with the following axioms ($$u, v,$$ and $$w$$ are in $$V$$; $$a$$ and $$b$$ are in $$F$$):

 * Addition is associative: $$u + (v + w) = (u + v) + w$$.
 * Addition is commutative: $$u + v = v + u$$.
 * Scalar multiplication is distributive over vector addition: $$a (u + v) = a u + a v$$.
 * Scalar multiplication is distributive over field addition: $$(a + b) u = a u + b u$$.
 * Scalar and field multiplication are compatible: $$a (b u) = (a b) u$$.
 * Existence of additive identity: there is an element in $$V$$ notated 0 such that $$u + 0 = u$$.
 * Existence of additive inverse: there is an element in $$V$$ associated with $$u$$ notated $$-u$$ such that $$u - u = 0$$.
 * Existence of multiplicative identity: there is an element in $$F$$ notated 1 different from 0 such that $$1 v = u$$.

An example of a vector space is one where polynomials are vectors over the real field. An example of a space that is not a vector space is one where vectors are rational numbers over the real field, since scalar multiplication can lead to vectors that are not rational (implied closure under scalar multiplication is violated).

By analogy with linear functions, vectors are linear by nature, hence a vector space is also called a linear space. The name "linear vector space" is also used, but this is somewhat redundant since there is no such thing as a nonlinear vector space. It's now worth mentioning an important quantity called a linear combination (not part of the definition of a vector space, but important):

 * $$a_1 u_1 + a_2 u_2 + \cdots = \sum a_i u_i\,$$

where $$a_i$$ is a sequence of field members and $$u_i$$ is a sequence of vectors. The fact that a vector can be formed by a linear combination of other vectors is much of the essence of the vector field.

Note that a field over itself qualifies as a vector space. Fields of real numbers and other familiar objects are sometimes called spaces, since distance and other useful concepts apply.

The definition of a vector space is quite general. Note that, for example, there is no mention of any kind of product between vectors, nor is there a notion of the "length" of a vector. The vector space as defined above is very primitive, but it's a starting point: through various extensions, specific vector spaces can have a lot of nice properties and other features that make our playgrounds fun and comfortable. We'll discuss bases (plural of basis) and then take on some specific vector spaces.

The Basis
A nonempty subset $$W$$ of $$V$$ is called a linear subspace of $$V$$ if $$W$$ is itself a vector space. The requirement that $$W$$ be a vector space can be safely made specific by saying that $$W$$ is closed under vector addition and scalar multiplication, since the rest of the vector space properties are inherited.

The linear span of a set of $$n$$ vectors $$u_1, u_2, \dots, u_n$$ in $$V$$ may then be defined as:

 * $$\mathrm{span} (u_1, u_2, \dots, u_n) = \bigcap_{\mathrm{All} \ a_i} a_1 u_1 + a_2 u_2 + \cdots + a_n u_n$$

Where $$a_1, a_2, \dots a_n \in F$$. The span is the intersection over all choices of $$a_i$$. This concept may be extended so that $$n$$ is not necessarily finite. The span of $$V$$ is the intersection of all of the linear subspaces of $$V$$.

Now, think of what happens if a vector is removed from the set $$u_1, u_2, \dots, u_n$$. Does the span change? Not necessarily, it may be possible that the remaining vectors in the span are sufficient to "fill in" for the missing vector through linear combination of the remaining vectors.

Let $$B$$ be a subset of $$V$$. If the span of $$B$$ is the same as the span of $$V$$, and if removing a vector from $$B$$ necessarily changes its span, then the set of vectors $$B$$ is called a basis of $$V$$, and the vectors of $$B$$ are called linearly independent. It can be proven that a basis can be constructed for every vector space.

Note that the basis is not unique. This obscure definition of a basis is convenient because it is very broad, it is worth understanding fully. An important property of a vector space is that it necessarily has a basis, and that any vector in the space may be written in terms of a linear combination of the members of the basis.

A more understandable (though less elemental) explanation is provided: for a vector space $$V$$ over the field $$F$$, the vectors $$u_1, u_2, \dots u_n\,$$ form a basis of $$V$$ (where $$u_i$$ are in $$V$$ and the following $$a_i$$ are in $$F$$), satisfying the following properties:

 * The basis vectors are linearly independent: if
 * $$v = a_1 u_1 + a_2 u_2 + \cdots + a_n u_n = 0$$
 * then
 * $$a_1 = a_2 = \cdots = a_n = 0$$
 * without exception.
 * The basis vectors span $$V$$: for some given $$v$$ in $$V$$, it is possible to choose $$a_i$$ so that
 * $$a_1 u_1 + a_2 u_2 + \cdots + a_n u_n = v\,$$

The basis vectors of a vector space are usually notated with as $$e_i$$.

Euclidean n-Space
As most students are familiar with Euclidean n-space, this section serves more of an example than anything else.

Let $$\mathbb{R}$$ be the field of real numbers, then the vector space $$\mathbb{R}^n$$ over $$\mathbb{R}$$ is defined to be the space of n-tuples of members of $$\mathbb{R}$$. In other words, more clearly:

 * If $$x_1, x_2, \dots, x_n \mbox{ are } \in \mathbb{R}$$, then $$\mathbf x = (x_1, x_2, \dots x_n) \mbox{ is } \in \mathbb{R}^n$$, where $$\mathbf x$$ are the vectors of the vector space $$\mathbb{R}^n$$.

These vectors are called n-dimensional coordinates, and the vector space $$\mathbb{R}^n$$ is called the real coordinate space; note that coordinates (unlike more general vectors) are often notated in boldface, or else with an arrow over the letter. They are also called spatial vectors, geometric vectors, just "vectors" if the context allows, and sometimes "points" as well, though some authors refuse to consider points as vectors, attributing a "fixed" sense to points so that points can't be added, scaled, or otherwise messed with. Part of the reason for this is that it allows one to say that some vector space is bound to a point, the point being called the origin.

The Euclidean n-space $$E^n$$ is the special real coordinate n-space $$\mathbb{R}^n$$ with some additional structure defined which (finally) gives rise to the geometric notion of (specifically these) vectors.

To begin with, an inner product is first defined, notated with either angle braces or a dot:

 * $$\langle \mathbf{x}, \mathbf{y} \rangle = \mathbf{x} \cdot \mathbf{y} = \sum_{i = 1}^n x_i y_i = x_1 y_1 + x_2 y_2 + \cdots + x_n y_n\,$$

This quantity, which turns two vectors into a scalar (a member of $$\mathbb{R}$$) doesn't have a great deal of geometric meaning until some more structure is defined. In a coordinate space, the dot notation is favored, and this product is often called the "dot product", especially when $$n = 2$$ or $$n = 3$$. The definition of this inner product qualifies $$E^n$$ as an inner product space.

Next comes the norm, in terms of the inner product:

 * $$\|\mathbf{x}\| = |\mathbf{x}| = \sqrt{\mathbf{x} \cdot \mathbf{x}}\,$$

The notation involving single pipes around the letter x is common, again, when $$n = 2$$ or $$n = 3$$, due to analogy with absolute value, for real and especially complex numbers. For a coordinate space, the norm is often called the length of $$\mathbf{x}$$. This quickly leads to the notion of the distance between two vectors:

 * $$d(\mathbf{x}, \mathbf{y}) = \|\mathbf{x - y}\|\,$$

Which is simply the length of the vector "from" $$\mathbf{y}$$ to $$\mathbf{x}$$.

Finally, the angle $$\theta$$ between $$\mathbf{x}$$ and $$\mathbf{y}$$ is defined through, for $$0 \leq \theta \leq \pi$$,

 * $$\mathbf{x} \cdot \mathbf{y} = \|\mathbf{x}\| \|\mathbf{y}\| \cos(\theta) \quad \Rightarrow \quad \theta = \cos^{-1}\left(\frac{\mathbf{x} \cdot \mathbf{y}}{\|\mathbf{x}\| \|\mathbf{y}\|}\right)\,$$

The motivation for this definition of angle, valid for any $$n$$, comes from the fact that one can prove that the literal measurable angle between two vectors in $$\mathbb{R}^2$$ satisfies the above (the norm is motivated similarly). Discussing these 2D angles and distances of course mandates making precise the notion of a vector as an "arrow" (ie, correlating vectors to things you can draw on a sheet of paper), but that would get involved and most are already subconsciously familiar with this and it's not the point of this introduction.

This completes the definition of $$E^n$$. A thorough introduction to Euclidean space isn't very fitting in a text on Partial Differential equations, it is included so that one can see how a familiar vector space can be constructed ground-up through extensions called "structure".

Banach Spaces
Banach spaces are more general than Euclidean space, and they begin our departure from vectors as geometric objects into vectors as toys in the crazy world of functional analysis.

To be terse, a Banach space is defined as any complete normed vector space. The details follow.

The Inner Product
The inner product is a vector operation which results in a scalar. The vectors are members of a vector space $$V$$, and the scalar is a member of the field $$F$$ associated with $$V$$. A vector space on which an inner product is defined is said to be "equipped" with an inner product, and the space is an inner product space. The inner product of $$u$$ and $$v$$ is usually notated $$\langle u, v \rangle$$.

A truly general definition of the inner product would be long. Normally, if the vectors are real or complex in nature (eg, complex coordinates or real valued functions), the inner product must satisfy the following axioms:

 * Distributive in the first variable: $$\langle u + v, w \rangle = \langle u, w \rangle + \langle v, w \rangle$$.
 * Associative in the first variable: $$\langle a u, v \rangle = a \langle u, v \rangle$$.
 * Nondegeneracy and nonnegativity: $$\langle u, u \rangle \geq 0$$, equality will hold only when $$u = 0$$.
 * Conjugate symmetry: $$\langle u, v \rangle = \overline{\langle v, u \rangle}$$.

Note that if the space is real, the last requirement (the overbar indicates complex conjugation) simplifies to $$\langle u, v \rangle = \langle v, u \rangle$$, and then the first two axioms extend to the second variable.

A desirable property of an inner product is some kind of orthogonality. Two nonzero vectors are said to be orthogonal only if their inner product is zero. Remember that we're talking about vectors in general, not specifically Euclidean.

Inner products are by no means unique, good definitions are what add quality to specific spaces. The Euclidean inner product, for example, defines the Euclidean distance and angle, quantities which form the foundation of Euclidean geometry.

The Norm
The norm is usually, though not universally, defined in terms of the inner product, which is why the inner product was discussed first (to be technically correct, a Banach space doesn't necessarily need to have an inner product). The norm is an operation (notated with double pipes) which takes one vector and generates one scalar, necessarily satisfying the following axioms:

 * Scalability: $$\|a u\| = a\|u\|$$.
 * The triangle inequality: $$\|u + v\| \leq \|u\| + \|v\|$$.
 * Nonnegativity: $$\|u\| \geq 0$$, equality only when $$u = 0$$.

The fact that $$\|0\| = 0$$ can be proven from the first two statements above.

Definition requires that $$\|u\| = 0$$ only when $$u = 0$$ (compare this to the inner product, which can be zero even if fed nonzero vectors); if this condition is relaxed so that $$\|u\| = 0$$ is possible for nonzero vectors, the resulting operation is called a seminorm.

The distance between two vectors $$u$$ and $$v$$ is a useful quantity which is defined in terms of the norm:

 * $$d(u, v) = \|u - v\|\,$$

The distance is often called the metric, and a vector space equipped with a distance is called a metric space.

Completeness

As stated before, a Banach space is defined as a complete normed vector space. The norm was described above, so that all that is left to establish the definition of a Banach space is completeness.

Consider a sequence of vectors $$u_i$$ in a vector space $$V$$. This sequence of vectors is called a Cauchy sequence if these vectors "tend" toward some "destination" vector, as shown in the pictures at right. Stated precisely, a sequence is a Cauchy sequence if it is always possible to make the distance $$d(u_m, u_n)$$ arbitrarily small by picking larger values of $$m$$ and $$n$$.

The limit $$u$$ of a Cauchy sequence is:

 * $$u = \lim_{i \to \infty} u_i$$

A vector space $$V$$ is called complete if every Cauchy sequence has a limit that is also in $$V$$. A Banach space is, finally, a vector space equipped with a norm that is complete. Note that completeness implies existence of distance, which means that every Banach space is a metric space.

An example of a vector space that is complete is Euclidean n-space. An example of a vector space that isn't complete is the space of rational numbers over rational numbers: it is possible to form a sequence of rational numbers which limit to an irrational number.

Hilbert spaces
Note that the inner product was defined above but not subsequently used in the definition of a Banach space. Indeed, a Banach space must have a norm but doesn't necessarily need to have an inner product. However, if the norm in a Banach space is defined through the inner product by

 * $$\|u\| = \sqrt{\langle u, u}\rangle$$

then the resulting special Banach space is called a Hilbert space. Hilbert spaces are important in the study of partial differential equations (some relevance finally!) because many theorems and important results are valid only in Hilbert spaces.


text:
Talk:General Genetics/Population Genetics

I am taking two pop-gene courses this semester, and plan typing up a version of my notes the basic material for this section of the book. It will be a collection of Templeton's work and Hedrick, as I am pooling from both authors. Hopefully by the time this semester is over, a nice collection of work can be expanded upon by other students and professors in the field to obtain a book on population genetics that is up to date! :)

This book, while focusing on the biology of population genetics, is being written so that it can be abstracted to other population mediums, including those found in computers.

I'm going to add-in content for the Neutral Theory of Evolution and Modern Synthesis Theory, but I'm going to do so in their own respective pages. I don't really want to add it in here and further confuse this work in progress. ktaylora


text:
User talk:Ross2345

Welcome message
Hello, and welcome to Wikibooks!

Here are some tips to help you get started:
 * To learn the wiki-markup-language syntax, see Help:Editing.
 * You should sign your name on Talk and vote pages using four tildes, like this: ~~~~
 * There is a box at the top of the edit window that will insert this, too; it looks like part of a signature.
 * Remember to conduct any editing experiments in the sandbox.
 * You can tell the community something about yourself in your userpage.
 * You can get to this page by clicking the tab at the top of the page labeled with your registered username.
 * If you are a Wikipedian, see Wikibooks for Wikipedians for a primer on how things work here (it's a little different).
 * If you want to base your work here on materials from Wikipedia, please use WB:RFI (requests for importation) to bring the material over in compliance with the GFDL.
 * If you're an instructor and plan on using Wikibooks for a class project, see Guidelines for class projects
 * Please say hello at the Staff Lounge with any questions or ideas.
 * Eventually, you might want to read the Manual of Style and Policies and Guidelines.
 * Please take a look at Naming policy before starting a new book.
 * Remember to maintain a Neutral point of view.
 * Explore, be bold in editing pages, and have fun!

You will find more resources in Community Portal. If you want to ask a question, visit the Study help desk, the Staff lounge, IRC channel or ask me personally on my talk page. For site news, see the Bulletin board. It might be a good idea to add this page to your "watchlist" so that you can see when any new information is posted there. You can do that by clicking the tab labeled "watch" at the top of the page.

Good luck! --Panic 04:45, 20 September 2007 (UTC)

title: User talk:Ross2345


text:
User talk:Circeus

Welcome message
Hello, and welcome to Wikibooks!

Here are some tips to help you get started:
 * To learn the wiki-markup-language syntax, see Help:Editing.
 * You should sign your name on Talk and vote pages using four tildes, like this: ~~~~
 * There is a box at the top of the edit window that will insert this, too; it looks like part of a signature.
 * Remember to conduct any editing experiments in the sandbox.
 * You can tell the community something about yourself in your userpage.
 * You can get to this page by clicking the tab at the top of the page labeled with your registered username.
 * If you are a Wikipedian, see Wikibooks for Wikipedians for a primer on how things work here (it's a little different).
 * If you want to base your work here on materials from Wikipedia, please use WB:RFI (requests for importation) to bring the material over in compliance with the GFDL.
 * If you're an instructor and plan on using Wikibooks for a class project, see Guidelines for class projects
 * Please say hello at the Staff Lounge with any questions or ideas.
 * Eventually, you might want to read the Manual of Style and Policies and Guidelines.
 * Please take a look at Naming policy before starting a new book.
 * Remember to maintain a Neutral point of view.
 * Explore, be bold in editing pages, and have fun!

You will find more resources in Community Portal. If you want to ask a question, visit the Study help desk, the Staff lounge, IRC channel or ask me personally on my talk page. For site news, see the Bulletin board. It might be a good idea to add this page to your "watchlist" so that you can see when any new information is posted there. You can do that by clicking the tab labeled "watch" at the top of the page.

Good luck! --Panic 04:46, 20 September 2007 (UTC)

title: User talk:Circeus


text:
User talk:Jmrowland

Welcome message
Hello, and welcome to Wikibooks!

Here are some tips to help you get started:
 * To learn the wiki-markup-language syntax, see Help:Editing.
 * You should sign your name on Talk and vote pages using four tildes, like this: ~~~~
 * There is a box at the top of the edit window that will insert this, too; it looks like part of a signature.
 * Remember to conduct any editing experiments in the sandbox.
 * You can tell the community something about yourself in your userpage.
 * You can get to this page by clicking the tab at the top of the page labeled with your registered username.
 * If you are a Wikipedian, see Wikibooks for Wikipedians for a primer on how things work here (it's a little different).
 * If you want to base your work here on materials from Wikipedia, please use WB:RFI (requests for importation) to bring the material over in compliance with the GFDL.
 * If you're an instructor and plan on using Wikibooks for a class project, see Guidelines for class projects
 * Please say hello at the Staff Lounge with any questions or ideas.
 * Eventually, you might want to read the Manual of Style and Policies and Guidelines.
 * Please take a look at Naming policy before starting a new book.
 * Remember to maintain a Neutral point of view.
 * Explore, be bold in editing pages, and have fun!

You will find more resources in Community Portal. If you want to ask a question, visit the Study help desk, the Staff lounge, IRC channel or ask me personally on my talk page. For site news, see the Bulletin board. It might be a good idea to add this page to your "watchlist" so that you can see when any new information is posted there. You can do that by clicking the tab labeled "watch" at the top of the page.

Good luck! --Panic 04:46, 20 September 2007 (UTC)

title: User talk:Jmrowland


text:
User:Chaplin

Hi, I'm a user who come from Hong Kong, China. My English is pretty bad, and hope you can teach me.

title: User:Chaplin


text:
Cookbook talk:Shepherds Pie

Beef or Lamb?

I had never heard of Cottage Pie prior to searching for a recipe online. In the United States we term the dish with beef Shepherd´s Pie. I understand that in the UK this is referred to as Cottage Pie. —The preceding unsigned comment was added by 84.63.43.135 (talk • contribs) 10:48, 20 Sep 2007 (UTC)

 * Bear in mind that Wikibooks is not American in focus but global, thanks -- Herby talk thyme 10:58, 20 September 2007 (UTC)

 * Clearly. Which is why I decided that I would change it to include beef as well, and to open a discussion about it, since it is not British in focus either. Thanks.

 * Why would a dish with beef be called Shepherd's Pie? I don't know any shepherds who look after cattle.  To try to achieve concensus I've re-edited the recipe to say that 'with beef' is generally known as 'cottage pie'.  I hope this brings together the previous edits. Xania [[Image:Flag_of_Italy.svg|15px]]talk 20:35, 20 September 2007 (UTC)

 * To be fair... Asking why something is the way it is in English is rather silly. :)

title: Cookbook talk:Shepherds Pie


text:
User talk:124.107.241.245

Welcome to Wikibooks. We invite everyone to contribute constructively to our collection. Take a look at the welcome page if you would like to learn more about contributing. However, unconstructive edits are considered vandalism, and if you continue in this manner you may be blocked from editing without further warning. Please stop, and consider improving rather than damaging the hard work of others. Thanks. -- Herby talk thyme 10:56, 20 September 2007 (UTC)

STOP
removing content or you will be blocked -- Herby talk thyme 10:59, 20 September 2007 (UTC)

title: User talk:124.107.241.245


text:
User talk:Parrothead5183

Come introduce yourself at the new users page. If you have any questions, you can ask there or contact me personally. -- Herby talk thyme 12:43, 20 September 2007 (UTC)

-- Herby talk thyme 12:43, 20 September 2007 (UTC)

 * Please note you cannot use the picture that you are trying to as it is unlicensed and off topic -- Herby talk thyme 13:10, 20 September 2007 (UTC)

title: User talk:Parrothead5183


text:
User talk:216.226.127.120

Welcome to Wikibooks. We invite everyone to contribute constructively to our collection. Take a look at the welcome page if you would like to learn more about contributing. However, unconstructive edits are considered vandalism, and if you continue in this manner you may be blocked from editing without further warning. Please stop, and consider improving rather than damaging the hard work of others. Thanks. -- Herby talk thyme 12:46, 20 September 2007 (UTC)

title: User talk:216.226.127.120


text:
Signal Processing/Analog Filters

Analog Filters
Historically, electric signal processing started with analog circuits. Signal analysis and filter design methods first based on these kind of circuits. Later came the avent of digital systems. The first digital filters relied on the techniques used for their analog parents. Still today, some digital filters rely on the simulation of analog filters in order to profit from some of their interesting properties.

Lumped Elements Filters
Lumped elements filters base on the frequency characteristics of the following components: Their characteristics are given by:
 * the resistance, R
 * the capacitance, C
 * the inductance, L
 * $$U = R \cdot I$$
 * $$U = \frac{1}{sC} \cdot I$$
 * $$U = sL \cdot I$$

Ladder filters
The following image shows a 4th order all-pole lowpass ladder filter:

The overall appearance of the circuit explains the name.

In the drawing, the source and load resistance are identical. This corresponds to the situation with the best energy transfer from source to load. At DC, the inductances act as short circuits and the capacitances as open circuits. Hence the output amplitude will be half of the one of the input.

Doubly terminated ladder filters show to have excellent passband sensitivity properties . In other terms, a given change in L or C element values results in a much smaller relative change in the filter transfer function. Because of this, ladder filters have been widely used as a model for analog active filters and for digital filters.

Filters with Distributed Elements
A distributed element filter is an electronic filter in which capacitances, inductances and resistances (the elements of the circuit) are not localised in discrete (lumped) elements as they are in conventional filters. At high frequencies, in the microwave region, the strips on a printed circuit board act as impedances and a careful design of them allows to implement filter functions.

Active Filters
Active filters are analog filters using amplifying devices such as operational amplifiers. They allow to realize filter functions with resistances and capacitances, freing the designer of the need to use inductances.

Canonical filters
The first attempts to realize active filters was to devise a circuit realizing the transfer function, with R and C element value combinations corresponding to the transfer function's numerator and denominator coefficients: the canonical filters. However, this kind of circuits showed to be very sensitive to element values: a small change in an R or C element value had a large effect on the transfer function.

For that reason, the design of active filters has shifted from canonical filters to other structures such as chains of second order sections or leapfrog filters.

Chain of Second Order Sections
A second order section, often referred as biquad, implements a second order transfer function. The transfer function of a filter can be split into a product of transfer functions each associated to a pair of poles and possibly a pair of zeroes.

The transfer function of a system given with an equal number of complex conjugate zeroes, $$z_i$$ and $$z_i^*$$, and poles $$p_i$$ and $$p_i^*$$, together with a gain $$k$$ is:
 * $$H(s) = k \cdot \prod_{i=1}^{N/2}{\frac{(s-z_i)(s-z_i^*)}{(s-p_i)(s-p_i^*)}}$$

This is the case for Chebyshev type 2 and Elliptic filter functions.

Writing:
 * $$D_i(s) = (s-p_i)(s-p_i^*) = s^2 - 2 Re(p_i) s + abs(p_i)^2 = s^2 + a_{1i} s + a_{0i}$$

shows that the denominator polynomial functions of $$s$$ have real coefficients. The same can be said for the numerator. With this, the transfer function can be rewritten as:
 * $$H(s) = k \cdot \prod_{i=1}^{N/2}{\frac{s^2 + b_{1i} s + b_{0i}}{s^2 + a_{1i} s + a_{0i}}}$$

If the transfer function's order is odd, then a first order section has to be added to the chain. This section is associated to the real pole $$p_r$$ and to the real zero $$z_r$$, if there is one. The transfer function becomes:
 * $$H(s) = k \cdot \frac{s-z_r}{s-p_r} \cdot \prod_{i=1}^{{N-1}/2}{\frac{s^2 + b_{1i} s + b_{0i}}{s^2 + a_{1i} s + a_{0i}}}$$

An all-pole even order transfer function is in the form:
 * $$H(s) = k \cdot \prod_{i=1}^{N/2}{\frac{1}{(s-p_i)(s-p_i^*)}} = k \cdot \prod_{i=1}^{N/2}{\frac{1}{s^2 + a_{1i} s + a_{0i}}}$$

This is the case for Butterworth, Chebyshev type 1 and Bessel filter functions.

An all-pole odd order transfer function is in the form:
 * $$H(s) = k \cdot \frac{1}{s-p_r} \cdot \prod_{i=1}^{{N-1}/2}{\frac{1}{s^2 + a_{1i} s + a_{0i}}}$$

State Variable Filters
State Variable Filters have a topology with two integrators whose outputs correspond to the state-space variables associated with the transfer funtion.

The following circuit was proposed by Kerwin, Huelsman and Newcomb :

The following circuit is know as the Tow-Thomas circuit :

It is possible with both the Kerwin-Huelsman-Newcomb and the Tow-Thomas to build a weighted sum of all op-amp outputs in order to obtain a more generic transfer function.

Certain second order canonical structures directly use the transfer function's coefficients as amplifier gains.

Sallen and Key circuits
The Sallen–Key topology uses an operational amplifier to drive the output and R C elements to set the transfer function. Due to the driving capacity of operational amplifiers, Sallen–Key circuits are easily cascaded to form a higher order filters.

The following circuits shows a Sallen–Key lowpass filter circuit:

Filter Structure
Leapfrog filters are based on the simulation of passive ladder filters. The incentive for this choice is to inherit from the excellent passband sensitivity properties of the original circuit.

Taking the example of the following 4th order all-pole lowpass ladder filter,

one can write the following equations:
 * $$\begin{cases}

sC_1 \cdot U_1 = \frac{1}{R} \cdot (U_{in} - U_1) - I_2 \\ sL_2 \cdot I_2 = U_1 - U_3 \\ sC_3 \cdot U_3 = I_2 - I_4 \\ sL_4 \cdot I_4 = U_3 - R \cdot I_4 \\ U_{out} = R \cdot I_4 \end{cases}$$

Rewriting these equations gives:
 * $$\begin{cases}

U_1 = \frac{1}{sRC_1} (U_{in} - U_1 - RI_2) \\ R I_2 = \frac{R}{sL_2} (U_1 - U_3) \\ U_3 = \frac{1}{sRC_3} (R I_2 - R I_4) \\ R I_4 = \frac{R}{sL_4} (U_3 - R I_4) \\ U_{out} = R I_4 \end{cases}$$

This new set of equations shows that the filter can be implemented with a chain of 4 integrators with:
 * state variables having the form of $$w_i = U_i$$ or $$w_i = R I_i$$
 * time constants having the form of $$t_i = RC_i$$ or $$t_i = \frac{L_i}{R}$$

The resulting circuit is an integrator chain where each integrator output is brought back to the preceeding integrator input. Hence the name Leapfrog.

Transfer Function
The set of equations describing the filter can be rewritten using the state space representation as:

 * $$\begin{array}{ccrcccccc}

s \cdot \begin{bmatrix}U_1\\RI_2\\U_3\\RI_4\end{bmatrix} & = & \begin{bmatrix}-\frac{1}{t_1} & -\frac{1}{t_1} & 0 & 0\\\frac{1}{t_2} & 0 & -\frac{1}{t_2} & 0\\0 & \frac{1}{t_3} & 0 & -\frac{1}{t_3}\\0 & 0 & \frac{1}{t_4} & -\frac{1}{t_4}\end{bmatrix} & \cdot & \begin{bmatrix}U_1\\RI_2\\U_3\\RI_4\end{bmatrix} & + & \begin{bmatrix}\frac{1}{t_1}\\0\\0\\0\end{bmatrix} & \cdot & U_{in} \\ U_{out} & = & \begin{bmatrix}0 & 0 & 0 & 1\end{bmatrix} & \cdot & \begin{bmatrix}U_1\\RI_2\\U_3\\RI_4\end{bmatrix} & + & \begin{bmatrix}0\end{bmatrix} & \cdot & U_{in} \end{array}$$

From this equation set, one can write the A, B, C, D matrices as:

 * $$A = \begin{bmatrix}-\frac{1}{t_1} & -\frac{1}{t_1} & 0 & 0\\\frac{1}{t_2} & 0 & -\frac{1}{t_2} & 0\\0 & \frac{1}{t_3} & 0 & -\frac{1}{t_3}\\0 & 0 & \frac{1}{t_4} & -\frac{1}{t_4}\end{bmatrix}$$

 * $$B = \begin{bmatrix}\frac{1}{t_1}\\0\\0\\0\end{bmatrix}$$

 * $$C = \begin{bmatrix}0 & 0 & 0 & 1\end{bmatrix}$$

 * $$D = \begin{bmatrix}0\end{bmatrix}$$

From this representation, signal processing tools such as Octave or Matlab allow to plot the filter's frequency response or to examine its zeroes and poles.

Switched-Capacitor Filters
Switched-capacitor filters are analog sampled devices. Charging and discharging a capacitor can show to produce an impedance close to the one of a resistance. With this, RC time constants of an analog active filter are changed into a factor proportional to the ratio of two capacitances. This kind of circuit is most interesting for integrated circuit design, where R and C element values can largely vary from one die to another, whilst the ratio of two capacitances in the same region of a silicon device remains very precise.

title: Signal Processing/Analog Filters


text:
Signal Processing/Wiener Filters

Signal Prediction
The idea of signal prediction is a very important one, not only in the field of signal processing, but in most of engineering. Stated formally, the prediction problem is:

In short, the idea of a predictor is to use what we already know about the previous values of a signal to try and determine what the next value of the signal will be. Because many signals tend to be self-correlated, there is typically a strong relation between the previous values and the next value.

Wiener Filter

Shown at right is a brief block diagram that represents the prediction problem. The input signal, w[n] is fed into a predictor with tap-weights ai. The output of the predictor is x[n].

Now, we want to compare x[n] to our desired signal, denoted here as s[n]. The difference between these two signals is our error signal, e[n]. The idea behind the Wiener Filter is that we can select the optimum tap-weights ai such that the error signal is minimized.

Types of Minimization
It is worth asking, how exactly are we minimizing the error? Put another way, what quantity associated with the error are we attempting to minimize? The most common, and most mathematically tractable answer to this question is that we are going to minimize the mean-square error of the signal. That is, we want to minimize the average expected error, not any individual error value. In other words, we can define a cost function J as the expectation of our error squared:

 * $$J = E[e[n]e^*[n]]$$

Where e*[n] is the complex conjugate of our system. We will talk about complex numbers as being the most general case, and the student will be able to reduce that to the case of real numbers easily. Also it is important to note that in many situations, such as communications channels or other types of signal processing, that signals and filter coefficients typically are complex in nature, and need to be represented by complex values.

To minimize our cost function, we need to take the gradient of the cost function, and find the point where the gradient is identically equal to zero:

 * $$\nabla J = 0$$

We use the vector gradient here instead of the single-dimensional derivative, because eventually our signals are going to become more complicated vectors.

The Big Picture
By now, the casual reader is probably asking themselves exactly what the purpose of a Wiener filter is, and how it could possibly be used. While the initial formulation does not appear to be too useful, it is the application of adaptative algorithms, such as the steepest descent algorithm to the Wiener filter that exposes the true power of the system.

Instead of selecting a single vector of tap weights that represents an optimal solution, we can continuously apply the Wiener-Hopf equations to update the filter coefficients continuously. Consider the case of a transmitted data signal over a communications channel. The signal that comes into the receiver is a sum of two other terms:

 * $$w(t) = u(t) + n(t)$$

Where u(t) is the transmitted data signal, and n(t) is the random noise signal. The purpose of a filter such as the Wiener Filter, is that we know the characteristics of the transmitted data, but the characteristics of the received signal vary as the noise signal varies over time. Using an adaptive filter such as the Wiener Filter, we can continue to minimize the error due to the noise as the noise changes over time.

title: Signal Processing/Wiener Filters


text:
Talk:US Trademark Law

I understand this is not a legal advice forum, so please don't take my question that way. I'm just curious though - if a product says on the packaging that it's in some way compatible with, say, Xerox machines, would that likely be an infringement of the Xerox trademark? --193.128.72.68 14:35, 20 September 2007 (UTC)
 * Often, you'll see the trademark symbol and a note that "Xerox" is the property of Xerox inc. On the other hand, that's in Canada. Maybe it's different in the US. – Mike.lifeguard  | talk 15:25, 20 September 2007 (UTC)

Aspirin did not lose its trademark protection in the US (and its WWI allies) due to being used generically - the aspirin (and heroin) trademarks were specifically forfeit as war reparations in the Treaty of Versailles. Seriously.

title: Talk:US Trademark Law


text:
User talk:Cedwa030

Come introduce yourself at the new users page. If you have any questions, you can ask there or contact me personally.– Mike.lifeguard  | talk 15:01, 20 September 2007 (UTC)

Copyright problem with Image:File-12650796 0dc7868971 o.jpg
Thanks for uploading Image:File-12650796 0dc7868971 o.jpg. The Wikimedia Foundation is very careful about what Wikibooks includes because of copyright law, and requires that we maintain a strict copyright policy. Image:File-12650796 0dc7868971 o.jpg and other files you uploaded may soon be deleted unless we can determine the copyright holder and status. The copyright holder is usually the creator, the creator's employer, or the last person who was transferred ownership rights. Please take the time to read Media to learn more about what copyright information is required to satisfy our requirements and remember to include this important information for every file that you upload in the future as well. If you have any questions, feel free to contact me, or ask another Wikibookian at the help desk. Thank you.

See for a complete list of your uploads which may get deleted soon.

– Mike.lifeguard  | talk 15:01, 20 September 2007 (UTC)

Education revision
You need to learn better grammar and compose better. Laleena (talk) 01:52, 9 December 2007 (UTC)

title: User talk:Cedwa030


text:
User talk:Zhenyupan

Come introduce yourself at the new users page. If you have any questions, you can ask there or contact me personally.– Mike.lifeguard  | talk 15:28, 20 September 2007 (UTC)

title: User talk:Zhenyupan


text:
User talk:205.243.120.126

Please stop adding nonsense to Wikibooks. It is considered vandalism. If you would like to experiment, use the sandbox. Thank you. --Jomegat 16:10, 20 September 2007 (UTC)

title: User talk:205.243.120.126