# How do I solve this kind of 3rd order differential equation?

$$c_1f'''(x)+c_2 f''(x) + (c_3x + c_4 +c_5x^2)f'(x) + f(x) ( c_6x + c_7 x^3) =0$$

Should I use approximation for the third derivative ?

EDIT :- My end result as suggested by @arthur

Assuming

$$f(x) = \sum_{n=0}^{\infty} a_n x^n$$

$$c_1a_{n+3}(n+3)(n+2)(n+1) + c_2(n+2)(n+1)a_{n+2} + (c_5x^2 -c_4-c_3x)(n+1)a_{n+1}+(c_6x + c_7)a_n =0, n=0,1,2,3..$$

Now how can I proceed forward ?

EDIT: Is this correct, taking n=2 instead of n=0

$$c_1y''' = c_1\sum_{n=3}^{\infty} n(n-1)(n-2)a_n x^{n-3}=c_1\sum_{n=0}^{\infty} (n+3)(n+2)(n+1)a_{n+3} x^{n}$$ $$c_2y'' = c_2\sum_{n=2}^{\infty}n(n-1)a_nx^{n-2}=c_2\sum_{n=0}^{\infty}(n+2)(n+1)a_{n+2}x^{n}$$ $$c_3xy' =c_3\sum_{n=1}^{\infty}na_{n}x^{n}=c_3\sum_{n=0}^{\infty}(n)a_{n}x^{n}$$ $$c_4y' =c_4\sum_{n=0}^{\infty}(n+1)a_{n+1}x^{n}$$ $$c_5x^2y' =c_5\sum_{n=1}^{\infty}na_{n}x^{n+1}= c_5\sum_{n=2}^{\infty}(n-1)a_{n-1}x^{n}= c_5\sum_{n=0}^{\infty}(n-1)a_{n-1}x^{n} + c_5a_{-1}$$ $$c_6xy=c_6\sum_{n=0}^{\infty}a_{n}x^{n+1}=c_6\sum_{n=1}^{\infty}a_{n-1}x^{n}= c_6\sum_{n=0}^{\infty}a_{n-1}x^{n}-c_6a_{-1}$$ $$c_7x^3y=c_7∑_{n=0}^{∞}a_nx^{n+3}=c_7∑_{n=3}^{∞}a_{n-3}x^{n}=c_7∑_{n=0}^{∞}a_{n-3}x^{n}-c_7a_{-3} - c_7a_{-2}x - c_7a_{-1}x^2$$

• No. Use a power series $\displaystyle f(x) = \sum_{n=0}^{\infty } a_n x^n$ – arthur Jul 7 '20 at 9:02
• @arthur It would be helpful if you post an answer – Tim Crosby Jul 7 '20 at 14:46
• There shouldn't be any $x$ terms in your $a_n$ equation. Equate the coefficients of $x^n$. see en.wikipedia.org/wiki/… – arthur Jul 7 '20 at 15:41
• Hint: $\displaystyle f(x)c_6x = c_6 \sum_{n=0}^{\infty } a_n x^{n+1}$ , so when you equate the $x^n$ coefficients take $c_6 a_{n-1}$ from this expression. i.e. What is the coefficient for $x^n$. – arthur Jul 7 '20 at 15:48
• @arthur Is my approach correct now? How to factor them into something useful?:) – Tim Crosby Jul 7 '20 at 18:29

Don't read this. When you do you will realize why no one wanted to answer it.

The method is based on this tutorial.

Maxima:

Y:sum(a[n]*x^n,n,0,inf);
Y1:sum(n*a[n]*x^(n-1),n,1,inf);
Y2:sum(n*(n-1)*a[n]*x^(n-2),n,2,inf);
Y3:sum(n*(n-1)*(n-2)*a[n]*x^(n-3),n,3,inf);

E1 : c1*Y3 + c2*Y2 + (c3*x + c4 + c5*x^2)*Y1 + Y*(c6*x + c7*x^3);

