Main Page: Difference between revisions

From formulasearchengine
Jump to navigation Jump to search
No edit summary
No edit summary
 
(328 intermediate revisions by more than 100 users not shown)
Line 1: Line 1:
[[File:Slope Field.png|thumb|right|250px|The slope field of dy/dx=x<sup>2</sup>-x-2, with the blue, red, and turquoise lines being (x<sup>3</sup>/3)-(x<sup>2</sup>/2)-2x+4, (x<sup>3</sup>/3)-(x<sup>2</sup>/2)-2x, and (x<sup>3</sup>/3)-(x<sup>2</sup>/2)-2x-4, respectively.]]
This is a preview for the new '''MathML rendering mode''' (with SVG fallback), which is availble in production for registered users.
In [[mathematics]], a '''slope field''' (or '''direction field''') is a graphical representation of the solutions of a first-order [[differential equation]]. It is useful because it can be created without solving the differential equation analytically. The representation may be used to qualitatively visualize solutions, or to numerically approximate them.


==Definition==
If you would like use the '''MathML''' rendering mode, you need a wikipedia user account that can be registered here [[https://en.wikipedia.org/wiki/Special:UserLogin/signup]]
===Standard case===
* Only registered users will be able to execute this rendering mode.
The slope field is traditionally defined for the following type of differential equations
* Note: you need not enter a email address (nor any other private information). Please do not use a password that you use elsewhere.
:<math>y'=f(x,y)</math>.
It can be viewed as a creative way to plot a real-valued function of two real variables <math>f(x,y)</math> as a planar picture. Specifically, for a given pair <math>x,y</math>, a vector with the components <math>[1, f(x,y)]</math> is drawn at the point <math>x,y</math> on the <math>x,y</math>-plane. Sometimes, the vector <math>[1, f(x,y)]</math> is normalized to make the plot better looking for a human eye. A set of pairs <math>x,y</math> making a rectangular grid is typically used for the drawing.


An [[Isocline]] (a series of lines with the same slope) is often used to supplement the slope field. In an equation of the form <math>y'=f(x,y)</math>, the isocline is a line in the <math>x,y</math>-plane plane obtained by setting <math>f(x,y)</math> equal to a constant.
Registered users will be able to choose between the following three rendering modes:


===General case of a system of differential equations===
'''MathML'''
Given a system of differential equations,
:<math forcemathmode="mathml">E=mc^2</math>
:<math>\frac{dx_1}{dt}=f_1(t,x_1,x_2,\ldots,x_n)</math>
:<math>\frac{dx_2}{dt}=f_2(t,x_1,x_2,\ldots,x_n)</math>
:::<math>\vdots</math>
:<math>\frac{dx_n}{dt}=f_n(t,x_1,x_2,\ldots,x_n)</math>
the slope field is an array of slope marks in the [[phase space]] (in any number of dimensions depending on the number of relevant variables; for example, two in the case of a first-order linear [[ordinary differential equation|ODE]], as seen to the right).  Each slope mark is centered at a point <math>(t,x_1,x_2,\ldots,x_n)</math> and is parallel to the vector


:<math>\begin{pmatrix} 1 \\ f_1(t,x_1,x_2,\ldots,x_n) \\ f_2(t,x_1,x_2,\ldots,x_n) \\ \vdots \\ f_n(t,x_1,x_2,\ldots,x_n) \end{pmatrix}</math>.
<!--'''PNG'''  (currently default in production)
The number, position, and length of the slope marks can be arbitrary.  The positions are usually chosen such that the points <math>(t,x_1,x_2,\ldots,x_n)</math> make a uniform grid. The standard case, described above, represents <math>n=1</math>. The general case of the slope field for systems of differential equations is not easy to visualize for <math>n>2</math>.
:<math forcemathmode="png">E=mc^2</math>


==General application==
'''source'''
With computers, complicated slope fields can be quickly made without tedium, and so an only recently practical application is to use them merely to get the feel for what a solution should be before an explicit general solution is sought.  Of course, computers can also just solve for one, if it exists.
:<math forcemathmode="source">E=mc^2</math> -->


If there is no explicit general solution, computers can use slope fields (even if they aren’t shown) to numerically find graphical solutions. Examples of such routines are [[Euler's method]], or better, the [[Runge-Kutta methods]].
<span style="color: red">Follow this [https://en.wikipedia.org/wiki/Special:Preferences#mw-prefsection-rendering link] to change your Math rendering settings.</span> You can also add a [https://en.wikipedia.org/wiki/Special:Preferences#mw-prefsection-rendering-skin Custom CSS] to force the MathML/SVG rendering or select different font families. See [https://www.mediawiki.org/wiki/Extension:Math#CSS_for_the_MathML_with_SVG_fallback_mode these examples].


==Software for plotting slope fields==
==Demos==
Different software packages can plot slope fields.


===Example code in [[GNU Octave]]/[[MATLAB]] ===
Here are some [https://commons.wikimedia.org/w/index.php?title=Special:ListFiles/Frederic.wang demos]:
<source lang="matlab">
Ffun = @(X,Y)X.*Y;              % function f(x,y)=xy
[X,Y]=meshgrid(-2:.3:2,-2:.3:2); % choose the plot sizes
DY=Ffun(X,Y); DX=ones(size(DY)); % generate the plot values
quiver(X,Y,DX,DY);              % plot the direction field
hold on;
contour(X,Y,DY,[-6 -2 -1 0 1 2 6]); %add the isoclines
title('Slope field and isoclines for f(x,y)=xy')
</source>


===Alternate example code in [[GNU Octave]]/[[MATLAB]] ===
<source lang="matlab">
funn = @(x,y)y-x;                % function f(x,y)=y-x
[x,y]=meshgrid(-2:0.5:2);        % intervals for x and y
slopes=funn(x,y);                % matrix of slopes
dy=slopes./sqrt(1+slopes.^2);    % normalize the line element...
dx=sqrt(1-dy.^2);                % ...magnitudes for dy and dx
quiver(x,y,dx,dy);              % plot the direction field
</source>


=== Example code for [[Maxima (software) | Maxima]] ===
* accessibility:
** Safari + VoiceOver: [https://commons.wikimedia.org/wiki/File:VoiceOver-Mac-Safari.ogv video only], [[File:Voiceover-mathml-example-1.wav|thumb|Voiceover-mathml-example-1]], [[File:Voiceover-mathml-example-2.wav|thumb|Voiceover-mathml-example-2]], [[File:Voiceover-mathml-example-3.wav|thumb|Voiceover-mathml-example-3]], [[File:Voiceover-mathml-example-4.wav|thumb|Voiceover-mathml-example-4]], [[File:Voiceover-mathml-example-5.wav|thumb|Voiceover-mathml-example-5]], [[File:Voiceover-mathml-example-6.wav|thumb|Voiceover-mathml-example-6]], [[File:Voiceover-mathml-example-7.wav|thumb|Voiceover-mathml-example-7]]
** [https://commons.wikimedia.org/wiki/File:MathPlayer-Audio-Windows7-InternetExplorer.ogg Internet Explorer + MathPlayer (audio)]
** [https://commons.wikimedia.org/wiki/File:MathPlayer-SynchronizedHighlighting-WIndows7-InternetExplorer.png Internet Explorer + MathPlayer (synchronized highlighting)]
** [https://commons.wikimedia.org/wiki/File:MathPlayer-Braille-Windows7-InternetExplorer.png Internet Explorer + MathPlayer (braille)]
** NVDA+MathPlayer: [[File:Nvda-mathml-example-1.wav|thumb|Nvda-mathml-example-1]], [[File:Nvda-mathml-example-2.wav|thumb|Nvda-mathml-example-2]], [[File:Nvda-mathml-example-3.wav|thumb|Nvda-mathml-example-3]], [[File:Nvda-mathml-example-4.wav|thumb|Nvda-mathml-example-4]], [[File:Nvda-mathml-example-5.wav|thumb|Nvda-mathml-example-5]], [[File:Nvda-mathml-example-6.wav|thumb|Nvda-mathml-example-6]], [[File:Nvda-mathml-example-7.wav|thumb|Nvda-mathml-example-7]].
** Orca: There is ongoing work, but no support at all at the moment [[File:Orca-mathml-example-1.wav|thumb|Orca-mathml-example-1]], [[File:Orca-mathml-example-2.wav|thumb|Orca-mathml-example-2]], [[File:Orca-mathml-example-3.wav|thumb|Orca-mathml-example-3]], [[File:Orca-mathml-example-4.wav|thumb|Orca-mathml-example-4]], [[File:Orca-mathml-example-5.wav|thumb|Orca-mathml-example-5]], [[File:Orca-mathml-example-6.wav|thumb|Orca-mathml-example-6]], [[File:Orca-mathml-example-7.wav|thumb|Orca-mathml-example-7]].
** From our testing, ChromeVox and JAWS are not able to read the formulas generated by the MathML mode.


/* field for y'=xy (click on a point to get an integral curve) */
==Test pages ==
plotdf( x*y, [x,-2,2], [y,-2,2]);


==Examples==
To test the '''MathML''', '''PNG''', and '''source''' rendering modes, please go to one of the following test pages:
<gallery Caption="y' = xy">
*[[Displaystyle]]
Image:Slope_field_1.svg|Slope field
*[[MathAxisAlignment]]
Image:Slope_field_with_integral_curves_1.svg|Integral curves
*[[Styling]]
image:Isocline_3.png|Isoclines (blue), slope field (black), and some solution curves (red)
*[[Linebreaking]]
</gallery>
*[[Unique Ids]]
*[[Help:Formula]]


==See also==
*[[Inputtypes|Inputtypes (private Wikis only)]]
*[[Examples of differential equations]]
*[[Url2Image|Url2Image (private Wikis only)]]
*[[Vector field]]
==Bug reporting==
*[[Laplace transform applied to differential equations]]
If you find any bugs, please report them at [https://bugzilla.wikimedia.org/enter_bug.cgi?product=MediaWiki%20extensions&component=Math&version=master&short_desc=Math-preview%20rendering%20problem Bugzilla], or write an email to math_bugs (at) ckurs (dot) de .
*[[List of dynamical systems and differential equations topics]]
 
==References==
* Blanchard, Paul; Devaney, Robert L.; and Hall, Glen R. (2002). ''Differential Equations'' (2nd ed.). Brooks/Cole: Thompson Learning. ISBN 0-534-38514-1
 
==External links==
* {{MathWorld |title = Slope field |urlname = SlopeField}}
* [http://www.math.psu.edu/cao/DFD/Dir.html Slope field plotter]
 
[[Category:Calculus]]
[[Category:Differential equations]]
[[Category:Articles with example MATLAB/Octave code]]

Latest revision as of 22:52, 15 September 2019

This is a preview for the new MathML rendering mode (with SVG fallback), which is availble in production for registered users.

If you would like use the MathML rendering mode, you need a wikipedia user account that can be registered here [[1]]

  • Only registered users will be able to execute this rendering mode.
  • Note: you need not enter a email address (nor any other private information). Please do not use a password that you use elsewhere.

Registered users will be able to choose between the following three rendering modes:

MathML

E=mc2


Follow this link to change your Math rendering settings. You can also add a Custom CSS to force the MathML/SVG rendering or select different font families. See these examples.

Demos

Here are some demos:


Test pages

To test the MathML, PNG, and source rendering modes, please go to one of the following test pages:

Bug reporting

If you find any bugs, please report them at Bugzilla, or write an email to math_bugs (at) ckurs (dot) de .