> Dear all, > > I am really new to Mathematica. > > I have two questions, please. > > 1. How to replace a variable in a function? > > I have defined: > > f[r_] := Log[((2*\[Lambda])/(\[Kappa]*r* > Cos[\[Lambda]*Log[(r/RM)]]))^2]
Replace r with Exp[u]/Kappa and then it is now f[u_]
The above does not give zero for constant numerical values assumed for RM and lambda, so may not be correct. The solution is in terms of Log and Tanh functions using DSolve.
> RM, lambda >0 > > I want to replace r with u given by > > u=log[Kappa*r] > > I did it by hand but whant to check my result. > > > 2. How to check or solve the differential equation:
It is better to use NDSolve at first numerically check for zero right hand side of equation, then DSolve analytically next. > > f"[u]=0.5*exp[2*u+f[u]] > > It would be sufficient for me to insert f[u] and see > if both sides are > the same. So far I failed. > > Thank you for your help. > > Regards > Blue >