Solving a Differential Equation Conflict

  • Thread starter Thread starter gulsen
  • Start date Start date
gulsen
Messages
215
Reaction score
0
I have a basic differential equation:
\frac{dy}{dx} = x + y, y(0) = 1

Now, when I try to solve this by making it exact
\mu \frac{dy}{dx} + \mu y = \mu x
I get \mu = e^{-x} and solution -x-1. This doesn't satisfy the initial condition. But when I try to solve it as a non-homogenous equation as:
\frac{dy}{dx} + y= x
I get
y_p = 2e^x, y_c = -x-1
so
y = 2e^x-x-1

Which seems to be a correct & full solution. What was I missing in the first try?
 
Physics news on Phys.org
You are solving dy/dx + y = x which is wrong since the original equation is
dy/dx = x + y, or dy/dx - y = x so now u(x) = e^(-x) and so on and it works out.


And yes, the answer is y = 2e^x - x - 1
 
gulsen said:
I have a basic differential equation:
\frac{dy}{dx} = x + y, y(0) = 1
Now, when I try to solve this by making it exact
\mu \frac{dy}{dx} + \mu y = \mu x
I assume this was just a typo, but that equation should be
\mu \frac{dy}{dx} - \mu y = \mu x
I get \mu = e^{-x} and solution -x-1. This doesn't satisfy the initial condition.
Your error: you forgot the constant of integration. You should have obtained
y = -(x+1) + c/\mu = ce^x - (1+x)
and then solved for the initial condition y(0)=1 yielding c=2 or
y = 2e^x -(x+1)
But when I try to solve it as a non-homogenous equation as:
\frac{dy}{dx} + y= x
I get
y_p = 2e^x, y_c = -x-1
so
y = 2e^x-x-1
You're nomenclature is backward here. The solution to the homogeneous equation is called the complementary function and is denoted as y_c. The complementary function generally involves arbitrary constants. A solution to the inhomogeneous equation is called a particular function and is denoted as y_p.
In this case, the solution to the homogeneous equation y^\prime-y=0 is
y_c = ce^x
where c is an arbitrary constant and
y_p = -(x+1)
is a particular solution to the inhomogeneous equation. Combining these,
y = ce^x - (1+x)
which meets the initial conditions when c=2.
 
Last edited:
Oh, that was just a typo. Thanks D_H, it ends up that I've forgotten the integration constant.
About naming, take it easy, I'm just a freshman!
 
Prove $$\int\limits_0^{\sqrt2/4}\frac{1}{\sqrt{x-x^2}}\arcsin\sqrt{\frac{(x-1)\left(x-1+x\sqrt{9-16x}\right)}{1-2x}} \, \mathrm dx = \frac{\pi^2}{8}.$$ Let $$I = \int\limits_0^{\sqrt 2 / 4}\frac{1}{\sqrt{x-x^2}}\arcsin\sqrt{\frac{(x-1)\left(x-1+x\sqrt{9-16x}\right)}{1-2x}} \, \mathrm dx. \tag{1}$$ The representation integral of ##\arcsin## is $$\arcsin u = \int\limits_{0}^{1} \frac{\mathrm dt}{\sqrt{1-t^2}}, \qquad 0 \leqslant u \leqslant 1.$$ Plugging identity above into ##(1)## with ##u...
Back
Top