Inomogeneus Heat Equation with a weird source term

32 Views Asked by At

i'm trying to solve the heat equation

$$u_{t} = k u_{xx} + Q(x)$$

with $0<x<2$, Dirichlet conditions, and $Q(x) = 1 - |x - 1| $, and some $u(x,t) = f(x)$,

I tried to expand $Q(x)$ in series of $\sin{(\frac{\pi n}{2}x)}$,but because of that 2 i'm having troubles finding the coefficients, also i tried the replace method, but i'm unable to find the integral $\int_0^x{\int_0^x{Q(x)dx}dx}$

Any advice?