👉 Try now NerdPal! Our new math app on iOS and Android

Integrate the function $\frac{x^2+x-2}{x^2+5x+6}$

Step-by-step Solution

Go!
Math mode
Text mode
Go!
1
2
3
4
5
6
7
8
9
0
a
b
c
d
f
g
m
n
u
v
w
x
y
z
.
(◻)
+
-
×
◻/◻
/
÷
2

e
π
ln
log
log
lim
d/dx
Dx
|◻|
θ
=
>
<
>=
<=
sin
cos
tan
cot
sec
csc

asin
acos
atan
acot
asec
acsc

sinh
cosh
tanh
coth
sech
csch

asinh
acosh
atanh
acoth
asech
acsch

Final Answer

$-4\ln\left(x+3\right)+x+C_1$
Got another answer? Verify it here!

Step-by-step Solution

Specify the solving method

1

Find the integral

$\int\frac{x^2+x-2}{x^2+5x+6}dx$
2

Rewrite the expression $\frac{x^2+x-2}{x^2+5x+6}$ inside the integral in factored form

$\int\frac{x^2+x-2}{\left(x+2\right)\left(x+3\right)}dx$
3

Factor the trinomial $x^2+x-2$ finding two numbers that multiply to form $-2$ and added form $1$

$\begin{matrix}\left(-1\right)\left(2\right)=-2\\ \left(-1\right)+\left(2\right)=1\end{matrix}$
4

Thus

$\int\frac{\left(x-1\right)\left(x+2\right)}{\left(x+2\right)\left(x+3\right)}dx$
5

Simplifying

$\int\frac{x-1}{x+3}dx$
6

Expand the fraction $\frac{x-1}{x+3}$ into $2$ simpler fractions with common denominator $x+3$

$\int\left(\frac{x}{x+3}+\frac{-1}{x+3}\right)dx$
7

Expand the integral $\int\left(\frac{x}{x+3}+\frac{-1}{x+3}\right)dx$ into $2$ integrals using the sum rule for integrals, to then solve each integral separately

$\int\frac{x}{x+3}dx+\int\frac{-1}{x+3}dx$
8

We can solve the integral $\int\frac{x}{x+3}dx$ by applying integration by substitution method (also called U-Substitution). First, we must identify a section within the integral with a new variable (let's call it $u$), which when substituted makes the integral easier. We see that $x+3$ it's a good candidate for substitution. Let's define a variable $u$ and assign it to the choosen part

$u=x+3$
9

Now, in order to rewrite $dx$ in terms of $du$, we need to find the derivative of $u$. We need to calculate $du$, we can do that by deriving the equation above

$du=dx$
10

Rewriting $x$ in terms of $u$

$x=u-3$
11

Substituting $u$, $dx$ and $x$ in the integral and simplify

$\int\frac{u-3}{u}du+\int\frac{-1}{x+3}dx$
12

The integral $\int\frac{u-3}{u}du$ results in: $x+3-3\ln\left(x+3\right)$

$x+3-3\ln\left(x+3\right)$
13

Gather the results of all integrals

$-3\ln\left(x+3\right)+3+x+\int\frac{-1}{x+3}dx$
14

We can solve the integral $\int\frac{-1}{x+3}dx$ by applying integration by substitution method (also called U-Substitution). First, we must identify a section within the integral with a new variable (let's call it $u$), which when substituted makes the integral easier. We see that $x+3$ it's a good candidate for substitution. Let's define a variable $u$ and assign it to the choosen part

$u=x+3$
15

Now, in order to rewrite $dx$ in terms of $du$, we need to find the derivative of $u$. We need to calculate $du$, we can do that by deriving the equation above

$du=dx$
16

Substituting $u$ and $dx$ in the integral and simplify

$-3\ln\left(x+3\right)+3+x+\int\frac{-1}{u}du$
17

The integral $\int\frac{-1}{u}du$ results in: $-\ln\left(x+3\right)$

$-\ln\left(x+3\right)$
18

Gather the results of all integrals

$-3\ln\left(x+3\right)+3+x-\ln\left(x+3\right)$
19

Combining like terms $-3\ln\left(x+3\right)$ and $-\ln\left(x+3\right)$

$-4\ln\left(x+3\right)+3+x$
20

As the integral that we are solving is an indefinite integral, when we finish integrating we must add the constant of integration $C$

$-4\ln\left(x+3\right)+3+x+C_0$
21

We can combine and rename $3$ and $C_0$ as other constant of integration

$-4\ln\left(x+3\right)+x+C_1$

Final Answer

$-4\ln\left(x+3\right)+x+C_1$

Explore different ways to solve this problem

Solving a math problem using different methods is important because it enhances understanding, encourages critical thinking, allows for multiple solutions, and develops problem-solving strategies. Read more

Solve integral of ((x^2+x)/(x^2+5x))dx using basic integralsSolve integral of ((x^2+x)/(x^2+5x))dx using u-substitutionSolve integral of ((x^2+x)/(x^2+5x))dx using integration by partsSolve integral of ((x^2+x)/(x^2+5x))dx using trigonometric substitution

Give us your feedback!

Function Plot

Plotting: $-4\ln\left(x+3\right)+x+C_1$

SnapXam A2
Answer Assistant

beta
Got a different answer? Verify it!

Go!
1
2
3
4
5
6
7
8
9
0
a
b
c
d
f
g
m
n
u
v
w
x
y
z
.
(◻)
+
-
×
◻/◻
/
÷
2

e
π
ln
log
log
lim
d/dx
Dx
|◻|
θ
=
>
<
>=
<=
sin
cos
tan
cot
sec
csc

asin
acos
atan
acot
asec
acsc

sinh
cosh
tanh
coth
sech
csch

asinh
acosh
atanh
acoth
asech
acsch

How to improve your answer:

Your Math & Physics Tutor. Powered by AI

Available 24/7, 365.

Unlimited step-by-step math solutions. No ads.

Includes multiple solving methods.

Support for more than 100 math topics.

Premium access on our iOS and Android apps as well.

20% discount on online tutoring.

Choose your subscription plan:
Have a promo code?
Pay $39.97 USD securely with your payment method.
Please hold while your payment is being processed.
Create an Account