# Tough Calculation, novice mathematica user

I have an equation, that I've been calling $b_N(x)$ that satisfies the following identity: $$-Nb_N(x)^2=(x-N)b_N(x)+xb_N'(x)$$ where $b_N'(x)$ is the first derivative. I take the derivative then of both sides and multiply both sides by $x$ giving me $$-2Nb_N(x)xb_N'(x)=xb_N(x)+\left[x^2+(1-N)x\right]b_N'(x)+x^2b_N''(x)$$ Using the original identity (but rewriting as $xb_N'(x)=(N-x)b_N(x)-Nb_N(x)^2$) and substituting on the LHS gives me $$-2Nb_N(x)\left[(N-x)b_N(x)-Nb_N(x)^2\right]=xb_N(x)+\left[x^2+(1-N)x\right]b_N'(x)+x^2b_N''(x)$$ Simplifying the LHS gives $$2N^2b_N(x)^3-2(x-N)(-Nb_N(x)^2)=xb_N(x)+\left[x^2+(1-N)x\right]b_N'(x)+x^2b_N''(x)$$ Finally, on the LHS, doing another substitution for $-Nb_N(x)^2$ with the original identity, moving the terms and simplifying gives me $$2N^2b_N(x)^3=\left[2x^2+(1-4N)x+2N^2\right]b_N(x)+\left[3x^2+(1-3N)x\right]b_N'(x)+x^2b_N''(x)$$

This calculation by hand is not very tedious and) I've done it a fair amount to verify. My interest though is to continue this process, (in other words, take the derivative of the last identity) and by hand it is really difficult and easy to make mistakes. For example, the derivative of both sides multiplied by $x$ is $$6N^2b_N(x)^2\cdot b_N'(x)=\left[4x^2+(1-4N)x\right]b_N(x)+...$$ I think you get the idea...So I would like to use Mathematica to tackle the problem. My problem is I'm not savvy with mathmatica. The function $b_N$ really is immaterial and it is the process of continued derivative taking and substitution that makes it hard. What is the best approach for handling this type of calculation in Mathematica?

• I understand that the downvote is most likele due to the lack of attempt on my part to try the problem but I'm a novice. I've done most of my undergraduate work with Maple and I'm trying to understand Mathematica. I've made headway with basic functions, etc, but at least if i had a strategy that would help Commented Nov 3, 2014 at 1:01
• The problem, I think, is that your question reads like a code-request and would require a lot of work on the part of the person answering. At the very least, having a code block with your equations defined in correct Mathematica would encourage more folks to give your question a second thought. Commented Nov 3, 2014 at 1:16
• I think you are right. I guess pencil and paper it is until I can figure this out on Mathematica Commented Nov 3, 2014 at 1:34
• DSolve[-n bn[x]^2 == (x - n) bn[x] + x bn'[x], bn, x] Commented Nov 3, 2014 at 1:43
• Thank you belisarius, but I don't need it solved. I have the equation already. My goal is to generate larger and larger differential equations for higher powers of $b_N(x)$. The method is outlined above Commented Nov 3, 2014 at 2:02

## 1 Answer

Try this:

 eq = -n*b[x]^2 == (x - n)*b[x] + x*b'[x];
DSolve[eq, b[x], x]


The result is here:

{{b[x] -> (E^-x x^n)/(C[1] - n Gamma[n, x])}}


Here C[1] is the arbitrary constant.

Have fun!

• I posted this in a comment above. The OP said it isn't what s/he wants. (Although I'm not sure about what s/he really wants :( ) Commented Nov 3, 2014 at 15:04
• Yes, belisarius is right. I will edit because I'm not sure my goal is clear. Commented Nov 3, 2014 at 21:40
• @Dr. belisarius Sorry, I did not notice. Commented Feb 28, 2016 at 17:23