Linear (I think?) First Order Diff EQ

In summary: But i think the most easy way was the one I first wrote. I think he was asking for another way of solving the diff. equation, so I showed him that way. But i saw that you also used the same way, so there is no point in discusing this further. We both solved it.In summary, the conversation revolved around solving the differential equation xy' + y = cos x. The participants discussed different methods, such as separation of variables and using an integration factor, to solve the equation. Ultimately, the equation was simplified to (xy)' = cos x and the solution was found to be y = (sin x)/x + C. The conversation also included some friendly banter and a small mathematical error that was
  • #1
Feldoh
1,342
3
So this equation came up:

xy' + y = cos x

Now I was just wondering how to solve this, all I've learned how to do is separation of variables, which cannot be used in this case.

Basically I ask this because a solution for y is an infinite series, so basically I'm just wondering if the infinite series converges to some function of x, and if it does which function is it?
 
Physics news on Phys.org
  • #2
well, i think that deriving an integration factor would work. Like deviding through by x:

[tex] y'+\frac{1}{x}y=\frac{cosx}{x}[/tex]


then [tex]r=e^{\int\frac{dx}{x}}=e^{ln|x|}=|x|[/tex] Now multiplying throught we get

[tex]|x|y'+\frac{1}{x}|x|y=\frac{cosx}{x}|x|=>sgn(x)xy'+\frac{1}{x}sgn(x)xy=\frac{cosx}{x}sgn(x)x=>xy'+y=cosx[/tex]

Now we notice that on the left side
[tex]xy'+y=(xy)'[/tex] this way

[tex](xy)'=cosx=>\int(xy)'dx=\int cosxdx =>xy=sinx+C=>y=\frac{sinx}{x}+x^{-1}C[/tex]
 
Last edited:
  • #3
What did you need the "integration factor" for?
 
  • #4
Pere Callahan said:
What did you need the "integration factor" for?

Well, i guess i did not need it at all, because it was already in a nice form. I don't know why i did it. Maybe just to show the OP another way of solving diff. eq. since he said that he has learned so far only the method of separation of variables.
 
  • #5
xy' + x = (xy)' help? :smile:
 
  • #6
epenguin said:
xy' + x = (xy)' help? :smile:

well what u did here isn't true..lol...
 
  • #7
sutupidmath said:
well what u did here isn't true..lol...

It's true if you saw I obviously meant to write xy' + y = (xy)' stupidmath :biggrin:
 
  • #8
epenguin said:
It's true if you saw I obviously meant to write xy' + y = (xy)' stupidmath :biggrin:

Well first, it is not stupidmath, but rather sutupidmath!

Well, if you are asking as why xy'+y=(xy)', it is simply the product rule.
(fg)'=fg'+gf'.
 
  • #9
I'd guess, penguin was not asking this:smile:
 
  • #10
epenguin said:
xy' + y = (xy)' help? :smile:
I don't know, why would he write this then? I also was surprised..lol..
 
  • #11
I woudl interpret this as adressing the OP

xy' + y = (xy)'
Does this help?

The mathematical error was most probably just a typo.
 
  • #12
Pere Callahan said:
I woudl interpret this as adressing the OP

xy' + y = (xy)'
Does this help?

The mathematical error was most probably just a typo.
Yeah, that makes sens.
 
  • #13
sutupidmath said:
Well first, stupidmath, but rather sutupidmath!

Well, if you are asking as why xy'+y=(xy)', it is simply the product rule.
(fg)'=fg'+gf'.

Yes I realized it is not stupidmath, but rather sutupidmath. I didn't realize you did! :biggrin: As you saw even I o:) can make a typo!

I am saying that that formula makes it easy to solve your d.e. Warning, I think it will be paticularly important not to forget the constant of integration.
 
  • #14
epenguin said:
Yes I realized it is not stupidmath, but rather sutupidmath. I didn't realize you did! :biggrin:

HAHAHA...Very funny!:rofl:

epenguin said:
I am saying that that formula makes it easy to solve your d.e. Warning, I think it will be paticularly important not to forget the constant of integration.


Isn't this the same thing, in more details ,what i just wrote above??
 
Last edited:
  • #15
sutupidmath said:
Well, if you are asking as why xy'+y=(xy)', it is simply the product rule.
(fg)'=fg'+gf'.

sutupidmath said:
Isn't this the same thing, in more details ,what i just wrote above??

Yes it is the formula (fg)'=fg'+gf' applied to xy . Using it can you now solve the problem you asked about?
 
  • #16
epenguin said:
Yes it is the formula (fg)'=fg'+gf' applied to xy . Using it can you now solve the problem you asked about?


I did not ask about anything body! Have you at least read the thread at all, or you are just throwing words here without knowing who you are addressing to? It was i who actually solved the problem for the OP!
 
Last edited:
  • #17
sutupidmath said:
I did not ask about anything body! Have you at least read the thread at all, or you are just throwing words here without knowing who you are addressing to? It was i who actually solved the problem for the OP!

:redface:Sorry I had not noticed who was posting and assumed I was replying to the OP who I now see never came back!

:tongue2:And I confess I had not noticed you had solved it as I didn't read beyond the first line or two of your post and immediately thought 'that is unnecessarily complicated'. However congratulations on getting the same right answer as me! :biggrin:
 
  • #18
Sorry, about two minutes after I posted it I realized it was the product rule and slapped myself in the face for not seeing it earlier.
 
  • #19
Feldoh said:
Sorry, about two minutes after I posted it I realized it was the product rule and slapped myself in the face for not seeing it earlier.

Yeah, i complicated a lill bit my answer, but i just wanted to show another perspective from the beggining on that problem.
 

1. What is a linear first-order differential equation?

A linear first-order differential equation is an equation in which the unknown function and its derivative appear only with a coefficient and a power of 1. It can be written in the form dy/dx + P(x)y = Q(x), where P(x) and Q(x) are functions of x.

2. How do you solve a linear first-order differential equation?

To solve a linear first-order differential equation, we use the method of separation of variables. This involves isolating the derivative and the function on opposite sides of the equation, then integrating both sides and solving for the function.

3. What is the use of linear first-order differential equations in science?

Linear first-order differential equations are used to model many physical and biological phenomena, such as population growth, chemical reactions, and electrical circuits. They allow us to analyze and predict how these systems will change over time.

4. Can linear first-order differential equations have multiple solutions?

Yes, linear first-order differential equations can have multiple solutions. This is because the general solution to a first-order differential equation contains an arbitrary constant, which can take on different values and result in different solutions.

5. Are there any real-life examples of linear first-order differential equations?

Yes, there are many real-life examples of linear first-order differential equations. For instance, the growth of bacteria in a petri dish can be modeled by a first-order differential equation, as can the charging and discharging of a capacitor in an electrical circuit. These equations are used in fields such as biology, physics, and engineering.

Similar threads

  • Differential Equations
Replies
12
Views
2K
Replies
2
Views
751
  • Calculus and Beyond Homework Help
Replies
3
Views
1K
Replies
14
Views
1K
  • Calculus
Replies
4
Views
1K
Replies
2
Views
252
Replies
1
Views
895
Replies
2
Views
1K
Back
Top