Solving a Diff. Equation: y'=x+y, y(0)=2

  • Thread starter Thread starter skyturnred
  • Start date Start date
Click For Summary
SUMMARY

The differential equation y' = x + y with the initial condition y(0) = 2 can be solved using an integrating factor. The incorrect approach of rearranging to y' - y = x led to a misunderstanding in integration. The correct method involves recognizing the equation as a linear first-order differential equation and applying the integrating factor e^(-x) to simplify the solution process. This results in a unique solution that satisfies the initial condition.

PREREQUISITES
  • Understanding of first-order linear differential equations
  • Familiarity with integrating factors
  • Basic knowledge of integration techniques
  • Ability to apply initial conditions to differential equations
NEXT STEPS
  • Study the method of integrating factors for linear differential equations
  • Practice solving first-order differential equations using various techniques
  • Explore examples of initial value problems in differential equations
  • Review the theory behind linear differential equations in textbooks or online resources
USEFUL FOR

Students studying differential equations, mathematics educators, and anyone looking to improve their problem-solving skills in calculus and differential equations.

skyturnred
Messages
117
Reaction score
0

Homework Statement



Solve:

y'=x+y, y(0)=2

Homework Equations


The Attempt at a Solution



I THINK my method is correct.. but I messed up somewhere.

I rearrange for y'-y=x

integrate both sides gets me:

y-[itex]\frac{y^{2}}{2}[/itex]=[itex]\frac{x^{2}}{2}[/itex]

after completing the square I get

(y-1)[itex]^{2}[/itex]=-x[itex]^{2}[/itex]+1

But this is where I mess up. To solve for y, I square root each side. But then I get '+ or -' on the right side:

y=[itex]\pm[/itex][itex]\sqrt{-x^{2}+1}[/itex]+1+c

so solving for both cases gets me c=0 OR c=2. But I can only have once answer. Where did I go wrong?
 
Last edited:
Physics news on Phys.org
skyturnred said:

Homework Statement



Solve:

y'=x+y, y(0)=2

Homework Equations





The Attempt at a Solution



I THINK my method is correct.. but I messed up somewhere.

I rearrange for y'-y=x

integrate both sides gets me:

y-[itex]\frac{y^{2}}{2}[/itex]=[itex]\frac{x^{2}}{2}[/itex]

after completing the square I get

(y-1)[itex]^{2}[/itex]=-x[itex]^{2}[/itex]+1

But this is where I mess up. To solve for y, I square root each side. But then I get '+ or -' on the right side:

y=[itex]\pm[/itex][itex]\sqrt{-x^{2}+1}[/itex]+1+c

so solving for both cases gets me c=0 OR c=2. But I can only have once answer. Where did I go wrong?

Going from y'-y=x to [itex]y-\frac{y^2}{2} =\frac{x^2}{2}[/itex] is wrong. The DE reads as [itex]dy - y dx = x dx,[/itex] so when you integrate on the left you don't get y - y^2/2. You need to use an "integrating factor"; see http://www.ucl.ac.uk/Mathematics/geomath/level2/deqn/de8.html , or read your textbook.

RGV
 


Thanks! Your hint helped me get the right answer!
 

Similar threads

Replies
6
Views
2K
Replies
7
Views
2K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 11 ·
Replies
11
Views
3K
Replies
8
Views
2K
Replies
4
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 3 ·
Replies
3
Views
1K