Clear Filters
Clear Filters

Using bisection method to solve vibrations problem

3 views (last 30 days)
For my numerical methods class, we use MATLAB to solve all problems. I already have the bisection method code:
if true
function [x] = bisection(fun,a,b,maxtol,maxitr)
if nargin<5, maxitr=50; end
if nargin<4, maxtol=0.001; end
x = a;
k = 0;
fprintf('\nIter#\ta\t\t\tf(a)\t\t\tf(b)\t\tf(x)\n');
while k < maxitr && (abs(fun(x))) >= maxtol
k = k+1;
x = (a+b)/2;
if(fun(a) * fun(x)) < 0
b = x;
else
a = x;
end
fprintf('\n%i\t\t%f\t%f\t%f\t%f\t%f\t%f\n', k, a, fun(a), fun(b), fun(x))
end
For my problem, I have the solution as:
x(t) = x0*(exp(-ct/2m))*cos(sqrt((k/m) - ((c/2*m)^2)*t))
where t at t=0, x = x0.
I also have:
frequency: w = sqrt(k/m - (c/2*m)^2)
period: T = 2*pi / sqrt((k/m)-(c/2*m)^2)
critically damped: k/m - (c/2*m)^2 = 0
overdamped: k/m - (c/2*m)^2 < 0
I've been given values for k, c, and m.
My goal is to use the bisection method to find the time instants when the displacement is 5% of the initial displacement. I need the first three solutions.
I have no idea how to solve this, or even begin.

Answers (0)

Categories

Find more on Acoustics, Noise and Vibration in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!