How do I solve this

diff(((3^2*sind(x)*cosd(x))/9.8)+((3*cosd(x))/9.8)*sqrt((3^2*sind(x)*sind(x))+18.7768))
what x when this function maximum

回答(1 个)

Jan
Jan 2017-4-9
编辑:Jan 2017-4-9
The function is periodic, then you get an infinite number of maxima.
Calculating in radians is easier than with degrees. Start with the derivative:
diff(9/9.8 * sin(x) * cos(x) + 3/9.8 * cos(x) * sqrt(9 * sin(x)^2 + 18.7768)) ==
diff( 3 * sin(x) * cos(x) + cos(x) * sqrt(9 * sin(x)^2 + 18.7768)) * 3/9.8 ==
(-3 * sin(x)^2 - sin(x) * sqrt(9 * sin(x)^2 + 18.7768) + ...
3 * cos(x)^2 + 9 * sin(x) * cos(x)^2 / sqrt(9 * sin(x)^2 + 18.7768)) * 3/9.8
For finding the maximum of this equation we can remove the constant factor 3/9.8 and differentiate again:
c = sqrt(9 * sin(x)^2 + 18.7768);
y = 9 * cos(x)^3 / c - 81 * sin(x)^2 * cos(x)^3 / c^3 - ...
c * cos(x) - 27*sin(x)^2 * cos(x) / c - 12 * sin(x) * cos(x);
and now Matlab can be used by fzero(y, 3) to find the minimum: d = -0.240560539141856
or in general with all natural number n:
x_min = -0.240560539141856 + 2 * pi * n,
-2.90103211444794 + 2 * pi * n
Multiply this with 180/pi to get your degrees again.

类别

在 帮助中心 和 File Exchange 中查找有关 Interactions, Camera Views, and Lighting 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by