Newtonian Mechanics vector solution needed to find the range of forces (P) that satisfy Fnetx = 0
40 views (last 30 days)
Show older comments
Doug Leaffer
on 12 Nov 2025 at 20:47
Commented: Doug Leaffer
on 13 Nov 2025 at 13:51
% Find vector of P values to keep block in equilibrium

% 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)
0 Comments
Accepted Answer
Torsten
on 12 Nov 2025 at 21:32
Edited: Torsten
on 12 Nov 2025 at 22:08
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'))
[res,Px,Py] = fun(P)
P0 = -30;
P = fsolve(@fun,P0,optimset('Display','none'))
[res,Px,Py] = fun(P)
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.
More Answers (2)
Doug Leaffer
on 12 Nov 2025 at 21:44
4 Comments
Torsten
on 12 Nov 2025 at 22:13
Edited: Torsten
on 12 Nov 2025 at 22:17
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.
Paul
on 13 Nov 2025 at 3:57
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))
assume(Px-Fx < 0) % motion tends down the hill
Pneg = vpa(solve(Fnetx,P))
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!