# Thread: Question involving arbitrary constant

1. ## Question involving arbitrary constant

I have a question with regards to another differential problem:
$\displaystyle \frac{dy}{dx}=\frac{(ycosx)}{(1+y^2)}$

$\displaystyle \Rightarrow \frac{1+y^2}{y} dy = \frac{ycosx}{y} dx$

$\displaystyle \Rightarrow \int \frac{1}{y} dy+\int y dy = \int cosx dx$

$\displaystyle \Rightarrow lny+\frac{y^2}{2} {\color{red}+C} = sinx+C$

why is it wrong to have the +C there? The second part of the question says for y(0)=1 find a specific formula. I know the way I have it setup with C on both sides they will always cancel off, but it seems somewhat logical considering how if it maters which side of the equation I put C on. For example, on the right it is +1 but if I left the +C and took the other away it would be -1.

2. Hello superdude,

You are on the right track meaning that you have solved the equation almost correctly. However the last step (adding the integration constant) is wrong. The following:

$\displaystyle \Rightarrow lny+\frac{y^2}{2} {\color{red}+C} = sinx+C$

is not right, you must add one constant and not two. However there are several possibilities, p.e.

$\displaystyle ln(y)+\frac{y^2}{2}=sinx+C$
$\displaystyle ln(y)+\frac{y^2}{2}+C=sinx$
Or:
$\displaystyle ln(y)+\frac{y^2}{2}=sinx-C$
$\displaystyle ln(y)+\frac{y^2}{2}-C=sinx$

As you can see the latter two are derived from the first two. It does not matter what the constant is, it can be a positive or a negative number. Don't add zero because this leads to nowhere :-) From any of these you can apply the boundary condition and thus you are able to obtain the formula needed. If you want to add two constants, they are not the same and must be called differently as follows:

$\displaystyle ln(y)+\frac{y^2}{2}+K_1=sinx+K_2$

which can be rewritten to any of the cases mentioned above, so in fact you are using two different ones but mostly the step of combining them is left out and one final constant is immediately written down. Can you proceed from here in finding the required formula?

coomast

3. Originally Posted by superdude
I have a question with regards to another differential problem:
$\displaystyle \frac{dy}{dx}=\frac{(ycosx)}{(1+y^2)}$

$\displaystyle \Rightarrow \frac{1+y^2}{y} dy = \frac{ycosx}{y} dx$

$\displaystyle \Rightarrow \int \frac{1}{y} dy+\int y dy = \int cosx dx$

$\displaystyle \Rightarrow lny+\frac{y^2}{2} {\color{red}+C} = sinx+C$

why is it wrong to have the +C there? The second part of the question says for y(0)=1 find a specific formula. I know the way I have it setup with C on both sides they will always cancel off, but it seems somewhat logical considering how if it maters which side of the equation I put C on. For example, on the right it is +1 but if I left the +C and took the other away it would be -1.
We don't add a (different) arbirtary constant on each side in seperation of variables because it is more economic to use just one (and that is what we want from a first order ODE), the sum difference product or quotient of arbitary constants are again arbitary constants.

Also in the case you give as an example you use the same symbol on both sides of the equation, now if these are to be the same arbitary constant then $\displaystyle C$ may be subtracted from both sides leaving no arbitary constant.

CB

4. got it. thanks