Solving equations of the form: \( \frac{{\text d}y}{{\text d}x} = f \left( \frac{ax+by+c}{Ax+By +C} \right) , \quad Ax+By +C \ne 0 \) was first accomplished by Carl Jacobi (1804--1851) in 1842 (Journal für die reine und angewandte Mathematik).
Return to computing page for the first course APMA0330
Return to computing page for the second course APMA0340
Return to Mathematica tutorial for the second course APMA0340
Return to the main page for the course APMA0330
Return to the main page for the course APMA0340
Return to Part II of the course APMA0330
can be reduced to separable equations. Here a, b, c, and A, B, C are some given
constants and the function of one variable f(v) is assumed to be continuous within some interval. Without any loss of generality,
we consider only the case when two lines defined by equations ax+by+c = 0 and
Ax+By+C = 0 are not parallel (\( aB - Ab \ne 0 \) ). Otherwise, the above equation can be reduced to a separable
equation upon substitution v = ax+by+c or v = Ax+By+C,
which was demonstrated in the previous section.
If \( aB - Ab \ne 0 ,\) constants c and C
can be eliminated by shifting the system of coordinates:
\[
x = X + \alpha \quad \mbox{and} \quad y = Y + \beta \qquad\Longrightarrow \qquad X = x- \alpha , \quad Y = y - \beta ,
\]
with constants α and β to be chosen to satisfy the system of equations:
\[
a\alpha + b\beta + c =0 \qquad \mbox{and} \qquad A\alpha + B \beta +C =0 .
\]
With these choices, we get the differential equation in new variables
X and Y:
where K is a constant of integration, and two values v=-2
and v=1 should be excluded because of presence of two logarithms. Previously, we excluded
v=-4 from our consideration since the slope function has v+4
in the denominator.
Dropping logarithm sign, we get
Finally, we need to check whether excluded functions y = -2x+3 and
y = x-3 are solutions of the given differential equation. Indeed they are. Moreover,
these two functions can be obtained from the above general solution by appropriate choice of constant
K, namely, taking either zero or infinity.
We plot the corresponding direction fields using StreamPlot command:
Example: :
Consider an algebraic equation: \( 2 x^2 + y^2 - 2 x y + 5 x =0 \) and we wish to
determine a differential equation to which the algebraic equation defines implicitly its solution. Mathematica
is capable to find the required differential equation.
If the option ContourShading
is removed, we will get
In the above graphs, the option Contour->{0} instructs Mathematica to graph only the level curve corresponding to 0.
The option
ContourShading -> False
specifies to not shade the regions between contours, Frame -> False
specifies that a frame is not to be placed around the
resulting graphics objects, Axes -> Automatic
specifies that axes are to be placed on the resulting
graphics objects while the option AxesOrigin -> {0, 0}
specifies that they intersect at the point (0,0), and the option AxesStyle -> GrayLevel[0.5]
specifies that they be drawn in a medium shade of gray.
The option
PlotPoints -> 100
instructs Mathematica to increase the number of sample points to 100 (the default is 15), helping assure that
the resulting graphic object appears smooth.
Note that instead of eq[[1]], one can use the equation
5 x + 2 x^2 - 2 x y + y^2 explicitly.
Now we instruct Mathematica to find the differential equation in two steps.
step1= Dt[eq,x]
Out[2]= 5 + 4 x - 2 y - 2 x Dt[y, x] + 2 y Dt[y, x] == 0
We exclude the singular point x = 1 where the
integral curves have an infinite slope. The right-hand side
function (= slope function) is a composition of two functions:
where
\( \alpha = 1, \) and \( \beta = 0 ,\)
so \( x=X+1, \ y=Y.\) We next substitute \( x=X+1 \) and \( y=Y \) into the given differential
equation and simplify. The result is
\[
X \text{d}v /\text{d}X +v = 4 (1-v)^2 \qquad \mbox{or} \qquad \text{d}v (4(1-v)^2 -v) = \text{d}X / X .
\]
Plotting the direction field, it can be seen that \( v = a /2 \approx 1.64039 \) is an unstable equilibrium solution, and \( v=
\frac{b}{2} \approx 0.609612 \) is a stable equilibrium solution. These
critical points are not singular solutions because integral curves do
not touch them, which means that an initial value problem for the
differential equation \( X\,v' = (2v-a)(2v-b) \) has a unique solution.
Now we return to the original variables. Since \( X=x-1, \ Y=y \), and
\( v=Y/X, \) the original differential equation has the general solution
in implicit form:
Return to Mathematica page
Return to the main page (APMA0330)
Return to the Part 1 (Plotting)
Return to the Part 2 (First Order ODEs)
Return to the Part 3 (Numerical Methods)
Return to the Part 4 (Second and Higher Order ODEs)
Return to the Part 5 (Series and Recurrences)
Return to the Part 6 (Laplace Transform)
Return to the Part 7 (Boundary Value
Problems)