# Solve the linear equations by considering y as a function of x, that is, y = y(x). displaystylefrac{{{left.{d}{y}right.}}}{{{left.{d}{x}right.}}}-{y}={4}{e}^{x},{y}{left({0}right)}={4}

Question
Solve the linear equations by considering y as a function of x, that is, y = y(x).
$$\displaystyle\frac{{{\left.{d}{y}\right.}}}{{{\left.{d}{x}\right.}}}-{y}={4}{e}^{x},{y}{\left({0}\right)}={4}$$

2021-02-26
Variation of parameters
First, solve the linear homogeneous equation by separating variables. Rearranging terms in the equation gives
$$\displaystyle\frac{{{\left.{d}{y}\right.}}}{{{\left.{d}{x}\right.}}}={y}\Leftrightarrow\frac{{{\left.{d}{y}\right.}}}{{y}}={\left.{d}{x}\right.}$$
Now, the variables are separated, x appears only on the right side, and y only on the left.
Integrate the left side in relation to y, and the right side in relation to x
$$\displaystyle\int\frac{{{\left.{d}{y}\right.}}}{{y}}=\int{\left.{d}{x}\right.}$$
which is$$\displaystyle \ln{{\left|{{y}}\right|}}={x}+{c}$$
By taking exponents, we obtain
$$\displaystyle{\left|{{y}}\right|}={e}^{{{x}+{c}}}={e}^{x}\cdot{e}^{c}$$
Hence,we obtain
$$\displaystyle{y}={C}{e}^{x}$$
where $$\displaystyle{C}\:=\pm{e}^{c}{\quad\text{and}\quad}{y}_{{c}}={e}^{x}$$ is the compleentary solution
Next, we need to find the particular solution $$y_p$$.
Therefore, we consider $$uy_c$$, and try to find u, a function of x, that will make this work.
Let's assume that $$uy_c$$. is a solution of the given equation. Hence, it satisfies the given equation. Substituting $$uy_c$$, and its derivative in the equation gives
$$\displaystyle{\left({u}{y}_{{c}}\right)}'-{u}{y}_{{c}}={4}{e}^{x}$$
$$\displaystyle{u}'{y}_{{c}}+{u}{y}'_{{c}}-{u}{y}_{{c}}={4}{e}^{x}$$
$$\displaystyle{u}'{y}_{{c}}+\underbrace{{{u}{\left({y}'_{{c}}-{y}_{{c}}\right)}}}_{{\text{=0 }\ }}={4}{e}^{x}$$
since y_c is a solution
Therefore
$$\displaystyle{u}'{y}_{{c}}={4}{e}^{x}\Rightarrow{u}'=\frac{{{4}{e}^{x}}}{{{y}_{{c}}}}$$
which gives
$$\displaystyle{u}=\int\frac{{{e}^{x}}}{{{y}_{{c}}}}{\left.{d}{x}\right.}$$
Now, we can find the function u :
$$\displaystyle{u}=\int\frac{{{4}{e}^{x}}}{{{e}^{x}}}{\left.{d}{x}\right.}$$
$$\displaystyle={4}\int{\left.{d}{x}\right.}$$
$$=4x+c$$
Since we need to find only one function that will male this work, we don’t need to introduce the constant of integration c. Hence,
$$u=4x$$
Recall that $$y_p = uy_c$$. Therefore,
$$\displaystyle{y}_{{p}}={4}{x}{e}^{x}$$
The general solution is
$$y=Cy_c+y_p$$
$$\displaystyle={e}^{x}{\left({C}+{4}{x}\right)}$$
Integrating Factor technique
This equation is linear with $$\displaystyle{P}{\left({x}\right)}=-{1}{\quad\text{and}\quad}{Q}{\left({x}\right)}={4}{e}^{x}$$
Hence,
$$\displaystyle{h}=\int{P}{\left.{d}{x}\right.}=-\int{\left.{d}{x}\right.}=-{x}$$
So, an integrating factor is
$$\displaystyle{e}^{h}={e}^{{-{x}}}$$
and the general solution is
$$\displaystyle{y}{\left({x}\right)}={e}^{{-{h}}}{\left({c}+\int{Q}{e}^{h}{\left.{d}{x}\right.}\right)}$$
$$\displaystyle={e}^{x}{\left({c}+\int{4}{e}^{x}\cdot{e}^{{-{x}}}{\left.{d}{x}\right.}\right)}$$
$$\displaystyle={e}^{x}{\left({c}+{4}\int{\left.{d}{x}\right.}\right)}$$
$$\displaystyle={e}^{x}{\left({c}+{4}{x}\right)}$$
Now, we can use the given initial condition. Substitute 0 for x and 4 for y to obtain the numeric value of c.
$$\displaystyle{4}={y}{\left({0}\right)}={e}^{0}{\left({c}+{4}\cdot{0}\right)}\Rightarrow{4}={c}$$
Hence, the solution is
$$\displaystyle{y}={e}^{x}{\left({c}+{4}{x}\right)}$$

### Relevant Questions

Solve the linear equations by considering y as a function of x, that is, y = y(x).
$$\displaystyle\frac{{{\left.{d}{y}\right.}}}{{{\left.{d}{x}\right.}}}+\frac{y}{{x}}=\frac{{ \cos{{x}}}}{{x}},{y}{\left(\frac{\pi}{{2}}\right)}=\frac{4}{\pi},{x}>{0}$$
Solve the linear equations by considering y as a function of x, that is, y = y(x).
$$\displaystyle\frac{{{\left.{d}{y}\right.}}}{{{\left.{d}{x}\right.}}}+{\left(\frac{1}{{x}}\right)}{y}={x}$$
Solve the linear equations by considering y as a function of x, that is, y = y(x).
\displaystyle{y}'+{y} \tan{{x}}= \sec{{x}},\)
\displaystyle{y}{\left(\pi\right)}={1}\)
Solve the linear equations by considering y as a function of x, that is
$$y=y(x)$$
$$\displaystyle{y}'-{2}{x}{y}={e}^{{{x}^{2}}}$$
Solve the linear equations by considering y as a function of x, that is, y = y(x).
$$y'+2y=4$$
Solve the linear equations by considering y as a function of x, that is,
$$y = y(x)$$
$$3xy'+y=12x$$
Solve the linear equations by considering y as a function of x, that is, $$\displaystyle{d}{i}{s}{p}{l}{a}{y}{s}{t}{y}\le{\left\lbrace{y}\right\rbrace}={\left\lbrace{y}\right\rbrace}{\left\lbrace{\left({\left\lbrace{x}\right\rbrace}\right)}\right\rbrace}.{\left\lbrace{x}\right\rbrace}{\left\lbrace{y}\right\rbrace}'+{\left\lbrace{\left({\left\lbrace{1}\right\rbrace}+{\left\lbrace{x}\right\rbrace}\right)}\right\rbrace}{\left\lbrace{y}\right\rbrace}={\left\lbrace{e}\right\rbrace}^{{{\left\lbrace-{\left\lbrace{x}\right\rbrace}\right\rbrace}}}{\sin{{\left\lbrace{\left\lbrace{2}\right\rbrace}\right\rbrace}}}{\left\lbrace{x}\right\rbrace}$$
Solve the linear equations by considering y as a function of x, that is, $$\displaystyle{d}{i}{s}{p}{l}{a}{y}{s}{t}{y}\le{\left\lbrace{y}\right\rbrace}={\left\lbrace{y}\right\rbrace}{\left\lbrace{\left({\left\lbrace{x}\right\rbrace}\right)}\right\rbrace}.{\frac{{{\left\lbrace\le{f}{t}.{\left\lbrace{d}\right\rbrace}{\left\lbrace{y}\right\rbrace}{r}{i}{g}{h}{t}.\right\rbrace}}}{{{\left\lbrace\le{f}{t}.{\left\lbrace{d}\right\rbrace}{\left\lbrace{x}\right\rbrace}{r}{i}{g}{h}{t}.\right\rbrace}}}}-{\left\lbrace{2}\right\rbrace}{\frac{{{x}}}{{{\left\lbrace{\left\lbrace{1}\right\rbrace}+{\left\lbrace{x}\right\rbrace}^{{{2}}}\right\rbrace}}}}{\left\lbrace{y}\right\rbrace}={\left\lbrace{x}\right\rbrace}^{{{2}}}$$
Solve the correct answer linear equations by considering y as a function of x, that is, $$\displaystyle{d}{i}{s}{p}{l}{a}{y}{s}{t}{y}\le{\left\lbrace{y}\right\rbrace}={\left\lbrace{y}\right\rbrace}{\left\lbrace{\left({\left\lbrace{x}\right\rbrace}\right)}\right\rbrace}.{\frac{{{\left\lbrace\le{f}{t}.{\left\lbrace{d}\right\rbrace}{\left\lbrace{y}\right\rbrace}{r}{i}{g}{h}{t}.\right\rbrace}}}{{{\left\lbrace\le{f}{t}.{\left\lbrace{d}\right\rbrace}{\left\lbrace{x}\right\rbrace}{r}{i}{g}{h}{t}.\right\rbrace}}}}+{\left\lbrace{y}\right\rbrace}={\cos{{\left\lbrace{\left\lbrace{x}\right\rbrace}\right\rbrace}}}$$
The bulk density of soil is defined as the mass of dry solidsper unit bulk volume. A high bulk density implies a compact soilwith few pores. Bulk density is an important factor in influencing root development, seedling emergence, and aeration. Let X denotethe bulk density of Pima clay loam. Studies show that X is normally distributed with $$\displaystyle\mu={1.5}$$ and $$\displaystyle\sigma={0.2}\frac{{g}}{{c}}{m}^{{3}}$$.
(b) Find the probability that arandomly selected sample of Pima clay loam will have bulk densityless than $$\displaystyle{0.9}\frac{{g}}{{c}}{m}^{{3}}$$.
(c) Would you be surprised if a randomly selected sample of this type of soil has a bulkdensity in excess of $$\displaystyle{2.0}\frac{{g}}{{c}}{m}^{{3}}$$? Explain, based on theprobability of this occurring.