# Solve differential equation y'+3x^2y= \sin(x)e^{-x^3}, \ y(0)=1

Question
Solve differential equation $$\displaystyle{y}'+{3}{x}^{{2}}{y}={\sin{{\left({x}\right)}}}{e}^{{-{x}^{{3}}}},\ {y}{\left({0}\right)}={1}$$

2021-02-22
$$\displaystyle{y}'+{p}{\left({x}\right)}{y}={q}{\left({x}\right)},\ {p}{\left({x}\right)}={3}{x}^{{2}},\ {q}{\left({x}\right)}={\sin{{\left({x}\right)}}}{e}^{{-{x}^{{3}}}}$$
$$\displaystyle{e}^{{\int{p}{\left.{d}{x}\right.}}}={e}^{{\int{3}{x}^{{2}}{\left.{d}{x}\right.}}}$$
$$\displaystyle{e}^{{\int{p}{\left.{d}{x}\right.}}}={e}^{{{\frac{{{3}{x}^{{3}}}}{{{3}}}}}}$$
$$\displaystyle{e}^{{\int{p}{\left.{d}{x}\right.}}}={e}^{{{x}^{{3}}}}$$
That is the I.F. is $$\displaystyle\mu{\left({x}\right)}={e}^{{{x}^{{3}}}}$$
Multiply the integrating factor on both sides of the given equation
$$\displaystyle{e}^{{{x}^{{3}}}}{y}'={\sin{{\left({x}\right)}}}{e}^{{-{x}^{{3}}}}{e}^{{{x}^{{3}}}}$$
$$\displaystyle{e}^{{{x}^{{3}}}}{y}'={\sin{{\left({x}\right)}}}{\left[\because{e}^{{-{x}^{{3}}}}{e}^{{{x}^{{3}}}}={e}^{{-{x}^{{3}}+{x}^{{3}}}}={1}\right]}$$
Integrate both sides of the above equation
$$\displaystyle\int{\frac{{{d}}}{{{\left.{d}{x}\right.}}}}{\left({e}^{{{x}^{{3}}}}{y}\right)}{\left.{d}{x}\right.}=\int{\sin{{\left({x}\right)}}}{\left.{d}{x}\right.}$$
$$\displaystyle{e}^{{{x}^{{3}}}}{y}=-{\cos{{\left({x}\right)}}}+{c}$$
$$\displaystyle{y}={\frac{{-{\cos{{\left({x}\right)}}}+{c}}}{{{e}^{{{x}^{{3}}}}}}}$$
Now compute the value of constant C by applying the given condition as follows
$$\displaystyle{y}{\left({0}\right)}={\frac{{-{\cos{{\left({0}\right)}}}+{c}}}{{{e}^{{{\left({0}\right)}^{{3}}}}}}}$$
$$\displaystyle{1}={\frac{{-{\left({1}\right)}+{c}}}{{{1}}}}\ {\left[\because{\cos{{\left({0}\right)}}}={1}\right]}$$
$$\displaystyle{1}=-{1}+{c}$$
$$\displaystyle{1}+{1}={c}$$
$$\displaystyle{2}={c}$$
Now substitute the value of C for the value of y and simplify further
$$\displaystyle{y}={\frac{{-{\cos{{\left({x}\right)}}}+{2}}}{{{e}^{{{x}^{{3}}}}}}}$$

### Relevant Questions

Solve differential equation $$y'-3x^2y= e^(x^3)$$
Solve differential equation $$(6x+1)y^2 dy/dx+3x^2+2y^3=0$$, y(0)=1

Solve differential equation $$\frac{\cos^2y}{4x+2}dy= \frac{(\cos y+\sin y)^2}{\sqrt{x^2+x+3}}dx$$

Solve differential equation $$\displaystyle{2}{x}{y}-{9}{x}^{{2}}+{\left({2}{y}+{x}^{{2}}+{1}\right)}{\frac{{{\left.{d}{y}\right.}}}{{{\left.{d}{x}\right.}}}}={0},\ {y}{\left({0}\right)}=-{3}$$
Solve differential equation $$2xy-9x^2+(2y+x^2+1)dy/dx=0$$, y(0)= -3
Solve differential equation $$y'-y=(3x^2+4x-3)e^x$$
For what values of r does the function $$\displaystyle{y}={e}^{{{r}{x}}}$$ satisfy the equation?
Solve differential equation $$\displaystyle{x}{\frac{{{\left.{d}{y}\right.}}}{{{\left.{d}{x}\right.}}}}-{2}{y}={x}^{{3}}{{\sin}^{{2}}{\left({x}\right)}}$$
Solve differential equation $$\displaystyle{\frac{{{\left.{d}{y}\right.}}}{{{\left.{d}{x}\right.}}}}-{\left({\cot{{x}}}\right)}{y}={{\sin}^{{3}}{x}}$$
Solve differential equation $$\displaystyle{\frac{{{\left.{d}{y}\right.}}}{{{\left.{d}{x}\right.}}}}-{\left({\cot{{x}}}\right)}{y}={{\sin}^{{3}}{x}}$$