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

Mathematica Issue - Help!

Tags:
  1. Nov 4, 2013 #1
    Mathematica Issue -- Help!

    Hello! I am new to Mathematica and i tried to solve a non linear second order ode... The result is that nothing happens... I mean that i get as output the same line as i write in input.. For example, my problem is: (thats what i get)

    In[33]:= DSolve[ g - b x - c y[x] - f y[x]^2 + a Derivative[1][y][x]^2 +
    d (y^\[Prime]\[Prime])[x] + a y[x] (y^\[Prime]\[Prime])[x] == 0,
    y[x], x]

    Out[33]= DSolve[ g - b x - c y[x] - f y[x]^2 + a Derivative[1][y][x]^2 +
    d (y^\[Prime]\[Prime])[x] + a y[x] (y^\[Prime]\[Prime])[x] == 0,
    y[x], x]

    What am i doin wrong? Or maybe that means that it cant be solved? I dont want a numerical solution but an exact analytical one (if there exists)...
    And btw g,b,c,f,a are constants.
     
  2. jcsd
  3. Nov 4, 2013 #2

    Dale

    Staff: Mentor

    That is what happens when there is no known analytical solution. You will have to solve it numerically.

    However, you may have entered it in incorrectly. What are you trying to solve?
     
  4. Nov 4, 2013 #3
    i am tryin to solve this (sorry i am not good writin it in latex):

    d*y''(x)+a*y(x)*y''(x)+a*(y'(x))^2-b*x-c*y(x)-f*(y(x))^2-g=0

    as i said before, d,a,c,b,g are arbitrary constants...
    Am i writing this wrong, or there is not analytical solutions?
     
  5. Nov 4, 2013 #4
    For Mathematica questions showing "plain Mathematica" is usually better than Latex so that someone doesn't have to undo all the work you just did to turn it into Latex just to get it back into Mathematica.

    Mathematica can easily solve this

    In[1]:= DSolve[a*y''[x] + b*y'[x] + c*y[x] + d == 0, y[x], x]

    Out[1]= {{y[x]->-(d/c)+E^(((-b-Sqrt[b^2 -4a c])x)/(2a))C[1] + E^(((-b+Sqrt[b^2-4a c])x)/(2 a)) C[2]}}

    but not this

    In[2]:= DSolve[a*y''[x] + b*y'[x] + c*y[x]^2 + d == 0, y[x], x]

    Out[2]= DSolve[d + c y[x]^2 + b y'[x] + a y''[x] == 0, y[x], x]

    so unless your more complicated equation happened to be a special form there is little hope.

    If you knew some or all the exact values of your constants there might be a chance.
     
  6. Nov 4, 2013 #5

    Dale

    Staff: Mentor

    There is no analytical solution. You will have to do it numerically.
     
  7. Jan 13, 2014 #6
    Sometimes (read: when you have some idea of what your solution should look like, at least qualitatively), you can rewrite your function as another function or your variable as another variable (the radial dependence of the spherical wave function in the separation-of-variables method comes to mind) to turn your equation into something simpler. Your equation looks like something I never want to have to solve, so this might be impossible in your case, but it could be worth a try.

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




Similar Discussions: Mathematica Issue - Help!
  1. Mathematica issue (Replies: 4)

Loading...