Question: PYTHON PYTHON PYTHON Compute the soft maximum 10 points When calculating the maximum of two values, the maximum function is sharp and nondifferentiable. 10 max


PYTHON PYTHON PYTHON
Compute the soft maximum 10 points When calculating the maximum of two values, the maximum function is sharp and nondifferentiable. 10 max 1 smax 8 6 4 2 0 -10.0 -7.5 -5.0 -2.5 0.0 2.5 5.0 7.5 10.0 The soft maximum smax has been defined in such a way to solve this problem. It smoothly varies the maximum by using exponentials cleverly. smax(x) = log (exp(x) + exp(y)). Compose a function smax which accepts values x and y and returns their soft maximum smax. You will need the natural logarithm and exponential function, which are both available in the math module. Your submission should include a function named smax
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
