Solving an Initial Value Problem with Separable Differential Equations

Click For Summary

Homework Help Overview

The problem involves an initial value problem represented by a separable differential equation: dy/dx = κ(y + y³), with the conditions 0 ≤ x ≤ 1 and y(0) = s, where κ > 0 and s > 0. The discussion centers on determining the conditions on s for the solution y(x) to exist over the entire interval [0, 1].

Discussion Character

  • Exploratory, Assumption checking, Mathematical reasoning

Approaches and Questions Raised

  • Participants discuss solving the differential equation using separation of variables and express uncertainty about the integration constant. They explore the implications of the initial condition on the solution and question the relationship between the constants derived and the initial value s.

Discussion Status

The discussion is ongoing, with participants providing insights and corrections regarding the mathematical steps taken. Some guidance has been offered on relating the integration constant to the initial condition, but explicit consensus on the conditions for s has not been reached.

Contextual Notes

Participants note that the problem requires careful handling of logarithmic expressions and the implications of the initial condition s > 0. There is an emphasis on ensuring the solution remains valid across the specified interval.

jjr
Messages
51
Reaction score
1

Homework Statement



The problem is from Walter Gautschi - Numerical Analysis, exercise 5.1.

Consider the initial value problem

[itex]\frac{dy}{dx}=\kappa(y+y^3), 0\leq x\leq1; y(0)=s[/itex]

where [itex]\kappa > 0[/itex] (in fact, [itex]\kappa >> 1[/itex]) and s > 0. Under what conditions on s does the solution [itex]y(x) = y(x;s)[/itex] exist on the whole interval [0,1]? {Hint: find y explicitly.}

The Attempt at a Solution



Following the hint, I tried solving it as a separable differential equation:

[itex]\frac{dy}{y+y^3} = \kappa dx[/itex]

(Using wolframalpha here)

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

[itex]10^{log(y)-\frac{1}{2}log(y^2+1)} = 10^{\kappa x}[/itex]

Ending up with

[itex]\frac{y}{2} + \frac{1}{2y} = 10^{-\kappa x}[/itex]

Not sure how to solve this, so used wolframalpha again and got:

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

Evidently [itex]y(0) = 1[/itex], which means that s has to be equal to 1.

This doesn't seem right to me. Especially considering the work needed to find y explicitly, seeing as how this is not a course in differential equations. So what I am missing here?
 
Physics news on Phys.org
jjr said:

Homework Statement



The problem is from Walter Gautschi - Numerical Analysis, exercise 5.1.

Consider the initial value problem

[itex]\frac{dy}{dx}=\kappa(y+y^3), 0\leq x\leq1; y(0)=s[/itex]

where [itex]\kappa > 0[/itex] (in fact, [itex]\kappa >> 1[/itex]) and s > 0. Under what conditions on s does the solution [itex]y(x) = y(x;s)[/itex] exist on the whole interval [0,1]? {Hint: find y explicitly.}

The Attempt at a Solution



Following the hint, I tried solving it as a separable differential equation:

[itex]\frac{dy}{y+y^3} = \kappa dx[/itex]

(Using wolframalpha here)

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

I see no constant of integration; the right hand side should be [itex]\kappa x + C[/itex].
 
  • Like
Likes   Reactions: 1 person
Thank you, and right you are; that was quite sloppy of me. So starting then at

[itex]\frac{y}{2}+\frac{1}{2y}=C10^{\kappa x}[/itex]

yielding

[itex]y = C10^{-\kappa x} \pm \sqrt{ C^{2}10^{-2 \kappa x} - 1 }[/itex]

so

[itex]y(0) = s = C \pm \sqrt{C^2-1}[/itex]

Which imposes a constraint on C: [itex]|C| \geq 1[/itex]

But they are asking for what conditions on s the solution [itex]y(x) = y(x;s)[/itex] exists on the interval [0,1]? I am having some trouble seeing the connection here, especially in the context of the chapter "Initial Value Problems for ODEs: One-Step Methods". Any thoughts?
 
jjr said:
Thank you, and right you are; that was quite sloppy of me. So starting then at

[itex]\frac{y}{2}+\frac{1}{2y}=C10^{\kappa x}[/itex]

[tex]\log(y) - \frac12 \log(y^2 + 1) = \log\left( \frac{y}{\sqrt{1 + y^2}}\right).[/tex] This is not in general equal to [itex]\log(y/2 + 1/(2y))[/itex], which is what your expression implies (and I must apologise for not pointing this out in my first reply).

Also: in calculus, "log" means "natural logarithm", so if [itex]a = \log b[/itex] then [itex]b = e^a[/itex].
 
Ah, that explains the seemingly frivolous interchangeable use of log and ln I've sometimes seen. And yes, I see that I've made en error when dealing with the [itex]\frac{1}{2}[/itex] factor. Well, being more explicit this time and starting from (I will for my own sake switch to using ln now):

[itex]ln(y) - \frac{1}{2}ln(y^2+1) = \kappa x + C_1[/itex]

[itex]ln(y) - ln( \sqrt{y^2+1}) = \kappa x + C_1[/itex]

[itex]e^{ln(y) - ln(\sqrt{y^2+1})} = C_2 e^{\kappa x}[/itex]

[itex]\frac{e^{ln(y)}}{e^{ln(\sqrt{y^2+1})}} = C_2 e^{\kappa x}[/itex]

[itex]\frac{y}{\sqrt{(y^2+1)}} = C_2 e^{\kappa x}[/itex]

[itex]\frac{y^2}{y^2+1} = C_3 e^{2\kappa x}[/itex]

[itex]\frac{y^2+1}{y^2} = C_4 e^{-2\kappa x}[/itex]

[itex]1 + y^{-2} = C_4 e^{-2\kappa x}[/itex]

[itex]y^{-2} = C_4 e^{-2\kappa x} - 1[/itex]

[itex]y^2 = \frac{1}{C_4 e^{-2\kappa x} -1}[/itex]

[itex]y = \pm \frac{1}{\sqrt{C_4 e^{-2\kappa x} -1}}[/itex]

So

[itex]y(0) = s = \pm \frac{1}{\sqrt{C_4 - 1}}[/itex]

and thus [itex]C_4 > 1[/itex].

Hopefully the math checks out this time. But I am still not sure how to use this in the context of the exercise. Any ideas?
 
It was given that s>0. Find the integration constant C4 in terms of s. Than write y(x) using s, and see what should be true for s, so y(x,s) is defined for the whole interval [0,1].

ehild
 
  • Like
Likes   Reactions: 1 person
Perfect, thanks!
 
You are welcome:smile:

ehild
 

Similar threads

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