How do you solve the differential equation given #f''(x)=sinx#, f'(0)=1, f(0)=6?

1 Answer
Nov 1, 2016

# f(x) = -sinx+2x+6 #

Explanation:

# f''(x) = sinx #

Integrating gives us:

# f'(x) = int sinxdx #
# :. f'(x) = -cosx + C_1 #

Using the initial condition # f'(0)=1 => 1=-cos0 + C_1 #
# :. 1=-1+C_1 => C_1 = 2 #

So we have, #f'(x) = -cosx + 2 #

Integrating again gives us:
# f(x) = int(-cosx + 2) dx #
# :. f(x) = -sinx+2x+C_2 #

Using the initial condition # f(0)=6 => 6=-sin0+0 + C_2 #
# :. 6=0+C_2 => C_2=6 #

Hence, The solution to the DE is:
# :. f(x) = -sinx+2x+6 #