Finite difference scheme for u'=u^2, u0=1, 0<t<2

  • I
  • Thread starter feynman1
  • Start date
  • #1
353
26
u'(t)=u(t)^2, u(0)=1, 0<t<2
What finite difference scheme can overcome the difficulty when t->1+ and help the solution jump to the negative branch?
 
Last edited:

Answers and Replies

  • #2
anuttarasammyak
Gold Member
1,157
529
[tex]\frac{du}{u^2}=dt[/tex]
[tex]\frac{1}{u}+t=const.=1[/tex]
Negative branch ?
 
  • #3
353
26
[tex]\frac{du}{u^2}=dt[/tex]
[tex]\frac{1}{u}+t=const.=1[/tex]
Negative branch ?
when t>1, u<0
 
  • #4
anuttarasammyak
Gold Member
1,157
529
Yes.
[tex]u=\frac{1}{1-t}[/tex]
What's wrong with it ?
 
  • #5
353
26
[tex]u=\frac{1}{1-t}[/tex]
What's wrong with it ?
Starting from t=0, when t->1+, finite differences fail.
 
  • #6
anuttarasammyak
Gold Member
1,157
529
Yes, but why do you estimate it fails ?
2021-09-14 13.49.46.jpg
 
Last edited:
  • #7
353
26
just try numerics yourself and you'll see.
 
  • #8
anuttarasammyak
Gold Member
1,157
529
The solution says
[tex]|u|>1[/tex]
, or
[tex]|1/u|<1[/tex]
if you do not like divergence to ##\pm## infinity. {1/u} (0) = 0.
 
  • #9
pasmith
Homework Helper
2,076
696
Starting from t=0, when t->1+, finite differences fail.

The domain of the initial value problem at [itex]t = 0[/itex] does not extend past [itex]t \to 1^{-}[/itex].

An antiderivative of [itex]1/(t-1)^2[/itex] looks like [tex]
f: t \mapsto \begin{cases} 1/(1- t) + c_1 & t < 1 \\
1/(1 - t) + c_2 & t > 1.\end{cases}[/tex] The arbitrary constants [itex]c_1[/itex] and [itex]c_2[/itex] don't have to be equal, and the constraint that [itex]u(0) = 1[/itex] only fixes [itex]c_1 = 0[/itex].

If you want to look at [itex]t > 1[/itex] then you must start from an initial [itex]t_0 > 1[/itex] - for example [itex]u = -1[/itex] when [itex]t = 2[/itex].
 
Top