Here is Canvas object wihch demonstrate the problem.

From beam tables, we can obtain expressions for the
slope at B for each of these simply supported cases:

Alternative approaches

For our beam, w = w0 and M = MB ; therefore,

Alternative approaches