# Crank-Nicolson method for solving nonlinear parabolic PDEs

Is the Crank-Nicolson method appropriate for solving a system of nonlinear parabolic PDEs like $\partial u/\partial t - a\Delta u + u^4 = 0$ ?

I tried to apply this method for solving such system but the solution was oscillating (maybe because of a small value of the coefficient of the time derivative) and the implicit Euler method calculates a correct solution.

This phenomenon is often called "ringing" and plagues methods that are not $L$-stable. This can be seen in this motivating example from Hairer & Wanner (1999) "Stiff differential equations solved by Radau methods". Consider the equation

$$\dot y = -50 (y - \cos t)$$

and apply explicit Euler with time step near the stability limit, implicit midpoint (or equivalently for this problem, trapezoid rule, aka. Crank-Nicolson), and implicit Euler. The result, shown below, illustrates that the $A$-stable (but not $L$-stable) implicit midpoint method produces a poor-quality solution.

To avoid this problem when solving stiff systems, you should use an $L$-stable method such as BDF-2, a suitable DIRK, or a Radau method. See Hairer and Wanner's second volume for extensive discussion of this topic.

• Do you mean methods for solving ODEs? How these methods can be applied for solving PDEs? Is it required to use the method of lines? – jokersobak Nov 3 '14 at 8:38
• You can discretize in space or time first, or both simultaneously (as in space-time). I think it's typically more useful in terms of software interfaces to use method of lines (discretize in space first), though space-time discretizations have their place when you want local adaptivity simultaneously in space and time. – Jed Brown Nov 4 '14 at 0:35

Theoretically, if the implicit Euler method works for this equation, Crank--Nicolson scheme should also work. let $\tau$ be the step in time and if we only consider the temporal discretization, the linearized Crank--Nicolson scheme is given by $$\frac{u^n-u^{n-1}}{\tau} - \frac{a}{2} ( \Delta u^n+ \Delta u^{n-1} ) = -(\frac{3 u^{n-1}-u^{n-2}}{2})^4 .$$

The above scheme is okay under the condition that the regularity of the equation is good. Moreover, spatial approximation does not affect the stability of the scheme and you can use both finite difference and finite element methods to solve it.

• Putting aside the lack of $L$-stability, extrapolation of the reaction term as you propose often results in instability. Even for split implicit methods, convergence is often lost for moderately large time steps, see, e.g., Ropp, Shadid, and Ober (2004). – Jed Brown Oct 22 '14 at 16:50
• @mathsgao Why did you write the term $-\left(\frac{3u^{n-1}-u^{n-2}}{2}\right)^4$ ? What does it mean? – jokersobak Oct 23 '14 at 1:24
• @mathsgao Why it is not the following scheme? $\frac{u^n - u^{n-1}}{\tau} - \frac{a}{2}(\Delta u^n + \Delta u^{n-1}) + \frac{1}{2}((u^n)^4 + (u^{n-1})^4)$ – jokersobak Oct 23 '14 at 4:32
• Sure, you can use it. But it is nonlinear, i.e., $F(u^n)=0$ has to be solved at each time step. – mathsgao Oct 23 '14 at 15:59
• If the regularity of the solution is very good, C-N scheme with linearization should be stable. However, if the solution of the PDE blows up, C-N scheme maybe not good. @jokersobak, would you like to test these schemes with an artificial example which admits smooth solution? – mathsgao Oct 23 '14 at 16:07
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 1, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.7768456935882568, "perplexity": 611.6554305358586}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2019-47/segments/1573496670729.90/warc/CC-MAIN-20191121023525-20191121051525-00283.warc.gz"}