6

My task: find approximate solution as $$y = y_0(x) + y_1(x)\lambda + y_2(x)\lambda^2 + y_3(x)\lambda^3$$ of differential equation $$y' = \sin x + \lambda e^y, y(0)=1-\lambda. \ \ \ \ (*)$$ My attempt :

Let $$y(x,\lambda) = y_0(x) + y_1(x)\lambda + y_2(x)\lambda^2 + y_3(x)\lambda^3.$$ Then $$ y_0(x) = y(x,0)$$ $$y_1(x) =\frac{ \partial y(x,\lambda)}{\partial \lambda}_{\lambda = 0}$$ $$y_2(x) =\frac{1}{2}\frac{ \partial^2y(x,\lambda)}{\partial \lambda^2}_{\lambda = 0}$$ $$y_3(x) =\frac{1}{6}\frac{ \partial^3y(x,\lambda)}{\partial \lambda^3}_{\lambda = 0}$$

And

$$ y_0'(x) = y'_x(x,0)$$ $$y_1'(x) =\frac{ \partial}{\partial \lambda}y'_x(x,\lambda)_{\lambda = 0}$$ $$y_2'(x) =\frac{1}{2}\frac{ \partial^2}{\partial \lambda^2}y'_x(x,\lambda)_{\lambda = 0}$$ $$y_3'(x) =\frac{1}{6}\frac{ \partial^3}{\partial \lambda^3}y'_x(x,\lambda)_{\lambda = 0}$$

After that, using (*), i got $$y_0'(x)= sin x$$ $$y_1'(x)=e^{(y_0)}$$ $$y_2'(x)=e^{(y_0)}y_1;$$ $$y_3'(x)=e^{(y_0)}(y_1^2+y_2)$$ And i stopped here. There isn't a solution in these integrals. Maybe, there is another solution of my task? Thanks

Robert Lewis
  • 72,871
Simankov
  • 431
  • 2
  • 17
  • Do you mean "differential" equation? A "different" equation is an equation which is not equal. – ajotatxe May 12 '15 at 15:41
  • yes, fixed this. – Simankov May 12 '15 at 15:44
  • I think you did correctly so far. Maybe plug in the initial values and just write them as definite integrals. – KittyL May 12 '15 at 15:55
  • @KittyL but i can't solve $\int {e^{(-\cos x)}}$. Or you are talking about writing solution like $y(x)=-\cos x\lambda+\int{e^{-cosx}}\lambda^2+...$? In this case, i think, that isn't real solution for task in homework – Simankov May 12 '15 at 16:01
  • What i meant is plugging the initial condition into your setup, you may get $y_0(0)=1, y_1(0)=-1$, etc. I am sure you can find $y_0(x)=2-\cos x$. Since $y_1'=e^{2-\cos x}$, you can write $y_1=\int_0^x e^{2-\cos t} dt -1$, using the initial condition on $y_1$. Would that be sufficient? – KittyL May 12 '15 at 16:29
  • @KittyL Not sure. Other tasks in this paragraph which have got answers haven't got definite integrals in solution. – Simankov May 12 '15 at 16:37
  • I added the "differential equations" tag. Hope that's OK. NIce question, *endorsed!!!* Cheers! – Robert Lewis May 15 '15 at 18:31

3 Answers3

5

I don't know if you prefer the exact solution instead of approximates. Infortunately, the analytic expression includes an integral $\int e^{-\cos(x)}dx$ which has no standard closed form :

enter image description here

Note that $y(x)=-\cos(x)-\ln(f(x)+C)$

where $f(x)$ is the function as shown above. This is consistent with the previous answer from grdgfgr.

For numerical calculus, there is no difficulty to compute accurate values of the integral, then accurate numerical values of the whole function $y(x)$.

If you want good approximates on the form of formula, it is possible to express $\int_0^x e^{-\cos(t)}dt$ on the form of finite series.

Ultimately, the integral can be remplaced by the next Fourier series : $$\int_0^{x} e^{-\cos(t)}dt=a_0x+\displaystyle\sum_{n=1} \frac{a_n}{n}\sin(nx)$$ $a_0=1.266066$

$a_1=-1.130318$

$a_2=0.271495$

$a_3=-0.0443368$

$a_4=0.00547424$

$a_5=-0.000542926$

It is sufficient to make negligible the deviations.

JJacquelin
  • 68,401
  • 4
  • 40
  • 91
  • It is very odd to me that you divide $a_n$ by $n$. Any particular reason you use this convention? – Gappy Hilmore May 15 '15 at 22:53
  • $a_n$ are the coefficients of the Fourier series $e^{-\cos(x)}=\Sigma a_n \cos(nx)$. The integration of $a_n\cos(nx)$ leads to $\frac{a_n}{n}\sin(nx)$. – JJacquelin May 16 '15 at 05:53
4

The solution is easier than you may think at first glance.

Just expand the solution of the differential equation into Taylor series.

$$y=y(0)+\frac{y'(0)}{1!}x+\frac{y''(0)}{2!}x^{2}+...$$

The coefficients $y'(0),y''(0)$, etc. we can evaluate directly from the differential equation by differentiating it. Some of the first coefficients:

$$y(0)=1-\lambda$$

$$y'(0)=\lambda e^{1-\lambda}$$

$$y''(0)=1+\lambda^{2} e^{2(1-\lambda)}$$

$$y'''(0)=\lambda e^{1-\lambda}\left [1+2\lambda^{2} e^{2(1-\lambda)}\right ]$$

Now, after you've put these results into the Taylor series, all you need is to regroup the series terms to separate terms that contain only $\lambda,\lambda^{2},\lambda^{3}$ etc.

Martin Gales
  • 7,927
  • Finally, i used this method in my homework ( classmate helped me ). It was sufficient) – Simankov May 16 '15 at 15:58
  • This is the only answer so far that addresses the original question. – rajb245 May 18 '15 at 13:29
  • @rajb245 yes, i think that it is really to solve this stuff in exact form. Examples like this in book had got answers like $\ln(x+1)+x^2/3\lambda + e^x\lambda^2$ and etc. – Simankov May 18 '15 at 15:16
3

I am afraid my solution will not help you with your homework. If I were you, I would ask the teacher/TA since this seems like a weird question to me. But I still think it is an interesting approach and it is good to know such approaches are possible.

Lets try to find an asymptotic solution to this equation to have an understanding of how it behaves. Let's assume sinx is negligible compared to $y'$ and $e^y$. In that case, the solution becomes $-log(-x+c)$. Consider $x$ values close to $c$. It makes both $y$ and $e^y$ infinity, and sinx is negligible compared to infinity.

Just for fun, lets compare this to the numerical solution of the equation:

enter image description here

The general solution appears to be of the form:

$$-cos(x)-log(-x+d)+c$$

where $d$ is the position of the singularity and $c$ should be determined using an initial condition y(x<-10) (y(0)cannot be connected to the actual solution as you can see from the graph)

Evidently, it is going to be very difficult to approximate such a solution using any continuous function.

Getting back to how you might actually solve your question as it was intended: If this is an approximation assignment, why don't you approximate $\int e^{-cost}$ using taylor expansion?

$\int e^{-cost} \sim 1.0128527022016056\int(\frac{\cos ^2(x)}{2}-\cos (x)+1)dx $

Unfortunately you need some multiplicative factoring for the approximation to remain valid for a large interval.