# Working with differential equations to obtain a function

• ver_mathstats
In summary: P matrix, and multiply it by y0, then multiply it by the inverse of your matrix Pand then you should get a matrix of constants, where each respective row corresponds to a value in your vector yso to get the equation for your hawk population, you would usey = c1*e^(lambda1*t)*x1 + c2*e^(lambda2*t)*x2 + c3*e^(lambda3*t)*x3 + c4*e^(lambda4*t)*x4where lambda1 is the largest eigenvalue corresponding to the first eigenvector x1, and so on for the rest of the constants, eigenvectors, and eigenvalues.
ver_mathstats

## Homework Statement

On a certain island, there is a population of snakes, foxes, hawks and mice. Their populations at time t are given by s(t),  f (t), h(t), and m(t) respectively.

The populations grow at rates given by the differential equations

s'
=(8/3)s - f - (1/3)h - (1/6)m
f'=(2/3)s + f - (1/3)h - (1/6)m
h'=(2/3)s + 0f + (2/3)h - (1/6)m
m'=(46/3)s - 4f + (1/3)h - (11/6)m

Putting the four populations into a vector y(t)  =  [s(t)  f (t) h(t) m(t)]T, this system can be written as y′  =  Ay.

Consider the initial population y(0)  =  [14 12 11 94]T. Solve for constants c1 through c4 in order to write y(0)=c1x1 + c2x2 + c3x3 + c4x4, where x1 to x4 were the eigenvectors.

Based on the system of differential equations from Problem 1, with the initial population from problem 2, find the function for the population of hawks, h(t).

## The Attempt at a Solution

I am struggling to find the function for the populations of hawks. I know the eigenvalues are -1, 2, 1/2, 1.
The values of c1, c2, c3, c4 are 2, 1, 8, 3 respectively. Values of c1, c2, c3, c4 are constants in the equation:

y(0)=c1x1 + c2x2 + c3x3 + c4x4, where x1 to x4 were the eigenvectors.

So I know h'=(2/3)s + 0f + (2/3)h - (1/6)m.

I know that y=c1eλ1tx1+...+cneλntxn.

Does that mean I have to use h'=(2/3)s + 0f + (2/3)h - (1/6)m and make it so that it fits the equation above?

I am also doing this on Matlab.

Thank you.

Last edited:
Do you know how to solve this by finding the eigenvalues and eigenvectors of the matrix A?

You would do better to put brackets around your fractions so that it is immediately clear (which it wasn't to me) that this is just a standard linear differential equation in four variables.

There are people here with sufficiently frequent practice in these things to be able to guess what you are not saying like what are the c's, and how does that sentence with "in order to write" end, I'm not sufficiently so to be able to guess and answer in the time I have.
But probably you have to put t = 0 into solutions you say you have which should give you something on the one hand something corresponding to the y(0) vector on the other, maybe via a linear algebraic equation.

Chestermiller said:
Do you know how to solve this by finding the eigenvalues and eigenvectors of the matrix A?
I used [P,D] = eig(A) to find the eigenvectors and the eigenvalues of matrix A. But I am not entirely sure how to solve this using those values and vectors.

ver_mathstats said:
I used [P,D] = eig(A) to find the eigenvectors and the eigenvalues of matrix A. But I am not entirely sure how to solve this using those values and vectors.
You do this using your own equation: y=c1eλ1tx1+...+cneλntxn

epenguin said:
You would do better to put brackets around your fractions so that it is immediately clear (which it wasn't to me) that this is just a standard linear differential equation in four variables.

There are people here with sufficiently frequent practice in these things to be able to guess what you are not saying like what are the c's, and how does that sentence with "in order to write" end, I'm not sufficiently so to be able to guess and answer in the time I have.
But probably you have to put t = 0 into solutions you say you have which should give you something on the one hand something corresponding to the y(0) vector on the other, maybe via a linear algebraic equation.
My apologies, I think I fixed those now. Thanks for the reply.

Chestermiller said:
You do this using your own equation: y=c1eλ1tx1+...+cneλntxn
Okay thank you, would I have to be using just that equation? Where would the hawk equation come in? Or does it not? y=2e-tx1 + 1e2tx2 + 8e0.5tx3 + 3e1tx4 is what I have obtained so far using y=c1eλ1tx1+...+cneλntxn.

A = [ fill this in]
and find the eigenvalues and eigenvectors using
[P, D] = eig(A)
if you have an initial vector insert that using
y0 = [ given vector ]'
create a new matrix, P, by ordering the column vectors based on their eigenvalues (largest to smallest) w the format
x1 = P(:, # of column w largest e.value /P(1, same number <-)
for each row of your matrix
compile that into a new matrix
P = [x1 x2 x3 x4]
here since the question is asking the largest value in the fourth row, that value in your matrix will be the answer
and to solve for the constants from your initial value, use
c = inv(P)*y0

Welcome to the PF (cute avatar, BTW)!
curious_ said:
A = [ fill this in]
and find the eigenvalues and eigenvectors using
[P, D] = eig(A)
if you have an initial vector insert that using
y0 = [ given vector ]'
create a new matrix, P, by ordering the column vectors based on their eigenvalues (largest to smallest) w the format
x1 = P(:, # of column w largest e.value /P(1, same number <-)
for each row of your matrix
compile that into a new matrix
P = [x1 x2 x3 x4]
here since the question is asking the largest value in the fourth row, that value in your matrix will be the answer
and to solve for the constants from your initial value, use
c = inv(P)*y0
Please keep in mind that the student must do the bulk of the work on their homework problems here, so try not to post such detailed instructions for how to do it. Once the student has solved the problem one way, it is okay to post how to solve it a different way, though.

But since this thread is over a year old, the student has likely moved on anyway.

Enjoy the PF!

Chestermiller

## 1. What are differential equations?

Differential equations are mathematical equations that describe how a quantity changes over time. They involve derivatives, which represent the rate of change of a variable.

## 2. Why is it important to work with differential equations?

Differential equations are used to model real-world phenomena in various fields such as physics, engineering, economics, and biology. They allow us to predict how a system will behave over time and make informed decisions based on those predictions.

## 3. How do you obtain a function from a differential equation?

To obtain a function from a differential equation, you need to solve the equation for the dependent variable. This can be done through various methods such as separation of variables, substitution, or using an integrating factor.

## 4. What are the different types of differential equations?

There are several types of differential equations, including ordinary differential equations, partial differential equations, and stochastic differential equations. They can also be classified based on their order, linearity, and the type of function they involve.

## 5. What are some applications of working with differential equations?

Differential equations have numerous applications in fields such as physics, engineering, economics, and biology. They are used to model systems such as population growth, chemical reactions, electrical circuits, and motion of objects. They are also essential in the development of technologies such as control systems and image processing.

• Engineering and Comp Sci Homework Help
Replies
5
Views
1K
• Engineering and Comp Sci Homework Help
Replies
3
Views
2K
• Engineering and Comp Sci Homework Help
Replies
6
Views
1K
• Engineering and Comp Sci Homework Help
Replies
3
Views
1K
• Engineering and Comp Sci Homework Help
Replies
3
Views
911
• Engineering and Comp Sci Homework Help
Replies
6
Views
954
• Engineering and Comp Sci Homework Help
Replies
4
Views
1K
• Engineering and Comp Sci Homework Help
Replies
4
Views
1K
• Engineering and Comp Sci Homework Help
Replies
9
Views
2K
• Calculus and Beyond Homework Help
Replies
7
Views
476