Assignment-
Boundary Value Problem 1: Consider the following 2nd Order ODE:
d2y/dx2 + x(dy/dx) + y = 2x for 0 ≤ x 1, with y(0) = 1 and y(1) = 1
(a) Using the central difference formulas for approximating the derivatives, discretize the ODE (rewrite the equation in a form suitable for solution with the finite difference method).
(b) What is the expression for the diagonal terms in the resulting matrix of coefficients of the tridiagonal system of linear equations that has to be solved?
Boundary Value Problem 2:
The radial distribution of temperature in a current-carrying bare wire is described by:
(k/r)(d/dr)(r(dT/dr)) = -((I2ρe)/((1/4) πD2)2)
Where T is the temperature in K, r is the radial coordinate in m, k = 72 W/m/K is the thermal conductivity, I = 0.5 A is the current, ρe = 32 x 10-8 Ω-m, is the electrical resistivity, and D = 1 x 10-4 m is the wire diameter. Use MATLAB's built-in function bvp4c to solve the equation for T(r). Solve twice for the following boundary conditions:
(a) At r = 10-6m, dT/dr = 0 and at r = D/2, T = 300 K.
(b) At r = 10-6m, dT/dr = 0 and at r = D/2, dT/dr = -(h/k)(T(r=D/2)-T∞), where h = 100 W/m2 is the convection heat transfer coefficient and T∞ = 300 K is the ambient temperature.
Important note: r = 0 is a singular point and must therefore be replaced with a small, non-zero value. As initial guesses, use T = 500 K and dT/dr = 0, and use 50 subintervals.