If $f (x) +f'(x) = x^3+5x^2+x+2$ then find $f(x)$.
$f'(x)$ is the first derivative of $f (x)$.
I have no idea about this question, please help me.
If $f (x) +f'(x) = x^3+5x^2+x+2$ then find $f(x)$.
$f'(x)$ is the first derivative of $f (x)$.
I have no idea about this question, please help me.
If you're looking for all solutions, you can solve this as a linear differential equation of the first order which will be the sum of the homogeneous solution (an exponential function) and a particular solution, which will be a polynomial of degree 3.
$f(x) = C e^{-x} + x^3 + 2 x^2 - 3 x + 5$
If you're doing this outside of the context of differential equations and you're looking for a (single) solution, it makes sense to look for a polynomial of degree 3 since the derivative of a polynomial is again a polynomial, but of one degree less.
So say $f(x) = ax^3+bx^2+cx+d$, find $f'(x)$ and plug it in, solve for $a,b,c,d$:
$$ \left( ax^3+bx^2+cx+d \right) + \left( ax^3+bx^2+cx+d \right)' = x^3+5x^2+x+2 \iff \ldots$$
$f(x) = x^3 + 2 x^2 - 3 x + 5$
If $f(x)$ has degree $n $ then $ f'(x) $ has $n-1$ . Here highest degree is $3$ thus $ f (x) $ is a polynomial of degree $3$. Thus let $f (x)=ax^3+bx^2+cx+d $ thus we have $f (x)+f'(x)=ax^3+bx^2+cx+d+3ax^2+2bx+c $ Now comparing we have $ a=1,3a+b=5,c+2b=1,d+c=2$ thus $ f(x)=x^3+2x^2-3x+5.$
The hard way:
You can use the fact that $$(e^xf(x))'=e^x(f(x)+f'(x)).$$
Then
$$(e^xf(x))'=e^x(x^3+5x^2+x+2).$$
Now, by integration (which can be performed by parts, integrating $e^x$),
$$e^xf(x)=\int e^x(x^3+5x^2+x+2)dx=e^x(x^3+2x^2-3x+5)+C$$ and
$$f(x)=x^3+2x^2-3x+5+Ce^{-x}.$$
[I doubt this is the method you are expected to use...]
Empirically:
Let us assume that the solution is close to $f_0(x)=x^3$ and let us plug in the given equation.
$$f_0(x)+f'_0(x)=x^3+3x^2\ne x^3+5x^2+x+2.$$ But we are off by the polynomial $$2x^2+x+2$$ which is of a lower degree.
So let us try $f_1(x)=x^3+2x^2$, giving
$$f_1(x)+f'_1(x)=x^3+5x^3+4x\ne x^3+5x^2+x+2.$$
This time, we are only off by $-3x+2$, one degree less.
$$f_2(x)=x^3+2x^2-3x$$ then $$f_2(x)+f'_2(x)=x^3+5x^2+x-3.$$
And finally
$$f_3(x)=x^3+2x^2-3x+5$$ has converged to a solution.
Epilogue:
Let us assume that there exists another solution $f$ which is different from $f_3$.
From
$$f(x)+f'(x)=f_3(x)+f'_3(x)= x^3+5x^2+x+2,$$ we can draw that
$$f(x)-f_3(x)+f'(x)-f'_3(x)=0$$ which is of the form
$$g(x)+g'(x)=0.$$
It is not difficult to show that no polynomial is the opposite of its derivative. Actually, there is a single differentiable function having this property: the negative exponential
$$g(x)=e^{-x}$$ (or multiples).
Grouping these results,
$$f(x)=x^3+5x^2+x+2+Ce^{-x}.$$
I would guess that $f(x)$ is a polynomial. It then follows that $\text{deg}f'(x)=\text{deg}f(x)-1$. We can then deduce that $\text{deg}f(x) =3$ and $\text{deg} f'(x)=2$.
Write $f(x)=ax^3+bx^2+cx+d$ and $f'(x)=3ax^2+2bx+c$ then substitute in and solve.
Assume a polynomial function of the form $f(x)=ax^3+bx^2+cx+d$ then $f^{'}(x)=3ax^2+2bx+c$ Thus the equations becomes $ax^3+(3a+b)x^2+(c+2b)x+d+c=x^3+5x^2+x+2$. Now you can compare the coefficients to get the solution.
We can use an integrating factor, $u(x)$: $$ \begin{align} v(x)(f(x)+f'(x)) &=\frac{\mathrm{d}}{\mathrm{d}x}(u(x)\,f(x))\\ &=u'(x)\,f(x)+u(x)\,f'(x)\tag{1} \end{align} $$ If we set $\frac{u'(x)}{u(x)}=1$, we see that $(1)$ is satisfied. Thus, we get that we can use $u(x)=v(x)=e^x$. That is, $$ \begin{align} \frac{\mathrm{d}}{\mathrm{d}x}(e^x\,f(x)) &=e^x(f(x)+f'(x))\\ &=e^x\left(x^3+5x^2+x+2\right)\tag{2} \end{align} $$ Integrating $(2)$, we get $$ e^x\,f(x)=e^x\left(x^3+2x^2-3x+5\right)+C\tag{3} $$ and therefore, $$ f(x)=x^3+2x^2-3x+5+Ce^{-x}\tag{4} $$
We work with the general form of the equation $f(x)$, assuming it to be a cubic equation: $$f(x)=ax^3+bx^2+cx+d$$
We differentiate this to see that $$f'(x)=3ax^2+2bx+c$$
Now we can say that \begin{align}f(x)+f'(x)&=(ax^3+bx^2+cx+d)+(3ax^2+2bx+c)\\ x^3+5x^2+x+2&=ax^3+(b+3a)x^2+(c+2b)x+(c+d)\end{align}
We can compare coefficients to solve this equation:
\begin{align}a&=1,\tag{$x^3$ term}\\\\ 5&=b+3a\tag{$x^2$ term}\\ 5&=b+3\times 1\\ &\Downarrow\\ b&=2,\\\\ 1&=c+2b\tag{$x$ term}\\ 1&=c+2\times 2\\ &\Downarrow\\ c&=-3,\\\\ 2&=c+d\tag{constant term}\\ 2&=(-3)+d\\ &\Downarrow\\ d&=5\end{align}
Therefore, we have that $$f(x)=x^3+2x^2-3x+5$$
We can check that this is a solution to the equation, by first computing $f'(x)$:
$$f'(x)=3x^2+4x-3$$
and then checking the value of $f(x)+f'(x)$:
\begin{align}f(x)+f'(x)&=(x^3+2x^2-3x+5)+(3x^2+4x-3)\\ &=x^3+(2+3)x^2+(-3+4)x+(5+(-3))\\ &=x^3+5x^2+x+2\end{align}