Rozwiązanie
Przekształcamy do postaci residualnej (wszystkie elementy na lewą stronę):
\begin{aligned} & y^{\prime \prime}=1+3 x \\ & y^{\prime \prime}-3 x-1=0 \end{aligned}Zapisujemy sformułowanie słabe - mnożymy przez funkcję wagową i całkujemy
\begin{aligned} & \int_0^l\left(u^{\prime \prime}-3\left(x_e+a\right)-1\right) w_e \mathrm{~d} x=0 \\ & \int_0^l u^{\prime \prime} \cdot w_e \mathrm{~d} x-\int_0^l w_e \cdot\left(3\left(x_e+a\right) 1\right) \mathrm{d} x=0 \end{aligned}Dla pierwszego elementu całkujemy przez części, ale uwaga - ta część z reguły jest tak samo schematyczna
\begin{aligned} & \int_0^l u^{\prime \prime} \cdot w_e \, \mathrm{d}x - \int_0^l w_e \cdot \left(3\left(x_e+a\right) + 1\right) \, \mathrm{d}x = 0 \\ & w_e \cdot u_e^{\prime} \Big|_0^l - \int_0^l u_e^{\prime} \cdot w_e^{\prime} \, \mathrm{d}x - \int_0^l w_e \cdot \left(3\left(x_e+a\right) + 1\right) \, \mathrm{d}x = 0 \\ & \int_0^l u_e^{\prime} \cdot w_e^{\prime} \, \mathrm{d}x = w_e \cdot u_e^{\prime} \Big|_0^l - \int_0^l \left(3\left(x_e+a\right) + 1\right) \cdot w_e \, \mathrm{d}x \end{aligned}Aproksymacja
\begin{aligned} \begin{array}{ll} u_e=N_e \cdot d & u_e^{\prime}=N_e^{\prime} \cdot d \\ w_e=\beta_e{ }^{\mathrm{T}} \cdot N_e^{\mathrm{T}} & w_e^{\prime}=\beta_e^{\prime}{ }^{\mathrm{T}} \cdot N_e^{\prime}{ }^{\mathrm{T}} \end{array} \end{aligned} \begin{aligned} & \int_0^l N_e^{\prime} \cdot d \cdot \beta_e^{\mathrm{T}} \cdot N_e^{\mathrm{T}} \, \mathrm{d}x = \beta_e^{\mathrm{T}} \cdot N_e^{\mathrm{T}} \cdot \left(N_e^{\prime} \cdot d\right) \Big|_0^l - \int_0^l \left(3\left(x_e+a\right) + 1\right) \cdot \beta_e^{\mathrm{T}} \cdot N_e^{\mathrm{T}} \, \mathrm{d}x \\ & \int_0^l N_e^{\prime} \cdot N_e^{\mathrm{T}} \cdot d \, \mathrm{d}x = N_e^{\mathrm{T}} \cdot \left(N_e^{\prime} \cdot d\right) \Big|_0^l - \int_0^l \left(3\left(x_e+a\right) + 1\right) \cdot N_e^{\mathrm{T}} \, \mathrm{d}x \\ & K_e \cdot d = f_{be} - f_e \\ & K_e = \int_0^l N_e^{\prime} \cdot N_e^{\mathrm{T}} \, \mathrm{d}x \\ & f_{be} = N_e^{\mathrm{T}} \cdot \left(N_e^{\prime} \cdot d\right) \Big|_0^l \\ & f_e = \int_0^l \left(3\left(x_e+a\right) + 1\right) \cdot N_e^{\mathrm{T}} \, \mathrm{d}x \end{aligned}Obliczamy poszczególne elementy, mamy 1 ES z \( a=-\frac{1}{3}\)
\begin{aligned} & x_1 = \frac{-1}{3} \quad x_2 = \frac{2}{3} \quad l = x_2 - x_1 = 1 \\ & N_e\left(x_e\right) = \left[1 - \frac{x_e}{l} \frac{x_e}{l} x_e \cdot \left(x_e - l\right)\right] \quad N_e^{\prime}\left(x_e\right) = \frac{\mathrm{d}}{\mathrm{d} x} N_e(x) = \left[\begin{array}{lll} -1 & 1 & 2 \cdot x - 1 \end{array}\right] \\ & K_e = \int_0^l\left(N_e^{\prime}(x)^{\mathrm{T}} \cdot N_e^{\prime}(x)\right) \mathrm{d} x = \left[\begin{array}{ccc} 1 & -1 & 0 \\ -1 & 1 & 0 \\ 0 & 0 & \frac{1}{3} \end{array}\right] \\ & f_b = N_e(l)^{\mathrm{T}} \cdot u^{\prime}(l) - N_e(0)^{\mathrm{T}} \cdot u^{\prime}(0) = \left[\begin{array}{c} -u^{\prime}(0) \\ u^{\prime}(1) \\ 0 \end{array}\right] \\ & f_e = \int_0^l\left(3\left(x_e - \frac{1}{3}\right) + 1\right) \cdot N_e\left(x_e\right)^{\mathrm{T}} \mathrm{d} x_e = \left[\begin{array}{c} \frac{1}{2} \\ 1 \\ -\frac{1}{4} \end{array}\right] \end{aligned}Rozwiązujemy układ równań:
\begin{aligned} & {\left[\begin{array}{ccc} 1 & -1 & 0 \\ -1 & 1 & 0 \\ 0 & 0 & \frac{1}{3} \end{array}\right] \cdot\left[\begin{array}{c} 2 \\ 0 \\ \alpha \end{array}\right]=\left[\begin{array}{c} -u^{\prime}(0) \\ u^{\prime}(1) \\ 0 \end{array}\right]-\left[\begin{array}{c} \frac{1}{2} \\ 1 \\ -\frac{1}{4} \end{array}\right]} \\ & {\left[\begin{array}{c} 2 \\ -2 \\ \frac{\alpha}{3} \end{array}\right]=\left[\begin{array}{c} -\frac{1}{2}-u^{\prime}(0) \\ u^{\prime}(1)-1 \\ \frac{1}{4} \end{array}\right]} \\ & u^{\prime}(0)=-\frac{5}{2} \\ & u^{\prime}(1)=-1 \\ & \alpha=\frac{3}{4} \end{aligned}Podstawiamy do równania na \(y_{hp}\) pamiętając o powrocie do ukłądu globalnego
\begin{aligned} & y_{hp} = \left(1 - \frac{x_e}{l}\right) \cdot 2 + \frac{x_e}{l} \cdot 0 + x_e \cdot \left(x_e - l\right) \cdot \frac{3}{4} \quad x_e = x + \frac{1}{3} \\ & y_{hp} = \left(1 - \frac{x + \frac{1}{3}}{l}\right) \cdot 2 + \frac{x + \frac{1}{3}}{l} \cdot 0 + \left(x + \frac{1}{3}\right) \cdot \left(x + \frac{1}{3} - l\right) \cdot \frac{3}{4} \\ & y_{hp} = \frac{3 \cdot x^2}{4} - \frac{9 \cdot x}{4} + \frac{7}{6} \end{aligned}