# Thread: how to fit data in this curve

1. ## how to fit data in this curve

this is a question that came in final exam
fit the data in this given curve
Y=A^exp(cx)+B^exp(dx)

how to fit any given data in this curve......can any one tell me how to start this question(here you can assume any set of values that we want to fit
i tried but not able to solve the question

2. Originally Posted by reflection_009
this is a question that came in final exam
fit the data in this given curve
Y=A^exp(cx)+B^exp(dx)

how to fit any given data in this curve......can any one tell me how to start this question(here you can assume any set of values that we want to fiti tried but not able to solve the question
What tools do you have?

CB

3. not using any tool....how to calcuate on paper...pls help....using least suqare method

4. Originally Posted by reflection_009
not using any tool....how to calcuate on paper...pls help....using least suqare method
There is not enough information, and it is probably impractical on paper anyway.

CB

5. Y=A^exp(cx)+B^exp(dx)
fit the following data using least sqare methos technique
X=1 2 3 4 5
Y=3 8 15 28 46

where A,B,c,d are constants.......this time our university has setted most toughest quesion paper on numerical analysis....this is one of them a question

6. Originally Posted by reflection_009
Y=A^exp(cx)+B^exp(dx)
fit the following data using least sqare methos technique
X=1 2 3 4 5
Y=3 8 15 28 46

where A,B,c,d are constants.......this time our university has setted most toughest quesion paper on numerical analysis....this is one of them a question

http://mste.illinois.edu/malcz/ExpFit/FIRSTCURVE.html
see the above link. i hope it will be useful....otherwise tell me explain more
i think your problem is noy least square....least squre method is to fit data into a polynomial....you are looking for exponential curve fitting...you can google it and find more information

7. My guess is that perhaps you cannot "assume any set of values that we want to fit".

For example if there are 4 or fewer points to fit to then it is possible to get an exact match. If there are more points then it will be an approximation (except for in special cases).

There may be some clues in that data that you have missed such as the value for y(0) or y'(0), zero crossings or turning points.

I suggest posting the data from the original question.

8. could you give me any gusses how to solve the equation......?just make a equations afterthat i will try to solve it

9. Put $C=e^c$ and $D=e^d$, then you want to minimise:

$O(A,B,C,D)=\sum_{i=1}^5 (Y_i-(AC^i+BD^i))^2$

Which can in principle be done with pencil and paper, but I would rather not.

CB

10. ## Exponent or Multiplication?

Do you mean $Y=A^{e^{cx}}+B^{e^{dx}}$, or $A e^{cx}+B e^{dx}$?

11. Originally Posted by Ackbeet
Do you mean $Y=A^{e^{cx}}+B^{e^{dx}}$, or $A e^{cx}+B e^{dx}$?
Good point, that is what the OP writes (but I would still bet what I posted is what he meant - at least until they say otherwise).

That the data looks very like a polynomial does not help either.

CB

12. ## A Start

Assuming the multiplication is implied, and you have a data set $\{x_{i},y_{i}\}$ for $i=1,\dots,n$, and the assumption is that $y=A e^{cx}+B e^{dx}$, then you want to set up your least squares parameter as follows:

Let $\Delta=\sum_{i=1}^{n}(y_{i}-(A e^{c x_{i}}+B e^{d x_{i}}))^{2}$.

Then you set

$\frac{\partial\Delta}{\partial A}=\frac{\partial\Delta}{\partial B}=\frac{\partial\Delta}{\partial c}=\frac{\partial\Delta}{\partial d}=0$, and solve for A, B, c, and d.

This basic idea is how all least squares fits work.