Solving Diff.Eq. with Boundary Conditions: y(x) = x

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
36 replies · 7K views
Well, in fact is easy to come up with such solution.

The general solution for [itex]y''(x)+y(x)=0[/itex] is [itex]y(x)=A\cos x+ B\sin x[/itex]. Evaluating the boundary conditions, the constants [itex]A,\,B[/itex] are determined. After doing that, one can conclude that [itex]A=0[/itex] and [itex]B=\cos^{-1}(1)[/itex].
 
Physics news on Phys.org
am not sure how to apply this type of boundary condition
 
Last edited:
If y(x) = Acos(x) + Bsin(x)

y'(x) = Bcos(x) - Asin(x)

y''(x) = -Acos(x) - Bsin(x)

y(1)= - y(-1)
y'(1) = 2-y'(-1)
but I'm still not sure about this type of boundary condition...
 
Just evaluate:

[tex]y(-1)+y(1)=A\cos(-1)+B\sin(-1)+A\cos(1)+B\sin(-1)=2A\cos(1)=0,[/tex]

so [itex]A=0[/itex]. What is [itex]B[/itex]?
 
I see what I'm doing wrong. I was trying to put the boundary conditions into y(x) and y'(x) instead of puting those two into the boundary conditions.

B= 1/cos(1)

Thanks for the help

oh yeah [I hope it's the last question :) ] but how did you find the general solution to y''(x) + y(x)=0 to be y(x)= Acos(x) + Bsin(x) ?
 
Well, you propose (like in any linear second order ode with constant coefficients) an exponential solution [itex]y(x)=e^{rx}[/itex], and then find out what is the value of [itex]r[/itex], i.e.

[tex]y''(x)+y(x)=(r^2+1)e^{rx}=0.[/tex]

That way, [itex]r=\pm i[/itex] and the solution is [itex]y(x)=Ae^{ix}+Be^{-ix}[/itex]. As you only want real solutions, then [itex]y(x)=C\cos x+D\sin x[/itex].

You should really check a book on ODE's. I recommend you the one written by Boyce and DiPrima Elementary Differential Equations. It should be in your library.
 
I'll try to find that book. Thanks again for the help.