Group Abstract Group Abstract

Message Boards Message Boards

0
|
2.5K Views
|
1 Reply
|
0 Total Likes
View groups...
Share
Share this post:

Rewrite an expression in a specific form

Posted 10 years ago

Hello. I am relatively new to Mathematica so I am not completely aware of all it's able to do. I have an expression that looks as follows:

n + (a*x+b)^c

Where 'a', 'b', 'n', and 'c' are constant numbers, and the value of 'c' is between 0.5 and 1.5. I would like rewrite this expression such that it will look as follows:

(m*x+n)^k

The final expression can be an approximation of the first expression.

POSTED BY: Alexander Partin

It sounds like a nonlinear fit problem. Here I generate some random points using the starting expression n + (a*x+b)^c and then fit the data using the target expression (m*x+n)^k:

data = With[{a = 1, b = 2, n0 = 3, c = 3/4}, 
   Table[{x, n0 + (a*x + b)^c}, {x, RandomReal[{0, 5}, {10}]}]];
NonlinearModelFit[data, (m*x + n)^k, {m, n, k}, x]
POSTED BY: Gianluca Gorni
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard