Solving Differential Equations with Initial Conditions

In summary: I've only just started learning DE's and this may sound silly, but how do I substitute it in?If y = 2 and x = 1, c = -2
  • #1
BOAS
552
19
Hello

Homework Statement



Find the general solution of the following diff erential equations. In each case if
y = 2 when x = 1, fi nd y when x = 3.

[itex]x \frac{dy}{dx} = \frac{1}{y} + y [/itex]

Homework Equations





The Attempt at a Solution



[itex]x \frac{dy}{dx} = \frac{1}{y} + y [/itex]

[itex]x . \frac{1}{dx} =( \frac{1}{y} + y) \frac{1}{dy}[/itex]

[itex] \frac{1}{x} dx = y + \frac{1}{y} dy[/itex]

[itex]\int \frac{1}{x} dx = \int y + \frac{1}{y} dy[/itex]

[itex] ln|x| + c_{1} = \frac{y^{2}}{2} + ln|y| + c_{2}[/itex]

[itex] ln|x| - \frac{y^{2}}{2} - ln|y| = c_{2} - c_{1}[/itex]

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

If y = 2 and x = 1, c = -2

(assuming I have found the general solution correctly...)

But I don't see how I can find y, when x = 3 because there are two terms involving y.

I think the most likely explanation is that I've done something wrong, so i'd really appreciate some help!

thanks,

BOAS :)
 
Physics news on Phys.org
  • #2
$$\left(y+\frac1y\right)^{-1} \ne \frac{1}{y} + y$$
 
  • #3
BOAS said:
Hello

Homework Statement



Find the general solution of the following diff erential equations. In each case if
y = 2 when x = 1, fi nd y when x = 3.

[itex]x \frac{dy}{dx} = \frac{1}{y} + y [/itex]

Homework Equations





The Attempt at a Solution



[itex]x \frac{dy}{dx} = \frac{1}{y} + y [/itex]

[itex]x . \frac{1}{dx} =( \frac{1}{y} + y) \frac{1}{dy}[/itex]

[itex] \frac{1}{x} dx = y + \frac{1}{y} dy[/itex]

[itex]\int \frac{1}{x} dx = \int y + \frac{1}{y} dy[/itex]

[itex] ln|x| + c_{1} = \frac{y^{2}}{2} + ln|y| + c_{2}[/itex]

[itex] ln|x| - \frac{y^{2}}{2} - ln|y| = c_{2} - c_{1}[/itex]

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

If y = 2 and x = 1, c = -2

(assuming I have found the general solution correctly...)

But I don't see how I can find y, when x = 3 because there are two terms involving y.

I think the most likely explanation is that I've done something wrong, so i'd really appreciate some help!

thanks,

BOAS :)

Always substitute your alleged 'solution' into the original DE, to see if it works. My guess is that you have not done that yet.
 
  • #4
Ray Vickson said:
Always substitute your alleged 'solution' into the original DE, to see if it works. My guess is that you have not done that yet.

I've only just started learning DE's and this may sound silly, but how do I substitute it in?
 
  • #5
vela said:
$$\left(y+\frac1y\right)^{-1} \ne \frac{1}{y} + y$$

[itex]( \frac{1}{y} + y)^{-1} = \frac{1}{\frac{1}{y} + y} [/itex]

I'll see if I can solve it now
 
  • #6
No, it wouldn't. You can't distribute the exponent over the sum.

Just try it with y=1. On the lefthand side, you end up with 1/2; on the righthand side you end up with 2.
 
  • #7
BOAS said:
I've only just started learning DE's and this may sound silly, but how do I substitute it in?

In the obvious way: try it and see. Your solution says that x and y are related by
[tex] ln|x| - \frac{y^{2}}{2} - ln|y| = c, [/tex]
while the DE says they are related by
[tex] x dy = \left( y + \frac{1}{y} \right) dx .[/tex]
Do these two statements agree? Can you take the first form and show that it satisfies the second?
 
  • #8
vela said:
No, it wouldn't. You can't distribute the exponent over the sum.

Just try it with y=1. On the lefthand side, you end up with 1/2; on the righthand side you end up with 2.

I think I have identified and fixed the problem, or the second problem that was stopping me from making sense of your help :)

[itex]x \frac{dy}{dx} = \frac{1}{y} + y [/itex]

[itex]x . \frac{1}{dx} =( \frac{1}{y} + y) \frac{1}{dy}[/itex]

[itex] \frac{1}{x} dx = ( \frac{1}{y} + y)^{-1} dy[/itex]

[itex]\int \frac{1}{x} dx = \int ( \frac{1}{y} + y)^{-1} dy[/itex]

[itex] ln|x| + c_{1} = \frac{ln|y^{2} + 1|}{2} + c_{2}[/itex]

[itex] ln|x| - \frac{ln|y^{2} + 1|}{2} = c_{2} - c_{1}[/itex]

[itex] ln|x| - \frac{ln|y^{2} + 1|}{2}| = c[/itex]

(whilst trying to implement your help, I was trying to differentiate that section when I needed to be integrating it)
 

1. What are differential equations?

Differential equations are mathematical equations that describe how quantities change over time. They involve derivatives, which represent rates of change, and are used to model a wide variety of phenomena in science and engineering.

2. Why are differential equations important?

Differential equations are important because they provide a powerful tool for understanding and predicting the behavior of systems that change over time. They can be used to model everything from population growth and chemical reactions to motion and electrical circuits.

3. How do I solve a differential equation?

There are several methods for solving differential equations, including separation of variables, substitution, and using integrating factors. The specific method used depends on the type of equation and its complexity.

4. Can I use a computer to solve differential equations?

Yes, there are many software programs and online tools available for solving differential equations. These can be helpful for more complex equations or for checking your work.

5. What are some real-world applications of differential equations?

Differential equations are used in many fields, including physics, chemistry, biology, engineering, and economics. They can be used to model the growth of populations, the spread of diseases, the behavior of electrical circuits, the motion of objects, and many other phenomena.

Similar threads

  • Calculus and Beyond Homework Help
Replies
21
Views
839
  • Calculus and Beyond Homework Help
Replies
18
Views
1K
  • Calculus and Beyond Homework Help
Replies
6
Views
759
  • Calculus and Beyond Homework Help
Replies
5
Views
286
  • Calculus and Beyond Homework Help
Replies
12
Views
1K
  • Calculus and Beyond Homework Help
Replies
6
Views
548
  • Calculus and Beyond Homework Help
Replies
4
Views
692
  • Calculus and Beyond Homework Help
Replies
5
Views
620
  • Calculus and Beyond Homework Help
Replies
13
Views
274
  • Calculus and Beyond Homework Help
Replies
6
Views
853
Back
Top