hi
i can not manage to understand what blocks here :
a = DSolve[{y'[x] == x*Log[x], y[1] == 1}, y[x], x];
a[[1]]
g[x_] = y[x] /. a[[1]]
g[1]
Plot[g[x], {x, 0.1, 1}]
it is the same if i replace a[[1]] with a[[1]][[1]]
-
why is it nor accepted as e diff equa ?
-
what is a ? a list of list ???
i found this on a web site ; why does this code works and not mine ?
solution = DSolve[y'[x] == x, y[x], x]
f[x_] = y[x] /. solution[[1]]
sukrause
(Udo Krause)
2
In2:= DSolve[{y’[x] == x*Log[x], y1 == 1}, y[x], x]
Out2= {{y → 1/4 (5 - x^2 + 2 x^2 Log)}}
In[3]:= Dimensions[%]
Out[3]= {1, 1}
and that works
In[5]:= Clear[a]
a = DSolve[{y'[x] == x*Log[x], y[1] == 1}, y[x], x];
In[7]:= a[[1]]
Out[7]= {y[x] -> 1/4 (5 - x^2 + 2 x^2 Log[x])}
In[11]:= g[q_] := (y[x] /. a[[1]]) //. x -> q
In[12]:= g[1]
Out[12]= 1
Observe the SetDelayed in the definition of g and how the variable q enters after the replacement.