# Line integrate find C something wrong. dy/dx+Q(x)*y=F(x)

1. Nov 8, 2012

### DragonIce

1. The problem statement, all variables and given/known data

$$\frac{dy}{dx}+\frac{y}{(1+x^2)} = \frac{\arctan x}{(1+x^2)}$$ when
$$y(\frac{\pi}{4})=0$$

2. Relevant equations

$$\frac{dy}{dx}+Q(x)*y=F(x)$$

3. The attempt at a solution

y=u*v
$$u*\frac{dv}{dx}+v*(\frac{du}{dx}+\frac{u}{(1+x^2)})=\frac{\arctan x}{(1+x^2)}$$
$$\frac{du}{dx}+\frac{u}{(1+x^2)}=0$$
$$\int\frac{1}{u}\,du=-\int\frac{1}{(1+x^2)}\,dx$$
$$\ln u=-\arctan x$$
$$t=\arctan x$$
$$t'=\frac{1}{(1+x^2)}$$
$$u=\frac{1}{e^t}$$
So let's go back to
$$u*\frac{dv}{dx}+v*(\frac{du}{dx}+\frac{u}{(1+x^2)})=\frac{\arctan x}{(1+x^2)}$$
$$\frac{1}{e^t}*\frac{dv}{dx}=\frac{t}{(1+x^2)}$$
$$v=\int\frac{t*e^t}{(1+x^2)}\,dx$$
Integrating by parts...
$$v=t * e^t-e^t*dt+C$$
Going back to y=u*v
$$y=t-t'+\frac{C}{e^t}$$ - global answer.

The problem starts now... I need to find C when
$$y(\frac{\pi}{4})=0$$ so i get

$$\arctan(\frac{pi}{4})-\frac{1}{(1+\frac{pi^2}{16})}+\frac{C}{e^{\arctan(\frac{pi}{4})}}=0$$

And now i am clueless how to find C. Becouse I cannot find arctan pi/4 and there is a problem with pi^2/16+1
I assume that C=0 becouse graphic of arctan x and 1/(x^2+1) are very close in point 0.79 (pi/4), but i cannot prove it
$$C=e^{\arctan(\frac{pi}{4})}*(\frac{1}{(\frac{pi^2}{16}+1)}-\arctan(\frac{pi}{4}))$$
I have to find rational answer...

Last edited: Nov 8, 2012
2. Nov 8, 2012

### vela

Staff Emeritus
That should be
$$dt = \frac{1}{(1+x^2)}\,dx$$
That's wrong. You can't have a lone dt sitting around.

3. Nov 8, 2012

### DragonIce

$$(u*v)'=u'*v+u*v'$$
I meant it like dt=t'
I should write ' instead of d, but i am right here i think.
If u=f(x) and v=e^q(x)
Then (u*v)'=f'(x)*e^q(x)+f(x)*q'(x)*e^q(x)
It doesnt solve my problem with Constant

4. Nov 8, 2012

### vela

Staff Emeritus
No, that's not right.

5. Nov 8, 2012

### DragonIce

Anyway if you are right i still dont know what to do with
arctan pi/4-1+C/e^arctan pi/4=0
C=e^arctan x - arctan x * e^arctan x
I have to transform it somehow to get rational answer

6. Nov 8, 2012

### jackmell

You're all over the place with that. Try and treat it more carefully. First write it as:

$$y'+\frac{1}{1+x^2}y=\frac{\arctan(x)}{1+x^2}$$

so the integrating factor is:

$$\mu=e^{\arctan(x)}$$

apply that to both sides and integrate to get:

$$\int d\left(y e^{\arctan(x)}\right)=\int e^{\arctan(x)}\frac{\arctan(x)}{1+x^2}dx$$

or:

$$ye^{\arctan(x)}=\int e^{\arctan(x)}\frac{\arctan(x)}{1+x^2}dx$$

so now you just have to integrate

$$\int e^{\arctan(x)}\frac{\arctan(x)}{1+x^2}dx$$

You can do that right?

7. Nov 8, 2012

### DragonIce

well i did that... if you look carefully you can notice that i treat t=arctan(x)
so basicaly $$\int e^t\frac{t}{1+x^2}dx$$ equal to $$\int e^{\arctan(x)}\frac{\arctan(x)}{1+x^2}dx$$
and my answer is $$v=\arctan(x)*e^{\arctan(x)}-\frac{e^{\arctan(x)}}{x^2+1}+C$$ and then i turn back to y=u*v and get$$y=\arctan(x)-\frac{1}{x^2+1}+\frac{C}{e^{\arctan(x)}}$$ i need to aply that $$y(\frac{pi}{4})=0$$ and find C, but i am stack.

8. Nov 8, 2012

### jackmell

You shouldn't have t's and x's in the same integrand. Start with:

$$\int e^{\arctan(x)} \frac{\arctan(x)}{1+x^2}dx$$

and let:

$$u=e^{\arctan(x)}$$

then:

$$du=\frac{e^{\arctan(x)}}{1+x^2}dx$$

now substitute all that in the integral to get:

$$\int \ln(u)du$$

see, all u's now. Now integrate that and don't forget the constant of integration.

9. Nov 8, 2012

### vela

Staff Emeritus
Which isn't correct. If you differentiate your answer, you do not get the integrand back. From here, it appears your mistake is resulting from your sloppy notation.