Does DSolve work with Piecewise boundary conditions?

I have a simple DSolve[ ] of a Piecewise function

DSolve[{gg''[x]==sol3},{gg[x]},x]

where sol3 is a piecewise function. But , when I try to enter boundary conditions like

DSolve[{gg’’[x]==sol3, gg[.9]=0 }, gg[x],x]

returns an error. The piecewise contains polynomial equations.

sol0 = Piecewise[{{1, 0 <= x < 1}, {-2, 1 <= x < 2}, {1, 2 <= x < 3}}]
sol00p = Plot[{sol0}, {x, -.1, 3.3}, Filling -> Axis, Exclusions -> None]
sol1 = Integrate[sol0, x]
sol10p = Plot[{sol1}, {x, -.1, 4.3}, Filling -> Axis, Exclusions -> None]
sol2=DSolve[{y''[x]=sol1},y[x],x]

Now what my interest is the DSolve of the piecewise equation from 2 degree to first degree. I need to add boundary conditions. But I get an error. For example, when trying y’[.2]=0,y[3]=0.

So DSolve can use Piecewise functions, e.g.:

eqns = {y'[x] == Piecewise[{{-y[x], x >= 0}}, 0], y[5] == 10}

DSolve[eqns, y[x], x]

What’s the definition of sol3 and what error message are your getting?

Yes.. but what I have not been able to apply bounary conditions to the DSolve[] of Piecewise function. I dont see any sample in the documentation.

You did not reply to Jason’s question about definition of sol3 - without that no one can help with your specific problem. In general though there are many examples you can try.

DSolve[{y''[x] - Piecewise[{{x, x >= 0}}, 0] y[x] == 0, y[0] == 1, y[9] == 1}, y, x]