Hello, I am struggling with the very basics of usage of ApproxFun package. I would like to define a nonlinear differential operator (the ultimate motivation is actually to define and solve a nonlinear ODE). The operator \mathcal{N} acts on u(t) as \mathcal{N}u = \ddot u + (1-u^2)\dot u + u.
How do I do it using ApproxFun? This is what I tried so far:
using ApproxFun, LinearAlgebra
t₀ = 0.0; t₁ = 1.0; t = Interval(t₀,t₁);
D = Derivative(t); D2 = Derivative(t,2);
N = D2 + (1-?)*D + I;
What do I put instead of the ? symbol on the last line? Or shall I do it in a completely different way? I feel my confusion might come from the interpretation of the * symbol as both the multiplication and application of an operator.
The basic issue is that it is nonlinear, so you don’t define an operator and use \. Instead you define a function N(u) and run a Newton iteration (which internally performs a sequence of linearized solves).