E2 : expand(E1);
E3 : intosum(E2);
E4 : factorsum(E3);

E5 : changevar(part(E4,1),k-n-3,k,n)+changevar(part(E4,2)+part(E4,3),k-n-1,k,n)
+changevar(part(E4,4),k-n,k,n)+changevar(part(E4,5),k-n+1,k,n)
+changevar(part(E4,6),k-n+2,k,n)+changevar(part(E4,7),k-n+3,k,n);

E6 : intosum(E5);
E7 : sumcontract(E6);
E8 : factorsum(E7);

Coeffs1 : REC:coeff(part(E8,1,1),x,k);


$$Y = \sum_{n=0}^{\infty }{a_{n}\,x^{n}} \tag{1}$$

$$Y1 = \frac{dy}{dx} = \sum_{n=1}^{\infty }{n\,a_{n}\,x^{n-1}} \tag{2}$$

$$Y2 = \frac{d^2y}{dx^2} = \sum_{n=2}^{\infty }{\left(n-1\right)\,n\,a_{n}\,x^{n-2}} \tag{3}$$

$$Y3 = \frac{d^3y}{dx^3} =\sum_{n=3}^{\infty }{\left(n-2\right)\,\left(n-1\right)\,n\,a_{n}\, x^{n-3}} \tag{4}$$

