Help Solving Differential Equations

  • #1
Q1.

x2dy/dx + xy = x2sinx

I believe it is a separable equation (first order linear)

First step is to rewrite into standard form;

dy/dx + (xy)/x2 = (x2sin(x))/x2

Then to calculate the integrating factor I(x);

I(x) = e|(xy)/x2dx = eylnx = elnxy = xy

Then i need to multiply both sides of the d.e. by I(x)
 

Answers and Replies

  • #2
35,287
7,140
Q1.

x2dy/dx + xy = x2sinx

I believe it is a separable equation (first order linear)

First step is to rewrite into standard form;

dy/dx + (xy)/x2 = (x2sin(x))/x2

Then to calculate the integrating factor I(x);

I(x) = e|(xy)/x2dx = eylnx = elnxy = xy

Then i need to multiply both sides of the d.e. by I(x)
This part is wrong -- e|(xy)/x2dx. In standard form, your equation is dy/dx + (1/x)y = sin(x). The coefficient of the y term is just 1/x, not y/x. With that correction, what should your integrating factor be?

BTW, this is NOT a precalculus question, so I moved it to the appropriate forum section.
 
  • #3
Thanks for the tip, and moving the thread.

Here's what I've done;

NEW standard form (from old one)

dy/dx + (1/x)y = sinx

Integrating factor now becomes

I(x) = e|(1/x)dx = elnx = x

Multiplying both sides of the d.e. by I(x) gives;

x dy/dx + x(1/x)y = x sinx

x dy/dx + y = x sinx

Rewriting as d/dx(I(x)y)

d/dx(xy) = x sinx

Integrating both sides with respect to x

xy = x|sinx

xy = sinx - x cosx

y = (sinx)/x - cosx + C/x


How'd I go?
 
Last edited:
  • #4
PeroK
Science Advisor
Homework Helper
Insights Author
Gold Member
2020 Award
18,660
10,293
Thanks for the tip, and moving the thread.

y = (sinx)/x - cosx + C/x

How'd I go?

Differentiate what you got for y and plug it back into the original equation! That's what a solution to the equation means, after all.
 
  • #5
epenguin
Homework Helper
Gold Member
3,873
897
I can't resist looking for a more elementary, simple way, of looking at it to see is there a simple
d(of something) there, although having your more general method which will see you algorithmically through all problems of a given category is no doubt more valuable generally.

So looking at that, x2dy/dx can come from d(x2y)/dx which is x2dy/dx + 2xy which is nearly what you want but the factor 2 spoils it and there is no way to fiddle constants to hammer it to what you want, so try to divide the equation by x and then d(xy)/dx works perfectly and gives the same solution result as yours.
 
Last edited:
  • #6
HallsofIvy
Science Advisor
Homework Helper
41,847
966
Yes, that's the whole point of an "integrating factor". We want to find a function, u(x), such that multiplying dy/dx+ y/x by it will give a "complete differential". That is, we must have d(uy)/dx= u(dy/dx)+ (du/dx)y= u(dy/dx)+ (u/x)y. The "u(dy/dx)" terms cancel leaving du/dx= u/x. du/u= dx/x; ln(u)= ln(x)+ C, u= cx. Since we only need one such function, take c= 1. Then x(dy/dx+ y/x)= x(dy/dx)+ y= d(xy)/dx= xsin(x).

[itex]xy= \int x sin(x)dx[/itex]. Use integration by parts on the right.
 
  • #7
35,287
7,140
Thanks for the tip, and moving the thread.

Here's what I've done;

NEW standard form (from old one)

dy/dx + (1/x)y = sinx

Integrating factor now becomes

I(x) = e|(1/x)dx = elnx = x
The 'I' character you're using to indicate an integral is very hard to spot, appearing identical to 'l' (lowercase L) and very close to '|' (vertical bar).
JoshP-hillips said:
Multiplying both sides of the d.e. by I(x) gives;

x dy/dx + x(1/x)y = x sinx

x dy/dx + y = x sinx

Rewriting as d/dx(I(x)y)
Why not write it as d/dx(xy)?
JoshP-hillips said:
d/dx(xy) = x sinx

Integrating both sides with respect to x

xy = x|sinx
Why is the bar in there?
JoshP-hillips said:
xy = sinx - x cosx

y = (sinx)/x - cosx + C/x


How'd I go?
You tell us. Once you have found a solution to a differential equation, you can (and should) check it by verifying that your solution satisfies the DE.
 

Related Threads on Help Solving Differential Equations

Replies
2
Views
2K
Replies
14
Views
2K
  • Last Post
Replies
3
Views
845
  • Last Post
Replies
3
Views
2K
  • Last Post
Replies
15
Views
1K
  • Last Post
Replies
2
Views
976
  • Last Post
Replies
2
Views
2K
  • Last Post
Replies
2
Views
990
  • Last Post
Replies
24
Views
2K
  • Last Post
Replies
7
Views
2K
Top