# How would I go about solving this?

Posted 10 years ago
6151 Views
|
5 Replies
|
3 Total Likes
|
 g(c)=a * e^bc + dg(0) = 0; so a - d = 0g(0.1) = 1g(1) = 100As you can see all I have is mostly the desired results I want. The author of the problem managed to use Mathematica to find real values for the abd members. Can someone tell me how should I go about doing that?
5 Replies
Sort By:
Posted 10 years ago
 Oh, palm slap to forehead. I flubbed the original question: I was using g[100]==100.I obviously gave up on Solve too quickly!  root = (100 - (-1 + E^(100 b))/(-1 + E^(b/10))) /. Exp[b val_] -> expB^val  Timing[sol = Solve[root == 0, expB, Reals];]  (*{29.136395, Null}*)  Log[expB /. N[sol]]  -0.100499
Posted 10 years ago
 @ Shenghui: I hope, that it's not necessary for an M-newbie to understand, why and how -M- does this, after changing 0.1 to 1/10@ W. Craig: obviously you've done something completely different ...I wish all of you a happy new year!, Peter
Posted 10 years ago
 If you replace the 0.1 with 1/10 in Illian's expression, you probably will have a more symbolic expression: This is to say that the Mathematica knows this expression requires a root of a 10th degree polynomial. Use N[...] to turn the Root object into numerics.
Posted 10 years ago
 Solve should be able to handle this, e.g. g[c_] = a E^(b c) + d;Solve[{g[0] == 0, g[0.1] == 1, g[1] == 100}, {a, b, d}, Reals]
Posted 10 years ago
 Hello Turda,I believe that a numerical solution is the only way to go with this one.Here is a method with the correct syntax (it should be a good excercise for you to figure out the what the syntax is doing from the results). I've put in several steps here so you can see what is going on.  It will more instructive if you evaluate this one statement at a time. gc = a Exp[b c] - a  eqs = {1 == gc /. c -> 1/10, 100 ==  gc /. c -> 100 }  Simplify[eqs[[2]] /. Solve[eqs[[1]], a]]  Plot[100 - (-1 + Exp[100 b])/(-1 + Exp[b/10]), {b, -0.2, -0.05}, PlotRange -> {-1, 1}]  FindRoot[100 - (-1 + E^(100 b))/(-1 + E^(b/10)), {b, -0.1}](*{b -> -0.100499}*)You can find the value of a by using the rule: b -> -0.100499Because the function changes so rapidly around values of b=0, it is helpful to plot the function so that you can give the numerical root finding technique a bit of help.