Question
Question: When \[y = y(x)\] then find the solution of the differential equation \[\dfrac{{dy}}{{dx}} + 2y = f(...
When y=y(x) then find the solution of the differential equation dxdy+2y=f(x) , where it is given f(x) = \left\\{ \begin{array}{l}1,\\\0,\end{array} \right.\left. \begin{array}{l}x \in [0,1]\\\otherwise\end{array} \right\\} . If y(0)=0 then find out the value of y(23) .
A. 2e3e2−1
B. e3e2−1
C. 2e1
D. 2e4e2+1
Solution
The differential equation is of the form dxdy+P(x)y=Q(x) . First we will solve this by calculating the integrating factor. After that applying the given conditions calculate the initial value in the interval.Then we will calculate the desired value using that initial value.
Complete step-by-step solution:
Here dxdy+2y=f(x) is a linear differential equation which is in the form of dxdy+P(x)y=Q(x) .
Where P(x) and Q(x) are functions of x .
Here the integrating factor I.F=e∫P(x)dx
We can find the solution of this equation using y(I.F)=∫Q(x)(I.F)dx+C .
As, In this case the equation is dxdy+2y=f(x) .
So here P(x)=2 and Q(x)=f(x)
we will calculate the integrating factor first.
⇒I.F=e∫2dx
⇒I.F=e2x
Now substituting the value of I.F in the equation y(I.F)=∫Q(x)(I.F)dx+C .
So, we get ⇒ye2x=∫f(x)e2xdx+C .
When x∈[0,1] then the value of f(x)=1 .
Then the solution becomes ⇒ye2x=∫e2xdx+C
Further integrating the right side and we get ⇒ye2x=2e2x+C .
⇒ye2x=2e2x+C - Equation 1
As, it is given that y(0)=0 i.e at x=0,y=0 .
Substituting the values of x and y we get
⇒(0)e0=2e0+C
⇒0=21+C
⇒C=−21
Substituing the value of C in equation 1.
Thus the equation becomes ye2x=2e2x−21 when x∈[0,1] .
Now we can calculate the value of y(1) from this and use it as an initial value .
At x=1 we get ⇒ye2=2e2−21 .
⇒y(1)=2e2e2−1
Now when x∈/[0,1] then the value of f(x)=0
Then we get the solution as ye2x=0+C2 ,Where C2 is the integrating factor in this case.
⇒y=C2e−2x
Using the initial value condition we have C2=2e2−1 .
So we can say that y=2e2−1e−2x for x∈[0,1] .
Now, we have to calculate the value of y(23) .
When x=23 then ⇒y(23)=2e2−1×e−2×23 .
⇒y(23)=2e2−1×e−3
⇒(23)=2e3e2−1
So the value of y(23) is 2e3e2−1 .
Thus the correct option is A.
Note: While solving this type of problem we should put the functional value for the given interval only.Because this given function has different value in different interval.The value of y is given for some given value of x ,this will work as a condition which will help us finding the value of integration constants.