Question
Help part 4 please. The rest is provided as background info. Thanks!
Problem description and method of solution A flexible power cable has one end staked to the ground and the other end fastened H ft up a pole L ft away, as shown in the left figure above. Let y be the cable's elevation at a point located x horizontal units from the stake. Our goal will be to find y(x). We will do so by (approximately) solving the BVP satisfied by y(x). This BVP consists of a second-order differential equation and two boundary conditions. The differential equation is: d2y/dx2 = W(x)/T where the notations W and T are as follows (see also the left figure above): W(x) is the cable's weight per unit length at a point (x,y(x)); W may depend on x if. for example, part of the cable is iced; T is the (constant) tension of the cable. We assume that both W(x) and T are known; their values will be given later on. Since the ends of the cable are pinned at specific locations, the following boundary conditions must supplement the differential equation: y(0) = 0 and y(L) = H. The above equations (1) and (2) form a BVP for the cable's elevation, y = y(x). as a function of the distance, x, from the stake. The BVP (1) & (2) is sufficiently simple so that one can solve it exactly using just pen and paper. However, as you read in the Introduction, most differential equations of practical interest cannot be solved exactly. To solve them approximalely. one has to use an approach that we illustrate below for the simple BVP (1) & (2). This approach ultimately relies on Linear Algebra. The key Idea behind finding an approximate solution to BVP (1) & (2) is this. Instead of looking for the cable's elevation, y(x), for all values of x within the interval [0, L], limit your goal to finding y only at discrete values of x on that interval. To this end, let h = L/n and consider discrete points Further, denote y(x1) = yt. So now. finding an approximate solution to the BVP (1) & (2) will amount to finding only the finitely many values yi. rather than the continuous function y(x) for all values of x on [0, L]. Clearly, if h is taken to be very small, there is, practically, almost no difference between the continous variables x and y, on one hand, and the discrete sets {x0,x1,x2,... ,xn) and {y0,y1,y2,....yn}, on the other. Yet. this discretization trick will allow you to replace the BVP given by Equations (1) and (2). which you do not know how to solve, by a linear system, which you know how to solve. The steps of transition from the BVP to a linear system are described below. Step-by-step Instructions Your goal in this part is to derive an approximate formula for the second derivative. yn(x). that involves only the discrete values of y(x) at certain points. It is shown in higher-level courses like Numerical Analysis that for any sufficiently smooth function y(x). the second derivative yn(x) at a point x = a (for some arbitrary a) can be approximated using the values of y(x) at three nearby points: x = a - h. x = a, and x = a + h: hn(a) A-1y(a - h) + A0y(a) + A1y(a + h), where A-1, A0, A1 are some constant coefficients. Find A-1, A0, A1, in Equation (4). using as an example either pp. 88-89 of the textbook or/and Appendix A found after these Instructions. Write your formula (i.e. Equation (4) with your numerical values for the coefficients A-1, A0,A1) on the answer sheet and attach to it the paper w ith your derivation. Cheek your answer by comparing it with the solution of Exercise 21 of Section 1.8. Let now a be one of the points xi defined in Equation (3a) above: a = xi. For a nearby point a - h, we then have: a - h = xi - h = ih - h = (i- l)h = xi-1. According to Equation (3c). we can write y(a) = y(xi) = yi. and then similarly: y(a-h) = y(xi-1) = yi-1. Use these observations to rewrite the approximate formula you have obtained for yn(a) (that is, for yn(xi)) in terms of yi-1. yt. etc. Next, at each interior point xi of the interval [0, L] (i.e.. when 0
Explanation / Answer
clear all;
clc;
%Using finite difference method to create solutions. The discretisized
%system has the following properties:
%[y_(i-1) - 2y_i + y_(i+1)]/h^2 = W/T
%y_0 = 0 and y_N = 12.0
%Beyond i>10, W = 6 else W = 3
M = zeros(18,18); %Has the matrix of the coefficients
h = 5;
l = 5;
for(i = 1:18)
M(i,i) = -2/h^2;
if(i<18)
M(i,i+1) = 1/h^2;
end
if(i > 1)
M(i,i-1) = 1/h^2;
end
if(l<50)
d(i) = 3/3000;
else
d(i) = 6/3000;
if(i==18)
d(i) = 6/3000 - 12/h^2;
end
end
l = l+5;
end
y = M^(-1)*d';
y=[0;y;12]
plot(y)
%{