How can you calculate both forces at the same time in cantilever beam?

Please use 3x` encapsulation (markdown syntax) to encapsulate your code. Also make sure that the code is properly indented, as the following example:

```python
def test(x):
    return x
```