find indefinite integral of

(e^-x)-(1)/(e^-x+(x)^2 dx

my interpretation:

(e^-x - 1)/(e^-x+x^2) , you have mis-matched brackets

even the usual reliable Wolfram had difficulties with that one
http://integrals.wolfram.com/index.jsp?expr=%28e%5E-x+-+1%29%2F%28e%5E-x%2Bx%5E2%29&random=false

the way you typed it, fixing the missing bracket

e^-x - (1/(e^-x+x^2) )

http://integrals.wolfram.com/index.jsp?expr=e%5E-x+-+%281%2F%28e%5E-x%2Bx%5E2%29+%29&random=false

same result,
that's a tough one

let u= (e^-x+(x))^-2

then du = -2/(e^-x+(x)) * (-e^-x+(1))dx

which changes the integral to
1/2 u du

or u^2

and Bob saw an even third interpretation of your typing

(e^-x - 1)/(e^-x+ x )^2

http://integrals.wolfram.com/index.jsp?expr=%28e%5E-x+-+1%29%2F%28e%5E-x%2B+x+%29%5E2&random=false

To find the indefinite integral of the given function, let's break it down:

∫[(e^-x) - (1)/(e^-x + (x)^2)] dx

To integrate this expression, we can apply the technique of substitution. Let's introduce a new variable, u, which is equal to e^(-x):

u = e^(-x)

To find du/dx, we differentiate both sides of the equation with respect to x:

du/dx = d/dx(e^(-x))
du/dx = -e^(-x)

We can then solve this equation for dx:

dx = -du/u

Substituting the values into our integral expression:

∫[(e^-x) - (1)/(e^-x + (x)^2)] dx
= ∫[(u) - (1)/(u + (x)^2)] (-du/u)
= -∫[1 - (1)/(u + (x)^2)] du

Now, let's focus on the integral term:

∫[1 - (1)/(u + (x)^2)] du

This can be further simplified as:

∫1 du - ∫(1)/(u + (x)^2) du

The first term, ∫1 du, integrates to u:

u - ∫(1)/(u + (x)^2) du

To find the indefinite integral of (1)/(u + (x)^2), we can use the partial fraction decomposition.

Let A be a constant, then:

(1)/(u + (x)^2) = A/(u + (x)^2) + B(u + (x)^2)
=> 1 = A(u + (x)^2) + B(u + (x)^2)

By equating the coefficients of like terms:

0 = (A + B)u + (A + B)(x)^2

Since u and (x)^2 are independent, the coefficients must be individually equal to zero:

A + B = 0
A + B = 1

Solving these two equations simultaneously, we find:

A = 1/2
B = -1/2

Therefore:

(1)/(u + (x)^2) = (1/2)/(u + (x)^2) - (1/2)(u + (x)^2)

Returning to our integral expression:

∫[1 - (1)/(u + (x)^2)] du
= u - ∫((1/2)/(u + (x)^2) - (1/2)(u + (x)^2)) du
= u - (1/2)ln|u + (x)^2| - (1/2)u + (1/4)(u + (x)^2)^2 + C

Finally, substituting back u = e^(-x):

= e^(-x) - (1/2)ln|e^(-x) + (x)^2| - (1/2)e^(-x) + (1/4)(e^(-x) + (x)^2)^2 + C

Therefore, the indefinite integral of (e^-x) - (1)/(e^-x + (x)^2) dx is:

e^(-x) - (1/2)ln|e^(-x) + (x)^2| - (1/2)e^(-x) + (1/4)(e^(-x) + (x)^2)^2 + C.