# Initial Value Problem question

i was taking my final today and came across an initial value problem. Seemed pretty simple, seperate the variables, integrate, then use the initial value to find the value for the constantt C. The weird thing was that the constant C would be multipled by 0 when i plug in the given initial values. I just stopped and was like what the hell is this. I thought maybe it was a mistake and asked the intructor, but he said it wasn't. After some double checking, I was pretty sure my work up to that point was right.

Eventually i gave up and came to the conclusion that maybe C could be anything cause it was multiplied by 0 and just wrote my general solution without the constant C. But its still annoying the hell out of me, cause I've never seen this situation when the constant C is multipled by 0.

I talked to some people after the final and it seemed they ran into the same situation too. Can someone please explain the reasoning behind this this question? Sorry i don't remember the exact equation given, I'll try to ask my other classmate if they remember.

Related Differential Equations News on Phys.org
Yeah, I don't know about that. It is possible for boundary conditions or initial conditions to be redundant or contradictory so that you don't end up being able to specify what you want, so maybe that was it. But you've got to at least give something similar to the problem for anyone to tell.

saltydog
Homework Helper
teknodude said:
i was taking my final today and came across an initial value problem. Seemed pretty simple, seperate the variables, integrate, then use the initial value to find the value for the constantt C. The weird thing was that the constant C would be multipled by 0 when i plug in the given initial values. I just stopped and was like what the hell is this. I thought maybe it was a mistake and asked the intructor, but he said it wasn't. After some double checking, I was pretty sure my work up to that point was right.

Eventually i gave up and came to the conclusion that maybe C could be anything cause it was multiplied by 0 and just wrote my general solution without the constant C. But its still annoying the hell out of me, cause I've never seen this situation when the constant C is multipled by 0.
This situation occurs when the Lipschitz condition is not met. For example, the IVP:

$$ty^{''}+(t-1)y^{'}+y=t^2;\quad y(0)=0,\quad y^{'}(0)=0$$

has the general solution:

$$y(t)=1/6e^{-t}(-2+3c+2e^t)t^2$$

Note that this represents an infinite number of solutions.

heres the actual problem

$$x\frac{dy}{dx}-y=x^2+2$$
$$y(0)=1$$

Big typo on the type of IVP problem that i stated before. This is an IVP where you need to use an integrating factor $$\beta{(x)}$$.

rewriting the equation

$$\frac{dy}{dx}-\frac{y}{x}=x+\frac{2}{x}$$

the integrating factor is $$\beta{(x)}= e^\int-1/x = \frac{1}{x}$$

multiplying both sides by $$\beta{(x)}$$
$$\frac{1}{x} (\frac{dy}{dx}-\frac{y}{x}) = \frac{1}{x} (x+\frac{2}{x})$$

Integrating both sides
$$\int \frac{d}{dx} (\frac{y}{x}) = \int 1+ \int \frac{2}{x^2}$$

yields

$$\frac{y}{x} = x - \frac{2}{x} + C$$

$$y(x) = x^2 - 2 + xC$$

from here i need to find the value for the constant C, but if i plug in the intial conditions, C is multipled by zero if i use the last equation. If i just rewrite the equation solving for C:
$$C = \frac{y}{x} - x + \frac{2}{x}$$

I get the above equation divided by zero which is undefined My thought here is if i take the the general solution
$$y(x) = x^2 - 2 + xC$$

and say that $$K = xC$$

then this yields $$y(x) = x^2 - 2 + K$$
which does produce a nice number

Sorry to jump in at this point in the thread but I'm just wondering, when you are using an integrating factor, do you generally need to(take teknodude's question for example) keep the mod on the x? As in, IF = 1/|x| or can you just drop the mod sign after exponentiating the log which results from the IF calculation? I often just ignore the mod(after exponentiating the log, not before) and things seem to turn out alright but I'm not sure if this would always be the case so I would like to know.

