Find a maximum of two variable particular function

1 view (last 30 days)
Dear friends,
I just had a problem finding the maximum of this equation.
fs = @ (x, t) wn ^ 2 * m * (1-cos (pi * x) / (2 * L)) * Impulse / (m * 3. * wn). * exp (-. 05. * wn. * t). * sin (wn. * t);
I took the derivatives as follows but finding the answer is not easy
fsx = diff (fs, x)
fst = diff (fs, t)

Accepted Answer

Walter Roberson
Walter Roberson on 27 Oct 2019
syms wn m x t L Impulse
fs = @ (x, t) wn ^ 2 * m * (1-cos (pi * x) / (2 * L)) * Impulse / (m * 3. * wn).* exp (-.05.* wn.* t).* sin (wn.* t);
fsx = diff(fs,x)
fst = diff(fs,t)
sol = solve([fsx,fst], [x t],'returnconditions',true)
Really you get a family of solutions because of the periodicity of the trig functions.
The returned values will include all of the maxima and minima and saddle points, so you will need to do further tests to determine which each of them is. You probably cannot complete those tests without knowing at least the signs of some of those variables such as m.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!