Message Boards Message Boards

3 Replies
0 Total Likes
View groups...
Share this post:

Does DSolve work with Piecewise boundary conditions?

I have a simple DSolve[ ]  of a Piecewise function
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]

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.
POSTED BY: Jose Calderon
3 Replies
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?
POSTED BY: Jason Grigsby
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.
POSTED BY: Jose Calderon
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]

POSTED BY: Sam Carrettie
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract