![]() |
![]() |
![]() |
My Coding >
Mathematics >
First order ordinary differential equations >
Separable first order ODE
Separable first order ODEA separable first-order ordinary differential equation (ODE) is an ODE that can be written in the form \(y\prime(x) = f(x)g(y)\), where \(f(x)\) and \(g(y)\) are functions of \(x\) and \(y\), respectively. Separable ODEs can be solved by separating the variables, meaning that we can rearrange the equation so that all the terms involving y are on one side and all the terms involving x are on the other side, and then integrate both sides with respect to x and y, respectively. The general solution to a separable ODE is given by an implicit equation involving a constant of integration. Separable ODEs are a common type of ODE and have many applications in various fields of science and engineering. How to solve separable ODEWhen an ordinary differential equation can be represented in the form of \(y\prime(x) = f(x)g(y)\), the first step is to separate (that is why separable) variables. To do this we need to expand the definition of \(y\prime(x) = \frac{\mathop{dy}}{\mathop{dx}}\) and then regroup variables: \[\frac{\mathop{dy}}{\mathop{dx}} = f(x)g(y)\] \[g(y)\mathop{dy} = f(x)\mathop{dx}\] And now we can integrate the booth, left and right parts of the equation: \[\int g(y)\mathop{dy} = \int f(x)\mathop{dx}\] We've solved this equation now! It is the next question, can we take these integrals, or can we make an expression of \(y\) as a function of \(x\) explicitly, we've solved it! So, now we can consider a few very simple examples. Examples of separable ODEFor a better understanding of this theoretical material, let's consider two cases, with explicit and implicit solutions. Explicit case: \(y\prime(x) + 2xy^2 = 0\)I do not advise you to memorise the equation given, but I do want to encourage you to solve this equation and derive the formula for every equation you have. This will allow us to avoid plenty of silly errors. \[ y\prime(x) + 2xy^2 = 0 \\ \frac{\mathop{dy}}{\mathop{dx}} = -2xy^2 \\ \frac{\mathop{dy}}{y^2} = -2x\mathop{dx} \\ \int\frac{\mathop{dy}}{y^2} = \int -2x\mathop{dx} \\ -\frac{1}{y} = -x^2 + C \\ \boxed{y = \frac{1}{x^2 + C}}\]For indefinite integral, it is important to keep constant of the integration. This constant will be used if the initial conditions are given. The constant is a joined constant from both integrals and it belongs to the real numbers: \(C\in\mathbb{R}\). It is important to mention the range of this constant. Implicit case: \(y\prime[2y + \cos{(y)}] = 3x^2\)\[ y\prime[2y + \cos{(y)}] = 3x^2 \\ \frac{\mathop{dy}}{\mathop{dx}}[2y + \cos{(y)}] = 3x^2 \\ [2y + \cos{(y)}]\mathop{dy} = 3x^2\mathop{dx} \\ \int [2y + \cos{(y)}]\mathop{dy} = \int 3x^2\mathop{dx} \\ \boxed{y^2 + \sin{(y)} = x^3 + C}\]Differential equation is solved, but it is easy to notice, that we can't express the answer as a function \(y(x)\), that is why the solution is implicit. Complicated constsnt in \(y\prime = 2xy\)Now we can consider a bit complicated case with the limitations on the constant of the integration. Let's solve simple looking a first-order separable equation: \(y\prime = 2xy\) \[ y\prime = 2xy \\ \frac{\mathop{dy}}{\mathop{dx}} = 2xy \\ \frac{\mathop{dy}}{y} = 2x\mathop{dx} \\ \int\frac{\mathop{dy}}{y} = \int 2x\mathop{dx} \\ \ln{\left|y\right|} = x^2 + C \\ e^{\ln{\left|y\right|}} = e^{x^2 + C} \\ \left|y\right| = e^{x^2}e^C \\ e^{x^2}e^C > 0 \Rightarrow y = \pm e^{x^2}e^C \\ e^C > 0 \Rightarrow \pm e^C \in\mathbb{R} \Rightarrow A\equiv\pm e^C; A\in\mathbb{R} \\ \boxed{y = Ae^{x^2}}\]It was important to show, how we rid our of module sign by changing in to \(\pm\) range and then conver this range into a constant. For more detailed explanation of all these equations, please watch our video:
|
Last 10 artitles
9 popular artitles
|
|
© 2020 MyCoding.uk -My blog about coding and further learning. This blog was writen with pure Perl and front-end output was performed with TemplateToolkit. |