# Homework Help: Question Least Square

1. Jun 30, 2010

### juaninf

Hi all,

I am solving this http://rinconmatematico.com/foros/index.php/topic,35055.0.html", please i want one advice to solver this exercise, because I saw where it exercises only have one tabela, and and ask me to find the coefficients but this exercise have recurrence equation, this is my problem

Last edited by a moderator: Apr 25, 2017
2. Jun 30, 2010

### Staff: Mentor

Welcome to the PF. Could you please translate the text of the attachment? We will need an English translation in order to be of help. Also, could you please show us your attempt at solving the problem? We need to see your try before we can be of much tutorial help.

Last edited by a moderator: Apr 25, 2017
3. Jun 30, 2010

### juaninf

This is a problem :

Ordinary differential equation not linear in the variable $$\varphi$$ given by
$$\frac{d\varphi}{dt} = (a-b\varphi)\varphi$$

where $$a$$ and$$b$$ are parameters of the model. Because these parameters are unknown seeks to adjust them so that the response of the model to represent a sequence of observed data on $$\varphi$$ . Table 2(attach)gives information on how $$\varphi$$ varies with time $$t$$

Assume that it is acceptable to approximate the differential equation to describe the evolution of $$\varphi$$ by the following equation.

$$\varphi_{n+1} = (1+a\Delta t-b\Delta t\varphi_n)\varphi_n$$

which is derived from considering $$\frac{d\varphi}{dt} \approx \frac{\varphi_{n+1}-\varphi_{n}}{\Delta t}$$ where $$\Delta t$$ represents the passage of time between $$t_{n+1}$$ e $$t_{n}$$ e to consider $$\varphi \approx \varphi_n$$ on the right side of the equation

Determine the parameters $$a$$ and $$b$$ by the method of least squares with polynomial approximation of degree 2 and 3. Compare the results that the model gives for $$t = 80$$$$t = 100$$ in both cases

I able to find only with table(whitout this formula $$\varphi_{n+1} = (1+a\Delta t-b\Delta t\varphi_n)\varphi_n$$), coefficient of grade 2 and 3 but, i don't know that more make

#### Attached Files:

• ###### 1.jpg
File size:
7.2 KB
Views:
99
Last edited: Jun 30, 2010
4. Jun 30, 2010

### juaninf

understand me? :(

5. Jun 30, 2010

### Dickfore

This equation is simple enough that it can be solved by separating the variables and the integrals are expressible in terms of elementary functions.

6. Jul 1, 2010

### juaninf

How,... please, no solve all problem only the principe, because i have use a recorrencia formule...and least square method

Last edited: Jul 1, 2010
7. Jul 1, 2010

8. Jul 2, 2010

### Dickfore

Ok, first of all, if you scale your independent variable:

$$t = \tau \, t' \Rightarrow \frac{d}{dt} = \frac{1}{\tau} \, \frac{d}{dt'}$$

and you shift and scale your dependent variable:

$$\varphi = \varphi_{0} + K \, y \Rightarrow d\varphi = K \, dy, \ y = y(t')$$

$$\frac{K}{\tau} \, y' = (\varphi_{0} + K \, y) \, (a - b \, \varphi_{0} - b \, K \, y)$$

You impose the conditions:

$$\left\{\begin{array}{rcl} \varphi_{0} & = & K \\ a - b \, \varphi_{0} & = & b \, K \\ \frac{K}{\tau} & = & b \, K^{2} \end{array} \right.$$

that you need to solve for the arbitrary parameters you introduced $\varphi_{0}, K, \tau$. The conditions were chosen such that your differential equation takes a simple form:

$$\frac{d y}{d t'} = 1 - y^{2}$$

This ODE can be solved by the method of separation of variables:

$$\frac{d y}{1 - y^{2}} = d t'$$

$$\int{\frac{d y}{1 - y^{2}}} = t' + C_{1}$$

where $C_{1}$ is an arbitrary integration constant that needs to be determined from the initial conditions of the problem (of course, translated in terms of $(t' , y(t'))$ instead of $(t, \varphi(t))$). The integral on the rhs can be evaluated by expanding the rational function in partial fractions and you should try and do it on your own.

9. Jul 2, 2010

### juaninf

thanks!!...but least square method and table atach that i put, i have that use

10. Jul 2, 2010

### Dickfore

yeah, i know, but you have to do your own work. Also, your English is incomprehensible.

11. Jul 2, 2010

### juaninf

I know that my english is ugly sorry!!!, but i want solve this problem with a table and recorrence formula, not on way analytic

12. Jul 2, 2010

### Dickfore

then try and solve it and post your attempt.

13. Jul 2, 2010

### juaninf

if I had no recurrence formula, I can solve and find $$\varphi_n$$ without a y b parameters with least square method, but the recurrence formula from differential equation is I not know how to use it together for the polynomial approximation by least square method of degree 2 and 3 as stated in the exercise