Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Analyitical solution to function and second deritive of function

  1. Jun 13, 2012 #1
    I have the following (fairly simple) boundary value problem and I am trying to find an analytical solution to it, but for the life of me it's not working out. This is part of a larger thing where I'm trying to understand FEM and BVPs. Essentially this is a diffusion reaction problem.

    My problem is I have the following (π=pi)

    v-kv''=f(x)=sin(πx), x is between 1 and 2
    v@x=0 = 0 and v@x=1 = 0

    I have some plots but they are not matching my analytical solution (I think my brain has just broken tonight), but if anyone can steer me right I'd be grateful.
  2. jcsd
  3. Jun 13, 2012 #2
    I should also have mentioned k is a constant
  4. Jun 13, 2012 #3


    User Avatar
    Science Advisor

    The differential equation is [itex]-kv''+ v= sin(\pi x)[/itex]? That's a linear equation with constant coefficents. Its characteristic equation is [itex]-kr^2+ 1= 0[/itex] so that [itex]r= \pm 1[/itex] and the general solution is [itex]C_1e^x+ C_2e^{-x}[/itex] (it could also be written as [itex]C_1cosh(x)+ C_2sinh(x)[/itex]).

    Look for a specific solution to the entire equation of the form [itex]Asin(\pi x)+ B cos(\pi x)[/itex].

    But I am concerned about the information that the differential equation only holds between x= 1 and x= 2, so that the previous solution is valid only between x= 1 and x= 2, while we are given the value of v at x= 0. Not knowing what v is like between 0 and 1, it is impossible to use that information. I suggest you recheck that- either the d.e. holds between 0 and 1 or the boundary values are given at 1 and 2.
  5. Jun 14, 2012 #4
    #sorry, mistake on my part, yes, the equation holds between 0 and 1. Thanks for that, so rusty on differential calculus
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook