0
$\begingroup$

Dears, I have the following equations: $x^{\prime\prime}(t)=\frac{3}{2}x(t)^{2}$ with $x(0)=4$ and $x(1)=1$. The exact solution is $x(t)=\frac{4}{(1+t)^{2}}$. Now the corresponding operator is $ Px=x+\int_{0}^{t}s(1-t)(x''-\frac{3}{2}x^{2})ds\hspace{1cm} \text{if}\hspace{0.25cm} 0\leq s\leq t$ and $Px=x+\int_{t}^{1}t(1-s)(x''-\frac{3}{2}x^{2})ds\hspace{1cm} \text{if}\hspace{0.25cm} t\leq s\leq 1.$ Now I apply a fixed point scheme on the above operator $P$ to find its fixed point: The scheme reads as (where $x_{0}$ any initial guess):

$y_{n}=(1-a_{n})x_{n}+a_{n}Px_{n}, x_{n+1}=Py_{n}.$

. Now the initial iterate for the above given BVP is $x_{0}(t)=4-3t$. For $t=0.5$ and $a_{n}=0.80$, I write the following code in Mathemtica

Clear[x, P, t, s, a]
x[0] = 4 - 3 t;
P[x_]:=P[x]=Piecewise[{{x+Integrate[s (1 - t) x''[s] - 3/2 (x[s])^2, {s, 0, t}],0<=s<= t},{x+Integrate[(s (1 - t) x''[s] - 3/2 (x[s])^2),{s, t, 1}],t<=s<= 1}}];
a[n_] := a[n] = 0.95;
x[n_] := x[n] = P[(1 - a[n - 1])*x[n - 1] + a[n - 1]*P[x[n - 1]]]
NumberForm[a1 = {Table[x[i] /. t -> (0.5), {i, 0, 20}]}, 7]

The iterations are put 20 as we see above. When I run the code it shows errors. I think it is due to the putting of wrong putting of $P$ in the mathemtica. Or there is some additional information's needed to integrate the terms inside the $P$. I will be thankful to the kind help please.

$\endgroup$
2
  • 1
    $\begingroup$ Can you, please, explain how this post is different than this or this both of which were asked by you and have answers? $\endgroup$
    – user49048
    Mar 8, 2022 at 19:24
  • $\begingroup$ Dear @Kcr, I want to iterate the operator P directly instead of simplifying. Because this will give me chance to use other iterative methods of the literature directly. $\endgroup$
    – Junaid
    Mar 8, 2022 at 20:05

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.