Setting up the network using Autograd; The trial solution

The cost function must then iterate through the given arrays containing values for \( x \) and \( t \), defines a point \( (x,t) \) the deep neural network and the trial solution is evaluated at, and then finds the Jacobian of the trial solution.

A possible trial solution for this PDE is

$$ g_t(x,t) = h_1(x,t) + x(1-x)tN(x,t,P) $$

with \( h_1(x,t) \) being a function ensuring that \( g_t(x,t) \) satisfies our given conditions, and \( N(x,t,P) \) being the output from the deep neural network using weights and biases for each layer from \( P \).

To fulfill the conditions, \( h_1(x,t) \) could be:

$$ h_1(x,t) = (1-t)\Big(u(x) - \big((1-x)u(0) + x u(1)\big)\Big) = (1-t)u(x) = (1-t)\sin(\pi x) $$ since \( (0) = u(1) = 0 \) and \( u(x) = \sin(\pi x) \).