Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Autonomous system (mathematics)
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Example== The equation <math>y'= \left(2-y\right)y</math> is autonomous, since the independent variable (<math>x</math>) does not explicitly appear in the equation. To plot the [[slope field]] and [[isocline]] for this equation, one can use the following code in [[GNU Octave]]/[[MATLAB]] <syntaxhighlight lang="matlab"> Ffun = @(X, Y)(2 - Y) .* Y; % function f(x,y)=(2-y)y [X, Y] = meshgrid(0:.2:6, -1:.2:3); % choose the plot sizes DY = Ffun(X, Y); DX = ones(size(DY)); % generate the plot values quiver(X, Y, DX, DY, 'k'); % plot the direction field in black hold on; contour(X, Y, DY, [0 1 2], 'g'); % add the isoclines(0 1 2) in green title('Slope field and isoclines for f(x,y)=(2-y)y') </syntaxhighlight> One can observe from the plot that the function <math>\left(2-y\right)y</math> is <math>x</math>-invariant, and so is the shape of the solution, i.e. <math>y(x)=y(x-x_0)</math> for any shift <math>x_0</math>. Solving the equation symbolically in [[MATLAB]], by running <syntaxhighlight lang="matlab"> syms y(x); equation = (diff(y) == (2 - y) * y); % solve the equation for a general solution symbolically y_general = dsolve(equation); </syntaxhighlight> obtains two [[Equilibrium point|equilibrium]] solutions, <math>y=0</math> and <math>y=2</math>, and a third solution involving an unknown constant <math>C_3</math>, <syntaxhighlight lang="matlab" inline>-2 / (exp(C3 - 2 * x) - 1)</syntaxhighlight>. Picking up some specific values for the [[initial condition]], one can add the plot of several solutions [[File:Slop field with isoclines and solutions.png|thumb|Slope field with isoclines and solutions]] <syntaxhighlight lang="matlab"> % solve the initial value problem symbolically % for different initial conditions y1 = dsolve(equation, y(1) == 1); y2 = dsolve(equation, y(2) == 1); y3 = dsolve(equation, y(3) == 1); y4 = dsolve(equation, y(1) == 3); y5 = dsolve(equation, y(2) == 3); y6 = dsolve(equation, y(3) == 3); % plot the solutions ezplot(y1, [0 6]); ezplot(y2, [0 6]); ezplot(y3, [0 6]); ezplot(y4, [0 6]); ezplot(y5, [0 6]); ezplot(y6, [0 6]); title('Slope field, isoclines and solutions for f(x,y)=(2-y)y') legend('Slope field', 'Isoclines', 'Solutions y_{1..6}'); text([1 2 3], [1 1 1], strcat('\leftarrow', {'y_1', 'y_2', 'y_3'})); text([1 2 3], [3 3 3], strcat('\leftarrow', {'y_4', 'y_5', 'y_6'})); grid on; </syntaxhighlight>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)