Consider the first order ODE:
dΨ(x)/dx = f(x, Ψ) (1)
with x ∈ [0, 1] and with the Initial Condition Ψ(0) = A.
A trial solution is written as: Ψtrial(x) = A + xN(x, p)
where N(x, p) is the output of a ANN with one input unit for x and weights p.
Now all we need is a loss function, Ψtrial(x) is the solution of the differential equation
d Ψtrial(x) /dx ≈ f(x, Ψtrial)
d Ψtrial(x) /dx - f(x, Ψtrial) ≈ 0 (2)
we are trying to do is get (2) close to zero, then our trial solution approximates the analytical solution to a great accuracy.
So we define the loss function as:
LOSS = ∑{ (d Ψtrial(x) /dx) - f(x, Ψtrial) }2 for all x ∈ [0, 1]
Now we can use this loss to compute the gradients and do weight updation
Question 1
Ψ(0) = 0 and x ∈ [0, 2]
Question 2
Ψ(0) = 1 and x ∈ [0, 1]
Consider the 2nd order ode:
d2Ψ(x)/dx2 = f(x, Ψ, dΨ/dx)
The loss function is same as in the case of first order ode
Question 3
Ψ(0) = 1, dΨ(0)/dx = 1, x ∈ [0, 2]
Question 4
Ψ(0) = 1, Ψ(1) = sin(1)*e^(-1/5), x ∈ [0, 1]









