Linear ordinary differential equation.

Click For Summary

Homework Help Overview

The discussion revolves around a linear ordinary differential equation of the form \(\dfrac{dy}{dx} + y = f(x)\), where \(f(x)\) is defined piecewise. The initial condition is given as \(y(0) = 0\). Participants are exploring the implications of the integrating factor method and the continuity of the solution across the defined intervals.

Discussion Character

  • Mixed

Approaches and Questions Raised

  • Participants discuss the use of an integrating factor and its effectiveness, with some suggesting that treating the equation as two separate differential equations may be simpler. Questions are raised about the role of the homogeneous solution and the continuity of the overall solution at the boundary \(x=1\).

Discussion Status

The discussion is active, with participants providing alternative perspectives on solving the equation. Some guidance has been offered regarding the continuity requirement and the consideration of homogeneous solutions, though no consensus has been reached on the best approach.

Contextual Notes

There is a noted oversight regarding the treatment of the piecewise function \(f(x)\), which may have influenced the initial attempts at solving the differential equation. Participants are also considering the implications of continuity at the transition point \(x=1\).

Buffu
Messages
851
Reaction score
147

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
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   Reactions: Buffu
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   Reactions: Buffu
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:
@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:
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   Reactions: Charles Link

Similar threads

  • · Replies 2 ·
Replies
2
Views
858
  • · Replies 9 ·
Replies
9
Views
3K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 105 ·
4
Replies
105
Views
11K
Replies
3
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
Replies
8
Views
2K
  • · Replies 11 ·
Replies
11
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K