if dy/dx=ycos x and y=3 when x=0, then y= ?
To find the value of y when x = 0, we can solve the differential equation dy/dx = y*cos(x) using separation of variables.
First, write the differential equation in the form:
dy/y = cos(x)dx
Now, integrate both sides with respect to their respective variables:
∫(dy/y) = ∫cos(x)dx
The integral of 1/y with respect to y is ln|y|, and the integral of cos(x) with respect to x is sin(x). So the equation becomes:
ln|y| = sin(x) + C, where C is the constant of integration.
To find the value of C, we can use the initial condition y = 3 when x = 0. Substituting these values into the equation, we get:
ln|3| = sin(0) + C
ln|3| = 0 + C
ln|3| = C
Now, substitute the value of C back into the equation:
ln|y| = sin(x) + ln|3|
To isolate y, we can exponentiate both sides:
|y| = e^(sin(x) + ln|3|)
Since y can be positive or negative, we remove the absolute value sign by considering two cases:
1. y = e^(sin(x) + ln|3|)
2. y = -e^(sin(x) + ln|3|)
Therefore, the two possible solutions for y when x = 0 are:
1. y = e^(sin(0) + ln|3|) = e^(ln|3|) = 3
2. y = -e^(sin(0) + ln|3|) = -e^(ln|3|) = -3
So, when x = 0, y can be either 3 or -3.