Also when you use an IF, are you making the equation 'exact.' I ask this because some second order ODEs can be made 'exact' if the LHS can be written as a derivative wrt the indepdent variable. I realise that this could be a bit of a bother so it doesn't matter if no one answer my question but any help would be appreciated.

saltydog
Homework Helper
teknodude said:
heres the actual problem

$$x\frac{dy}{dx}-y=x^2+2$$
$$y(0)=1$$

Big typo on the type of IVP problem that i stated before. This is an IVP where you need to use an integrating factor $$\beta{(x)}$$.

rewriting the equation

$$\frac{dy}{dx}-\frac{y}{x}=x+\frac{2}{x}$$

the integrating factor is $$\beta{(x)}= e^\int-1/x = \frac{1}{x}$$

multiplying both sides by $$\beta{(x)}$$
$$\frac{1}{x} (\frac{dy}{dx}-\frac{y}{x}) = \frac{1}{x} (x+\frac{2}{x})$$

Integrating both sides
$$\int \frac{d}{dx} (\frac{y}{x}) = \int 1+ \int \frac{2}{x^2}$$

yields

$$\frac{y}{x} = x - \frac{2}{x} + C$$

$$y(x) = x^2 - 2 + xC$$

from here i need to find the value for the constant C, but if i plug in the intial conditions, C is multipled by zero if i use the last equation. If i just rewrite the equation solving for C:
$$C = \frac{y}{x} - x + \frac{2}{x}$$

I get the above equation divided by zero which is undefined My thought here is if i take the the general solution
$$y(x) = x^2 - 2 + xC$$

and say that $$K = xC$$

then this yields $$y(x) = x^2 - 2 + K$$
which does produce a nice number
This ODE does not have a solution passing through the point (0,1). The Lipschitz condition is not met at x=0. Look at the equation as:

$$\frac{dy}{dx}=\frac{x^2+y+2}{x}$$

The RHS is discontinuous at x=0 (check out the Existence and Uniqueness theorems for these equations). Thus we have no guarantee that a solution to the IVP with y(0)=1 exists and in fact there is none. Try graphing the solution for values of c between -10 and 10. At x=0, it never gets above the x-axis. Same dif for -10000 to 10000.

Must remember to look at an ODE as a question: It may have a solution, it may have several solutions, no solution, infinite number of solutions, or a different solution in different intervals of x.

koosh
I might be totally off..

I'm in highschool calculus... but I tried the problem, if I'm correct it's a first order linear diff. equation? if so then... i got C=-1 using...

$$\frac{dy}{dx}-\frac{y}{x}=x+\frac{2}{x}$$

then finding the integration factor $$e^\int(1/x)dx = x$$
where $$y = \frac (1)(v(x))\intv(x)Q(x)d(x)$$

so I get $$y = \frac (1)(x)\int x(x+\frac (2)(x)d(x)$$
giving me...
$$y = \frac (x^2)(2)+2+C$$
I.C. --- $$1 = 2+C$$
C=-1

Is that anywhere close?? Is it even a first order linear equation?

koosh
OK wow I totally massacred that...

So to rewrite..
I got the integration factor to be

v(x) = e^(integral (1/x))dx
v(x) = x

so... using y= 1/v(x) * integral( v(x) * Q(x) )dx
y = 1/x* (integral(x(x+2/x)dx)

y = x^2/2 + 2 +C [Y(0) = 1 ]
1 = 2 + C
C = -1

or is that totally incorrect?

lurflurf
Homework Helper
koosh said:
So to rewrite..
I got the integration factor to be

v(x) = e^(integral (1/x))dx
v(x) = x

so... using y= 1/v(x) * integral( v(x) * Q(x) )dx
y = 1/x* (integral(x(x+2/x)dx)

y = x^2/2 + 2 +C [Y(0) = 1 ]
1 = 2 + C
C = -1

or is that totally incorrect?
Totally incorrect.
It does not solve the differential equation.
The general solution is (as others have said above)
y=Cx+x^2-2
The problem is this cannot solve the initial condition. (y(0)=1)
y(0)=-2
Also an integrating factor can be used for this, but it is not needed.