Newtonian Mechanics vector solution needed to find the range of forces (P) that satisfy Fnetx = 0

% Find vector of P values to keep block in equilibrium
ramp.jpg
% Variables Given
m = 100; % mass, kg
angle_ramp = 15; % degrees
angle_bar = 20; % degrees
g = 9.81; % gravity (m/s^2)
coeff = 0.3; % coefficient of static friction
% Calculations
P = [-600:0.1:600]; % vector of range for P (Newtons)
W = m*g;
Px = P*cosd(angle_bar); Py = sind(angle_bar);
N = W*cosd(angle_ramp)-Py;
Fx = W*sind(angle_ramp); Fs = coeff*N;
% Find P values for Fnet(x) = 0
if P > 0 % pulling force
Fnetx = Px - Fx - Fs;
else % pushing force or zero force applied
Fnetx = Px - Fx + Fs;
end
find(Fnetx==0)
ans = 1×0 empty double row vector

 採用された回答

Torsten
Torsten 2025 年 11 月 12 日
編集済み: Torsten 2025 年 11 月 12 日
Your search will never find a value for P for which Fnetx is exactly 0.
Better use "fsolve" to solve for the corresponding root of Fnetx(P) = 0.
P0 = 600;
P = fsolve(@fun,P0,optimset('Display','none'))
P = 516.3332
[res,Px,Py] = fun(P)
res = -7.9902e-08
Px = 485.1945
Py = 176.5964
P0 = -30;
P = fsolve(@fun,P0,optimset('Display','none'))
P = -36.2812
[res,Px,Py] = fun(P)
res = 3.4890e-10
Px = -34.0932
Py = -12.4089
function [Fnetx,Px,Py] = fun(P)
% Variables Given
m = 100; % mass, kg
angle_ramp = 15; % degrees
angle_bar = 20; % degrees
g = 9.81; % gravity (m/s^2)
coeff = 0.3; % coefficient of static friction
% Calculations
W = m*g;
Px = P*cosd(angle_bar); Py = P*sind(angle_bar);
N = W*cosd(angle_ramp)-Py;
Fx = W*sind(angle_ramp); Fs = coeff*N;
% Find P values for Fnet(x) = 0
if P > 0 % pulling force
Fnetx = Px - Fx - Fs;
else % pushing force or zero force applied
Fnetx = Px - Fx + Fs;
end
end
Or use
[~,idx] = min(Fnetx.^2);
P(idx)
at the end of your code to get an approximate value for P.

その他の回答 (2 件)

Doug Leaffer
Doug Leaffer 2025 年 11 月 12 日
Thank you @Torsten
I found another MATLAB code solution which is accurate as I checked it in Excel using Goal Seek
=> Block remains in equilibrium for -36.28 ≤ P ≤ 516.33 N

4 件のコメント

Torsten
Torsten 2025 年 11 月 12 日
編集済み: Torsten 2025 年 11 月 12 日
In my opinion, there is a unique value for the magnitude of the force that keeps the block in equilibrium. Why do you think that there is range for P ?
Doug Leaffer
Doug Leaffer 2025 年 11 月 12 日
There is a range for P that satisfies the equilibrium conditions. Assume, for example, that P = 0. The solution becomes simpler, and the friction force (up the ramp) is clearly > than the gravitation force (down the ramp) = equilibrium. This remains true for a range of positive P values (implies pulling), up to Pmax = 516.33 N (recall that static friction is a force that 'grows" to it's max), beyond which the block moves up the ramp. And for P <0 values (implies pushing) down to -35.28 N, at which point friction (pointing up the ramp) is overcome by the pushing force and the block moves down the ramp. The block cannot be in equilibrium at P = +572.6 N, it would move up the ramp if P > 516.33 N
Torsten
Torsten 2025 年 11 月 12 日
編集済み: Torsten 2025 年 11 月 12 日
The block cannot be in equilibrium at P = +572.6 N, it would move up the ramp if P > 516.33 N
Yes, you made a mistake when specifying Py in your code. I corrected that (see below).
Still I cannot follow your argumentation concerning the range for P, but I'm not a physicist.
Doug Leaffer
Doug Leaffer 2025 年 11 月 12 日
Thanks for correcting the Py mistake ! Appreciate that @Torsten

サインインしてコメントする。

Here is an algebraic solution; I suspect one could do the whole thing symbolically and then sub the numbers at the end.
Note that my expression for Fnetx is different because, to my understanding, the relative motion resisted by the static friction depends on the sign of Px - Fx, not Px (nor P!) alone. That is, we need Px > Fx for the block to want to slide up the hill and Fx > Px for the block to want to slide down the hill. Comes up with the same solutions for the parameters for this problem.
Disclaimer: I haven't done statics in more time than I care to admit.
syms P real
m = 100; % mass, kg
angle_ramp = 15; % degrees
angle_bar = 20; % degrees
g = 9.81; % gravity (m/s^2)
coeff = 0.3; % coefficient of static friction
W = m*g;
Px = P*cosd(angle_bar); Py = P*sind(angle_bar);
N = W*cosd(angle_ramp) - Py;
Fx = W*sind(angle_ramp);
Fs = coeff*N;
Fnetx = Px - Fx - Fs*sign(Px-Fx);
figure
fplot(Fnetx,[-100,600]),grid
assume(Px-Fx > 0) % motion tends up the hill
Ppos = vpa(solve(Fnetx,P))
Ppos = 
516.33324748670646195665428956607
assume(Px-Fx < 0) % motion tends down the hill
Pneg = vpa(solve(Fnetx,P))
Pneg = 

カテゴリ

ヘルプ センター および File ExchangeMathematics についてさらに検索

製品

リリース

R2025b

質問済み:

2025 年 11 月 12 日

コメント済み:

2025 年 11 月 13 日

Community Treasure Hunt

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

Start Hunting!

Translated by