How to find the zero of a function defined by a non linear differential equation

I need to find the zero of a mysterious function sigma defined by a differential equation of the following form
u∗σ′(u)+(1−χ0)∗σ(u)+D∑k=1σ(u−xk)(χk−1−χk)=0,u*\sigma'(u)+(1-\chi_0)*\sigma(u)+\sum_{k=1}^{D} \sigma(u-x_k)(\chi_{k-1}-\chi_{k})=0,
with the initial condition σ(u)=uχ(0)−1\sigma(u)=u^{\chi(0)-1} if u<=x1u<=x_1 and σ(u)=0\sigma(u)=0 if u<0u<0 in these two cases: (D=10D=10 for both cases and x0=0x_0=0) 1) xk=1/(3∗(D−k+1))x_k=1/(3*(D-k+1)) and χk=8∗(cos((2∗(D−k)+3)Ï€/(3∗(D−k)+4)))3−4∗cos((2∗(D−k)+3)Ï€/(3∗(D−k)+4)).\chi_k=8* (\cos((2*(D-k)+3)Ï€/(3*(D-k)+4)))^3-4* \cos((2*(D-k)+3)Ï€/(3*(D-k)+4)). 2) x_k= 1/(2*(D-k+1))x_k= 1/(2*(D-k+1)) and \chi_k=16* \cos(((D-k)+2)Ï€/(2*(D-k)+5))^4 -12*\cos(((D-k)+2)Ï€/(2*(D-k)+5)))^2 +1.\chi_k=16* \cos(((D-k)+2)Ï€/(2*(D-k)+5))^4 -12*\cos(((D-k)+2)Ï€/(2*(D-k)+5)))^2 +1. I want just to mention that the sequence (x_k)(x_k) is increasing and we have x_0=0 {-2 10^-8, 2 10^-8}, AxesLabel -> {u, d}]

FindRoot[s[u], {u, 2.2}]
{* {u -> 2.25542} *}

The second case is similar

x[k_] := If[k == 0, 0, 1/(2*(n – k + 1))]
chi[k_] := 16*(Cos[(n – k + 2) Ï€/(2*(n – k) + 5)])^4 –
12*(Cos[(n – k + 2) Ï€/(2*(n – k) + 5)])^2 + 1

with a zero at 3.20177.



@Khadija, why don’t you try running it yourself? Also, I removed a comment asking to be e-mailed the results; this is considered disrespectful.
– J. M.♦
Jun 14 ’15 at 20:51



I am sorry if I caused any disturbance. I tried with my Mathemtica version but it didn’t work that’s why I asked to compile this one by someone who has a more advanced version than the mine.
– Khadija Mbarki
Jun 14 ’15 at 21:37



@KhadijaMbarki No harm done from my perspective. You might wish to delete your three Comments containing significant amounts of code, however. Slide the cursor to the right of the end of a comment to see a red “x” that allows deletion. I do hope that you become an active contributor to StackExchange. Best wishes.
– bbgodfrey
Jun 14 ’15 at 22:12