Here's the problem:
For one of my classes, we're supposed to use Mathematica to solve the equation y''=y-b*y' for a variety of b values and specified boundary conditions and plot the outputs. There I have no problem and Mathematica runs well. However, the next problem is to replace the -b*y' with -b*sign(y') and repeat part one. When I do this, Mathematica runs for a long time, then gives up and outputs the input. I tried removing the boundary conditions and just doing the general solution, but it can't figure that out, either. It isn't giving any errors, it just doesn't work. Any ideas? This is what my input looks like:
In[5]:= beta = 0.2;
Solution = DSolve[{y''[x] == - y[x] - beta * Sign[y'[x]], y[0] == 1, y'[0] == -1}, y[x], x]
Out[6]= DSolve[{y''[x] == -0.2 Sign[y'[x]] - y[x], y[0] == 1, y'[0] == -1}, y[x], x]
Answer
Try to solve the problem numerically
beta = 0.2;
As you have observed, the problem is not solved in symbolic form:
Solution =
DSolve[{y''[x] == -y[x] - beta*Sign[y'[x]], y[0] == 1, y'[0] == -1}, y[x],
x]
(* -> DSolve[{(y^\[Prime]\[Prime])[x] == -0.2 Sign[Derivative[1][y][x]] - y[x],
y[0] == 1, Derivative[1][y][0] == -1}, y[x], x] *)
Now using NDSolve for x in the interval 0 to 10 (say):
yy[x_] = y[x] /. NDSolve[{y''[x] == -y[x] - beta*Sign[y'[x]], y[0] == 1, y'[0] == -1}, y[x], {x, 0, 10}] [[1]]
(* InterpolatingFunction[{{0.`,10.`}},"<>"][x] *)
This works well, and the plot looks good
Plot[yy[x], {x, 0, 10}]
(* 140925_plot_yy.jpg *)
The following part has been edited because of an error (26.09.14 00:52):
The solution lookes like a damped oscillation. We can try to derive the behaviour of the solution for large x as follows:
Multiplying the differential equation by y' and observing y' Sign(y') = Abs(y') we have
$y' y'' = - y y' - beta |y'|$
which can be written as
$\frac{1}{2} \frac{d}{dx} (y'^2 + y^2) = - beta |y'|$
Up to this point the reasoning is ok but in the following there is a flaw. Now, assuming $beta > 0$ the right hand side is always $<0$ which means that the expression $\frac{1}{2} (y'^2 + y^2)$ is only decreasing with x, which means that it will go to 0 which means in turn that $y\to 0$
Sorry, I shall clarify the asymptotic behaviour later.
Hope this helps, Regards Wolfgang
Comments
Post a Comment