If you redefine your function as y[x_] = ...
rather than y[x] = ...
, then you can do the following:
Solve[{Limit[y[x], x -> -1] == 0, Limit[D[y[x], x], x -> -1] == 1}, {C[1], C[2]}]
yICs[x_] = (y[x] /. %)
$$
\left\{\left\{c_1\to 0,c_2\to \frac{84 \sqrt[5]{\frac{2}{5}} \Gamma \left(\frac{2}{5}\right)}{25 \lambda ^{2/5} \Gamma \left(\frac{17}{5}\right)}\right\}\right\}
$$
$$
\frac{84 \left(\frac{2}{5}\right)^{3/5} \sqrt{x+1} \Gamma \left(\frac{2}{5}\right) \Gamma \left(\frac{7}{5}\right) J_{\frac{2}{5}}\left(\frac{4}{5} (x+1)^{5/4} \sqrt{\lambda }\right)}{25 \sqrt[5]{\lambda } \Gamma \left(\frac{17}{5}\right)}
$$
Note that you have to use the Limit
commands in the Solve
, since the Bessel function of negative order diverge as their arguments go to zero; since the first term of your general solution contains $\sqrt{1+x} J_{-2/5}((1+x)^{5/4})$, it's indeterminate at $x = -1$.
DSolve[{y'[x] + y[x] == a Sin[x], y[0] == 0}, y[x], x]
). Are you required to solve it by first getting the general solution? $\endgroup$