0
|
9679 Views
|
3 Replies
|
0 Total Likes
View groups...
Share
GROUPS:

# Does DSolve work with Piecewise boundary conditions?

Posted 10 years ago
 I have a simple DSolve[ ]  of a Piecewise functionDSolve[{gg''[x]==sol3},{gg[x]},x]where sol3 is a piecewise function. But , when I try to enter boundary conditions likeDSolve[{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=0.
3 Replies
Sort By:
Posted 10 years ago
 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 == 1, y == 1}, y, x] Posted 10 years ago
 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 10 years ago
 So DSolve can use Piecewise functions, e.g.:eqns = {y'[x] == Piecewise[{{-y[x], x >= 0}}, 0], y == 10}DSolve[eqns, y[x], x]What's the definition of sol3 and what error message are your getting?