Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I reduced a (special case) of my problem to the following code. Even though in this special case all related functions are analytical, DSolve is not the tool for this, though I am indeed looking for a continuous function as a solution.

I am OK with looping over guesses for the function, though as a newbie, I can only give you some pseudocode. Your help would be greatly appreciated.

  1. Guess a g1, say a constant function.
  2. Take a list of points, and solve the given equation for g2[z] for each z in the list, with g2[z] being the value between z and next value in the list, while g1[z] above.
  3. Interpolate over the g2[z]-s to get a new g1, and iterate until g2[z] is close to g1[z] for each z.

Or is this a stupid algorithm?

H = ParetoDistribution[1.18709*10^6, 0.938482]
Hstar = H
k = 10/3
T[z_] = 2/3*z
DSolve[T'[z]/(1 - T'[z]) == 
  k/(z PDF[Hstar, z]) Integrate[(1 - g[zz]) Exp[zz - z] PDF[H, 
      zz], {zz, z, \[Infinity]}], g, z]

Or if I shall proceed another way, what pattern should I exploit? What pattern could Mathematica exploit? And in what construct?

share|improve this question
    
I think you mean DSolve, not RSolve. –  Heike May 20 '12 at 19:04
    
Yes, RSolve is for recursive relations. –  Sjoerd C. de Vries May 20 '12 at 19:06
    
@Heike: Thanks, could you elaborate? Why is this a problem for DSolve? I am not solving for the antiderivative of g, nor do I use a derivative of it. (Though admittedly, the problem is a first-order condition of a calculus of variation problem involving G, the antiderivative.) What am I missing? –  László May 20 '12 at 19:07
1  
This looks more like a mathematical problem, than a Mathematica problem. –  Sjoerd C. de Vries May 20 '12 at 20:19
4  
I'm voting to close this as "Not a Real Question". You should sit down and think of your problem, reduce it to a simple case that captures the essence accurately, try out for yourself in Mathematica, and only then post your question here, and phrase it in a way that the problem and the desired result is clear. Don't take it personally — just try to collect your thoughts first and read the documentation before you try anything out (if you had done this, you would not have used RSolve when you needed DSolve). People here are willing to help, but no one likes to run in circles... –  rm -rf May 20 '12 at 20:19
show 2 more comments

closed as off topic by rm -rf, Sjoerd C. de Vries May 20 '12 at 20:20

Questions on Mathematica Stack Exchange are expected to relate to Mathematica within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

1 Answer

up vote 2 down vote accepted

I think what you're trying to do is to solve $f(z)=h(z)\int _z^\infty dz'\,\left(1-g(z')\right)\rho(z')$ for $g$, with $f$, $h$ and $\rho$ known functions. This is an integral equation.

However, dividing both sides by $h(z)$ (I'm assuming $h\neq0$) and differentiating with respect to $z$ we get $f'(z)/h(z)-f(z)h'(z)/h(z)^2=\rho(z)(g(z)-1)$, which is an algebraic equation for $g$.

So no computation needed.

share|improve this answer
    
mind you I could have mis-transcribed your equation, differentiated incorrectly, misunderstood your problem etc. –  acl May 20 '12 at 19:55
    
this is great, but I think you overlooked \rho depending on z too. Doesn't it mean that a Integrate[(1 - g[zz]) (-1) PDF[H,zz], {zz, z, [Infinity]}] term remains, so I am back to an integral equation? –  László May 20 '12 at 21:01
    
Nope, I'm lucky with the exponential. I get back an extra f(z)/h(z) term only. Great, thanks! –  László May 20 '12 at 21:12
add comment

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