Solving a Linear Piecewise ODE

  • Thread starter Thread starter Bcranger 0
  • Start date Start date
  • Tags Tags
    Linear Ode
Click For Summary
SUMMARY

The discussion focuses on solving the piecewise linear ordinary differential equation (ODE) defined as y' - y = f(x) with initial condition y(0) = 1, where f(x) = 1 for 0 ≤ x ≤ 1 and f(x) = -1 for x > 1. The integrating factor identified is e^-x, leading to the formulation d/dx(e^-x * y) = e^-x * f(x). The solution process involves integrating both sides and applying the initial condition to determine the constant C, ultimately aiming to find y(2). The initial attempt yielded an incorrect result of 15.7781, prompting a request for clarification on the correct application of the "5 Steps Method" for piecewise ODEs.

PREREQUISITES
  • Understanding of ordinary differential equations (ODEs)
  • Familiarity with integrating factors in ODEs
  • Knowledge of piecewise functions and their implications in differential equations
  • Proficiency in applying initial conditions to solve differential equations
NEXT STEPS
  • Study the "5 Steps Method" for solving inhomogeneous linear differential equations
  • Practice solving piecewise linear ODEs with varying initial conditions
  • Explore the application of integrating factors in different types of ODEs
  • Review the concept of continuity and differentiability in piecewise functions
USEFUL FOR

Students and educators in mathematics, particularly those focused on differential equations, as well as professionals seeking to deepen their understanding of piecewise linear ODEs and their solutions.

Bcranger 0
Messages
10
Reaction score
0

Homework Statement


Solve the piecewise linear ODE, y' - y = f(x), y(0) = 1, where
f(x) = 1 when 0<=x<=1 and f(x) = -1 when x > 1.

y(2) = ?

Homework Equations


None


The Attempt at a Solution


I found the integrating factor to be e^-x and multiplied both sides of the equation by the integrating factor.

I rewrote the equation as the d/dx(e^-x * y) = e^-x * f(x). I integrated both sides to get e^-x * y = -e^-x * f(x) + C.

Solving for y, I got y = -f(x) + C/e^-x. Using the initial value y(0)=1, I managed to find C as +2. Solving for y(2) there onwards, I obtained an answer of 15.7781, which was said to be the wrong answer. I am not sure where I went wrong!


I would appreciate any help on solving this problem using the "5 Steps Method" aka the basic method for solving an inhomogeneous linear DE.
 
Physics news on Phys.org
You have two different differential equations. Try solving first in the range 0<x<1 for y(1) and then use this as an initial condition for the second equation to find y(2).
 

Similar threads

  • · Replies 11 ·
Replies
11
Views
3K
Replies
4
Views
2K
  • · Replies 3 ·
Replies
3
Views
1K
  • · Replies 3 ·
Replies
3
Views
2K
Replies
3
Views
2K
  • · Replies 4 ·
Replies
4
Views
1K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 3 ·
Replies
3
Views
1K
Replies
5
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K