Can anyone help with the following differential equation. The errors i am getting are also given.

DSolve[{x y''[x] -  h*x  y'[x] + y'[x] == 0, y[0] == 0, 
  y[1] == 1}, y[x], x]

During evaluation of In[20]:= Solve::incnst: Inconsistent or redundant transcendental equation. After reduction, the bad equation is -C[1] == 0. >>

During evaluation of In[20]:= Solve::ifun: Inverse functions are being used by Solve, so some solutions may not be found; use Reduce for complete solution information. >>

During evaluation of In[20]:= DSolve::bvnul: For some branches of the general solution, the given boundary conditions lead to an empty solution. >>

Out[20]= {}
  • $\begingroup$ What is h, a function of x or a constant, if so is it real, positive or...? The equation is x y''[x] - h*x y'[x] + y'[x] == 0 or x y''[x] - h*x y'[x] + y[x] == 0? $\endgroup$
    – Artes
    Mar 25, 2016 at 14:15
  • $\begingroup$ All too often, DSolve fails due to boundary conditions. This is the case here. $\endgroup$
    – bbgodfrey
    Mar 25, 2016 at 14:21
  • $\begingroup$ h is a real positive constant $\endgroup$
    – Asim Aziz
    Mar 25, 2016 at 14:24
  • $\begingroup$ Welcome to Mathematica.SE! I hope you will become a regular contributor. To get started, 1) take the introductory tour now, 2) when you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge, 3) remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign, and 4) give help too, by answering questions in your areas of expertise. $\endgroup$
    – bbgodfrey
    Mar 25, 2016 at 14:35

1 Answer 1


y[0] == 0 is at fault here. Omit it to obtain

DSolve[{x y''[x] - h*x y'[x] + y'[x] == 0, y[1] == 1}, y[x], x][[1, 1]]
(* y[x] -> 1 - C[1] ExpIntegralEi[h] + C[1] ExpIntegralEi[h x] *)

However, ExpIntegralEi[h x] evaluates to Infinity at x = 0. Thus, y[0] == 0 has no solution.

y[x] /. % /. x -> 0
(* 1 + C[1] (-∞) - C[1] ExpIntegralEi[h] *)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.