Question about the constant that occures after differentiation/integration

Hi!

I have a question about something I find a bit peculiar. The textbook of my math-course is a bit inconistent in the use of the constant (here $\displaystyle C$) that comes from differentiating an expression.

I have an expression that has been differentiated, and it looks like this:

$\displaystyle e^{\frac{1}{2}x^2+C}$

Sometimes this kind of expression is used to calculate further, but other times it is manipulated into this:

$\displaystyle Ce^{\frac{1}{2}x^2}$

My question is this:

Can I always perfrom this manipulation, or is it just in certain circumstances? I know the constant $\displaystyle C$ is a constant that can be changed if it is only affected by other constants (like $\displaystyle e$ in this situation), but the whole thing is very confusing...

Any clarifying help will be greatly appreciated!

Thomas