1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Fourth order boundary value problem

  1. Mar 22, 2014 #1
    Hi guys, so I'm stuck on quite an interesting problem, and have been for a few days now. If anybody can take the time to have a look at it that would be the most incredible thing ever, because I have reached a point where I am at a loss.

    Solve the following 4th order differential equation

    20x^4y''''(x) - x^4y'''(x) + 3x^2y''(x) - 6xy'(x)+ 6y(x) =0

    subject to the boundary conditions: y'(1)=0, y'''(1) = 1, y''(5) = -50,
    and y'''(5)= -20. The superscripts within parentheses indicate the order
    of the derivatives. Provide a plot of your solution y(x) from x = 1 to
    x = 5.

    I won't post my matlab code right now because it's very long, and I doubt any of you will want to wade through it! If anybody wants me to post it just say so. Instead I will write down what I think the algorithm is and I want you to call me out if you think I've made a mistake.

    1. Rearrange the ode to solve for y'''' and then convert each differential into first order ODE. We have
    function F = dEqs(y,x) % First-order differential
    F(4)= (1/20)*y(4)-(3/(20*x^2))*y(3)+(3/(10*x^3))*y(2)-(3/(10*x^4))*y(1);

    2. Now this can at least be solved by ode45, BUT I don't have initial conditions, so I must guess my initial conditions. I need y''(1) and y(1), so I guess these (how I make a good guess I don't really know). This is called the shooting method for those who are interested. I can't use bvp4c because I need 3 out of 4 initial conditions I think. If I had 3 out of 4 I could solve it but....

    3. THIS IS WHERE I AM STUCK I start with guessing y''(1) but I can't check this corresponds to y'(5) when I integrate because I don't know it. I can't guess y(1) for the same reason, in fact I don't know how to deal with that at all.

    Any idea how I should go about solving this problem? I have a code for solving a second order ode, third or fourth with more forgiving boundary conditions... anybody?

    Thank you!!
  2. jcsd
  3. Mar 22, 2014 #2


    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper

    First of all, is this homework? If it is, you have posted in the wrong forum.
  4. Mar 28, 2014 #3


    User Avatar
    Science Advisor
    Homework Helper

    I think you do not need to know y'(5). Start with guessing y(1), and let it correspond to y''(5). Also, guess y''(1), and let it correspond to y'''(5). Then see if your y''(1) guess corresponds to y'''(5). If not, adjust your y''(1) guess. Continue this process until you hit the y'''(5) target, then see if your y(1) guess corresponds to y''(5). If not, adjust your y(1) guess, and start all over.

    (In the above, I am not sure if I should say iterate on your y''(1) guess last, or your y(1) guess last. Does anyone reading this thread have advice on the preferred sequence of events?)

    Also, I tried to write a search algorithm in ISO C 1999 programming language, to search for two initial guesses, as you are doing. Where I currently put the project on hold (if I recall correctly) is, how to detect a "NaN" (not a number) value within my program, so I could change the search process accordingly. But when I perused the web, if I recall, it was still unclear to me how to detect NaN using portable, standard ISO C 1999 code. Does anyone have experience with how to do this using portable, standard C 1999, or advice?
  5. Mar 28, 2014 #4
    Yes. I have some advice. It's a linear problem, so the boundary conditions at x =5 are going to be linear functions of the unknown boundary conditions at x =1. So start out by solving the problem with y(1)=y''(1) = 0. Record the values of y''(5) and y'''(5). Then re-solve the equations with y(1)=1 and y''(1)=0. Record the values of y''(5) and y'''(5). This will give you enough information to determine the partial derivatives of the boundary values at y = 5 with respect to y(1). Then re-solve the equations one more time, with y(1)= 0, y''(1)=1. Record the values of y''(5) and y'''(5). This will give you enough information to determine the partial derivatives of the boundary values at y = 5 with respect to y''(1). You can now write two linear algebraic equations in two unknowns to determine the unknown initial conditions required to make good on the boundary conditions at x = 5.

Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted