Since this is clearly homework, and we don't do homework for people on this site, think about it!
First, you almost always want to plot EVERYTHING. This is my most important rule: Plot everything. Look at what you see. Think about what you just saw.
There are two cases I can see off the top of my head. If the problem is a black box, where all you know is the problem MAY be non-differentiable, then all you can do is to start the optimizer at multiple points, and see what happens. You will then cluster the results based loosely on any tolerances provided, since no two solves need return the exact same solution.
If the problem is not a black box, so you can see the equations, the problem becomes subtly different, and possibly harder or sometimes easier. Now you can look for the points of non-differentiability, information which MAY help you. For example, consider the function
fun= @(x) (x+2).^3/10 - 2*x.^2 + 10*abs(x-3);
Pretty simple. at least visually. If we need to minimize this function, then most optimizers will converge to one of two solutions, at x==-inf, or x==3. Remember that not ALL optimizers behave the same. They can have subtly different basins of attraction, and basins need not be contiguous sets.
But generally, a simple optimizer will converge to the solution at x==3 whenever the start point is greater than roughly 2.5, and diverge to -inf for start points less than that.
Could you have inferred those basins analytically, KNOWING the function? Again, this is difficult. Consider the optimizer fminsearch. If we start the optimizer near x=2.5, depending on the size of the initial polytope, then it might diverge to -inf or converge to 3, and it will depend on EXACTLY where the points for that initial simplex lie.
Or, consider a newton-like method that uses the gradient at a point to decide where to look next. If we start at x==5, then it will depend on the length of the first step it takes. And therefore all of this comes down to the design of the line search scheme used in the optimizer.
So depending on the optimizer, the basins of attraction can be very different. Again, you may find it simplest to just start the optimizer out at various points and then cluster the results.
And no, I won't write code for any of this.