1
$\begingroup$

I have defined function below want to calculate its Numerical differential using NDSolve.

x=A*Exp[-Log[y]^2];

f[x_]:= x*(1-x);

If i want to look at the change of $f[x]$ with respect to $x'[y]$ using NDSolve. what i have to do??

$\endgroup$
  • $\begingroup$ You can format inline code and code blocks by selecting the code and clicking the {} button above the edit window. The edit window help button ? is useful for learning how to format your questions and answers. You may also find this meta Q&A helpful $\endgroup$ – Michael E2 Dec 7 '16 at 15:48
  • $\begingroup$ do not use capital D as a symbol, it is reserved. Additionally you can not use bars | for absolute value, use Abs and nabla has no special meaning. $\endgroup$ – george2079 Dec 7 '16 at 16:51
  • $\begingroup$ on top of the syntax issues your equation is algebraic in k so why are you trying to use NDSolve ? $\endgroup$ – george2079 Dec 7 '16 at 16:59
  • $\begingroup$ y cannot be both a real number (independent variable) and a function head (dependent variable), which is what is happening in your code. There's a formula in calculus for y'[x] in terms of x'[y] -- you should probably try that. $\endgroup$ – Michael E2 Dec 7 '16 at 19:15
  • $\begingroup$ @george2079 first of all thank u so much for bothering, I edited my question. can u still guide. $\endgroup$ – Amanullah Malik Dec 7 '16 at 19:30
1
$\begingroup$
x[y_] = A*Exp[-Log[y]^2]
f[y_] = x[y]*(1 - x[y])

The derivative of f[y] with respect to some function g[y] is simply

 D[f[y],y]/D[g[y],y]

so the derivative with respect to the derivative of x[y] is :

 result[y_]=D[f[y],y]/D[x[y],{x,2}] //FullSimplify

-(((1 - 2 A E^-Log[y]^2) y Log[y])/(-1 + Log[y] + 2 Log[y]^2))

checking..

 A = 1
z[y_] = D[x[y], y]
ParametricPlot[ {z[y], f[y]}, {y, .01, 10}, AspectRatio -> 1, 
 PlotRange -> {{-3/4, 2}, {-1/4, 1/2}}, 
 Epilog -> (Arrow[{{z[#], 
        f[#]}, {z[#], f[#]} + .1 Normalize[{1, result[#]}]} ] & /@ 
    Range[.05, 10, .1])]

enter image description here

$\endgroup$
  • $\begingroup$ thanku so much, I think it works for me, and if I had $x[y]$ is so complicated that it's always on running. so preferably do $NDSolve$ than what changes i required. $\endgroup$ – Amanullah Malik Dec 7 '16 at 20:01
  • $\begingroup$ maybe you want ND reference.wolfram.com/language/NumericalCalculus/ref/ND.html . ( I still don't get at all why you want to use NDSolve ) $\endgroup$ – george2079 Dec 7 '16 at 20:08
  • $\begingroup$ actually my calculation is lengthy in someway, Further I have to define a function such as $k[y]$, which is sum of different different derivatives as given above, and at the end i have to integrated. If I do this analytically my mathematica running and no answer, but If I do it numerically within a range, it will be conclusive. I hope. $\endgroup$ – Amanullah Malik Dec 7 '16 at 20:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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