Linear ordinary differential equation.

In summary: But, in the end, I found that the integrating factor is needed because the condition on ##f(x)## is not satisfied.
  • #1
Buffu
849
146

Homework Statement



##\dfrac{dy}{dx} + y = f(x)##

##f(x) = \begin{cases} 2 \qquad x \in [0, 1) \\ 0 \qquad x \ge 1 \end{cases}##

##y(0) = 0##

Homework Equations

The Attempt at a Solution



Integrating factor is ##e^x##

##e^x\dfrac{dy}{dx} + e^x y = e^x f(x)##

##\displaystyle ye^x = \int e^x f(x) dx = \begin{cases} \int 2e^x dx = 2e^x + C \qquad x \in [0, 1) \\ \int 0 dx = C^\prime \qquad x \ge 1 \end{cases}##Solving for inital value,

##ye^x = \begin{cases} 2(e^x - 1) \qquad x \in [0, 1) \\ 0 \qquad x \ge 1 \end{cases}##

The answer is ##ye^x = \begin{cases} 2(e^x - 1) \qquad x \in [0, 1) \\ 2(e - 1) \qquad x \ge 1 \end{cases}##
, which is way off.

I think the fault is in my answer this time but I can't point it :(.
 
Physics news on Phys.org
  • #2
From your first solution ## y(1)=2(1-e^{-1} ) ##. (We're going to assume that ## y ## is continuous at ## x=1 ##). From the second solution ## y \, e^x=C' ## . But ## C'=y(1) e^1 ##. Thereby ## y e^x=2(e-1) ## for ## x>1 ##.
 
  • Like
Likes Buffu
  • #3
Finding in integration factor seems over-engineering. You could just as well treated as two differential equations, both very simple:

y' = -y and y' = - ( y - 2 ) .

The arbitrary constant for the solution of the second is in principle arbitrary, but it would be natural to treat it as given by a requirement of continuity as already mentioned.
 
  • Like
Likes Buffu
  • #4
One question/comment for @Buffu is how do you know that the homogeneous solution ## y=A \, e^{-x} ## doesn't play a role in the solution? That is apparently an underlying assumption in the problem (that you ignore any homogeneous solution), but it is always good practice to consider the possibility of a homogeneous solution. ## \\ ## Editing: In the solution for ## x>1 ##, the solution is in fact the homogeneous solution. Also, for ## 0<x<1 ##, the integrating factor method you used actually generated a homogeneous solution. ## \\ ## Let me offer an alternative solution to the differential equation above: For ## 0<x<1 ##, ## y_p=2 ## and the homogeneous solution is ## y_h=A \, e^{-x} ##, so that for ## 0<x<1 ## , ## y=2+A \, e^{-x} ## for some ## A ## . ## \\ ## For ## x>1 ##, ## y_p=0 ##, and ## y_h=B \, e^{-x} ##, so that ## y=B \, e^{-x} ## for some ## B ##. ## \\ ## The constants ## A ## and ## B ## are easily found.
 
Last edited:
  • #5
@Buffu I edited my comments in post #4, because I see your solution, using an integrating factor, actually resulted in generating the necessary homogeneous solution. There is, as @epenguin pointed out, a simple solution that doesn't require an integrating factor. Please see my edited post #4.
 
Last edited:
  • #6
Yes I see what mistake I made.
Thank you.

For the integrating factor, I did not see that DE here is a simple separable because I overlooked the condition on ##f(x)##. I thought, let me reduce the equation first then I will care about ##f(x)##.
 
  • Like
Likes Charles Link

Related to Linear ordinary differential equation.

What is a linear ordinary differential equation?

A linear ordinary differential equation is an equation that relates a function and its derivatives in a linear way. It can be written in the form of y' + P(x)y = Q(x), where P(x) and Q(x) are functions of x.

What are the key features of a linear ordinary differential equation?

The key features of a linear ordinary differential equation include a linear relationship between the function and its derivatives, the presence of constant coefficients, and the use of basic operations such as addition, subtraction, and multiplication.

What are the methods for solving a linear ordinary differential equation?

The methods for solving a linear ordinary differential equation include the direct integration method, the method of undetermined coefficients, and the variation of parameters method. These methods involve different techniques for manipulating the equation to find a solution.

Why are linear ordinary differential equations important in science?

Linear ordinary differential equations are important in science because they are used to model many natural phenomena, such as population growth, chemical reactions, and electrical circuits. They also play a crucial role in the development of mathematical models for complex systems.

What are some real-world applications of linear ordinary differential equations?

Some real-world applications of linear ordinary differential equations include predicting the spread of diseases, analyzing the growth of plants and animals, and designing control systems for various industries. They are also used in engineering, physics, and economics to model and understand various systems and processes.

Similar threads

  • Calculus and Beyond Homework Help
Replies
8
Views
780
  • Calculus and Beyond Homework Help
Replies
3
Views
585
  • Calculus and Beyond Homework Help
Replies
2
Views
313
  • Calculus and Beyond Homework Help
Replies
14
Views
303
  • Calculus and Beyond Homework Help
Replies
5
Views
648
  • Calculus and Beyond Homework Help
Replies
7
Views
729
  • Calculus and Beyond Homework Help
Replies
14
Views
431
  • Calculus and Beyond Homework Help
Replies
1
Views
744
  • Calculus and Beyond Homework Help
Replies
18
Views
1K
  • Calculus and Beyond Homework Help
Replies
2
Views
755
Back
Top