The equation $$c_1f'''(x)+c_2 f''(x) + (c_3x + c_4 +c_5x^2)f'(x) + f(x) ( c_6x + c_7 x^3) =0$$

$$E1 = \left({\it c_7}\,x^3+{\it c_6}\,x\right)\,\sum_{n=0}^{\infty }{a_{n }\,x^{n}}+\left({\it c_5}\,x^2+{\it c_3}\,x+{\it c_4}\right)\,\sum_{ n=1}^{\infty }{n\,a_{n}\,x^{n-1}}+{\it c_2}\,\sum_{n=2}^{\infty }{ \left(n-1\right)\,n\,a_{n}\,x^{n-2}}+{\it c_1}\,\sum_{n=3}^{\infty }{\left(n-2\right)\,\left(n-1\right)\,n\,a_{n}\,x^{n-3}} \tag{5}$$

Expansion of terms:

$$E2 = {\it c_7}\,x^3\,\sum_{n=0}^{\infty }{a_{n}\,x^{n}}+{\it c_6}\,x\, \sum_{n=0}^{\infty }{a_{n}\,x^{n}}+{\it c_5}\,x^2\,\sum_{n=1}^{ \infty }{n\,a_{n}\,x^{n-1}}+{\it c_3}\,x\,\sum_{n=1}^{\infty }{n\,a _{n}\,x^{n-1}}+{\it c_4}\,\sum_{n=1}^{\infty }{n\,a_{n}\,x^{n-1}}+ {\it c_2}\,\sum_{n=2}^{\infty }{\left(n^2\,a_{n}\,x^{n-2}-n\,a_{n}\, x^{n-2}\right)}+{\it c_1}\,\sum_{n=3}^{\infty }{\left(n^3\,a_{n}\,x ^{n-3}-3\,n^2\,a_{n}\,x^{n-3}+2\,n\,a_{n}\,x^{n-3}\right)} \tag{6}$$

Move the $$x$$ multipliers into the sums.

$$E3 = \sum_{n=0}^{\infty }{{\it c_7}\,a_{n}\,x^{n+3}}+\sum_{n=1}^{\infty }{{\it c_5}\,n\,a_{n}\,x^{n+1}}+\sum_{n=0}^{\infty }{{\it c_6}\,a_{n }\,x^{n+1}}+\sum_{n=1}^{\infty }{{\it c_3}\,n\,a_{n}\,x^{n}}+\sum_{n= 1}^{\infty }{{\it c_4}\,n\,a_{n}\,x^{n-1}}+\sum_{n=2}^{\infty }{ {\it c_2}\,\left(n^2\,a_{n}\,x^{n-2}-n\,a_{n}\,x^{n-2}\right)}+ \sum_{n=3}^{\infty }{{\it c_1}\,\left(n^3\,a_{n}\,x^{n-3}-3\,n^2\,a _{n}\,x^{n-3}+2\,n\,a_{n}\,x^{n-3}\right)} \tag{7}$$

Collect factors:

$$E4 = {\it c_7}\,\sum_{n=0}^{\infty }{a_{n}\,x^{n+3}}+{\it c_5}\,\sum_{n= 1}^{\infty }{n\,a_{n}\,x^{n+1}}+{\it c_6}\,\sum_{n=0}^{\infty }{a_{n }\,x^{n+1}}+{\it c_3}\,\sum_{n=1}^{\infty }{n\,a_{n}\,x^{n}}+ {\it c_4}\,\sum_{n=1}^{\infty }{n\,a_{n}\,x^{n-1}}+{\it c_2}\,\sum_{ n=2}^{\infty }{\left(n-1\right)\,n\,a_{n}\,x^{n-2}}+{\it c_1}\, \sum_{n=3}^{\infty }{n\,\left(n^2-3\,n+2\right)\,a_{n}\,x^{n-3}} \tag{8}$$

Set all powers to $$x^k$$:

$$E5 = {\it c_1}\,\sum_{k=0}^{\infty }{\left(k^3+6\,k^2+11\,k+6\right)\,a _{k+3}\,x^{k}}+{\it c_2}\,\sum_{k=0}^{\infty }{\left(k^2+3\,k+2 \right)\,a_{k+2}\,x^{k}}+{\it c_4}\,\sum_{k=0}^{\infty }{\left(k+1 \right)\,a_{k+1}\,x^{k}}+{\it c_3}\,\sum_{k=1}^{\infty }{k\,a_{k}\,x ^{k}}+{\it c_5}\,\sum_{k=2}^{\infty }{\left(k-1\right)\,a_{k-1}\,x^{ k}}+{\it c_6}\,\sum_{k=1}^{\infty }{a_{k-1}\,x^{k}}+{\it c_7}\, \sum_{k=3}^{\infty }{a_{k-3}\,x^{k}} \tag{9}$$

Move the $$c_k$$ multipliers into the sums:

$$E6 = \sum_{k=0}^{\infty }{{\it c_1}\,\left(k^3+6\,k^2+11\,k+6\right)\,a _{k+3}\,x^{k}}+\sum_{k=0}^{\infty }{{\it c_2}\,\left(k^2+3\,k+2 \right)\,a_{k+2}\,x^{k}}+\sum_{k=0}^{\infty }{{\it c_4}\,\left(k+1 \right)\,a_{k+1}\,x^{k}}+\sum_{k=1}^{\infty }{{\it c_3}\,k\,a_{k}\,x ^{k}}+\sum_{k=2}^{\infty }{{\it c_5}\,\left(k-1\right)\,a_{k-1}\,x^{ k}}+\sum_{k=1}^{\infty }{{\it c_6}\,a_{k-1}\,x^{k}}+\sum_{k=3}^{ \infty }{{\it c_7}\,a_{k-3}\,x^{k}} \tag{10}$$

Collect like terms:

$$E7 = \sum_{k=3}^{\infty }{\left({\it c_1}\,\left(k^3+6\,k^2+11\,k+6 \right)\,a_{k+3}\,x^{k}+{\it c_2}\,\left(k^2+3\,k+2\right)\,a_{k+2} \,x^{k}+{\it c_4}\,\left(k+1\right)\,a_{k+1}\,x^{k}+{\it c_3}\,k\,a _{k}\,x^{k}+{\it c_5}\,\left(k-1\right)\,a_{k-1}\,x^{k}+{\it c_6}\,a _{k-1}\,x^{k}+{\it c_7}\,a_{k-3}\,x^{k}\right)}+a_{1}\,{\it c_6}\,x^ 2+a_{1}\,{\it c_5}\,x^2+3\,a_{3}\,{\it c_4}\,x^2+2\,a_{2}\,{\it c_3} \,x^2+12\,a_{4}\,{\it c_2}\,x^2+60\,a_{5}\,{\it c_1}\,x^2+a_{0}\, {\it c_6}\,x+2\,a_{2}\,{\it c_4}\,x+a_{1}\,{\it c_3}\,x+6\,a_{3}\, {\it c_2}\,x+24\,a_{4}\,{\it c_1}\,x+a_{1}\,{\it c_4}+2\,a_{2}\, {\it c_2}+6\,a_{3}\,{\it c_1} \tag{11}$$

Collect coefficients of $$x^k$$.

$$E8$$ collects all the $$x^k$$ coefficients inside the sum and all the stray terms outside of it.

Note: $$k$$ starts from $$3$$.

$$E8 : \sum_{k=3}^{\infty }{\left(\left({\it c_1}\,k^3+6\,{\it c_1}\,k^2+ 11\,{\it c_1}\,k+6\,{\it c_1}\right)\,a_{k+3}+\left({\it c_2}\,k^2+3 \,{\it c_2}\,k+2\,{\it c_2}\right)\,a_{k+2}+\left({\it c_4}\,k+ {\it c_4}\right)\,a_{k+1}+{\it c_3}\,k\,a_{k}+\left({\it c_5}\,k+ {\it c_6}-{\it c_5}\right)\,a_{k-1}+{\it c_7}\,a_{k-3}\right)\,x^{k} }+a_{1}\,{\it c_6}\,x^2+a_{1}\,{\it c_5}\,x^2+3\,a_{3}\,{\it c_4}\,x ^2+2\,a_{2}\,{\it c_3}\,x^2+12\,a_{4}\,{\it c_2}\,x^2+60\,a_{5}\, {\it c_1}\,x^2+6\,{\it c_1}\,\left(4\,a_{4}\,x+a_{3}\right)+2\, {\it c_2}\,\left(3\,a_{3}\,x+a_{2}\right)+a_{0}\,{\it c_6}\,x+2\,a_{ 2}\,{\it c_4}\,x+a_{1}\,{\it c_3}\,x+a_{1}\,{\it c_4} = 0 \tag{12}$$

coefficients of $$x^k$$:

$$Coeffs1 : \left({\it c_1}\,k^3+6\,{\it c_1}\,k^2+11\,{\it c_1}\,k+6\, {\it c_1}\right)\,a_{k+3}+\left({\it c_2}\,k^2+3\,{\it c_2}\,k+2\, {\it c_2}\right)\,a_{k+2}+\left({\it c_4}\,k+{\it c_4}\right)\,a_{k+ 1}+{\it c_3}\,k\,a_{k}+\left({\it c_5}\,k+{\it c_6}-{\it c_5}\right) \,a_{k-1}+{\it c_7}\,a_{k-3} \tag{13} = 0$$

From $$E8$$ collect all the coefficients of $$x^k$$ for $$k=0..2$$:

$$6 c_1 a_{3} +2 c_2 a_{2} +a_1 c_4 = 0$$

$$24c_1a_4 + 3a_2 + a_0c_6 + 2a_2c_4 + a_1c_3 = 0$$

$$a_1c_6 + a_1c_5 + 3a_2c_4 + 2a_2c_3 + 12a_4c_2 + 60a_5c_1 = 0$$

$$a_0$$..$$a_5$$ need to be chosen to satisfy these equations. There could be arbitrarily many solutions.

The other coefficients $$a_6$$... can be calculated from $$Coeffs1$$ equation $$(13)$$

At this point we need to be reminded that $$\displaystyle Y = \sum_{n=0}^{\infty }{a_{n}\,x^{n}}$$