## 20 Reputation

8 years, 287 days

## Thanks!!!...

@Preben Alsholm Finally it stopped with the errors Thank you. Also sorry for not noticing the from there. I wanted to ask though the #Notice 100*y, why would you times it by 100. To make the line more visible or something like that?

## The Project...

@Preben Alsholm I apologize for being too vague and making you overworked yesterday. So basically

a= Is the growth rate of the prey (Elk)

b= rate at which the predator is successful to hunt the prey

beta= This is the death rate of the predator

c= Is the sussesfulness of the predator in terms of food consumption

k= Carrying capacity

Also I used data about the wolf project in yellowstone from 2010 given to to present day, in order to come up with an estimate of the parameters. is 6000 because thats the number of Elk the Northern area of YNP started the year 2010. The same reason goes for beign 40. Now I meant  to say t= 0..40 (amount of time I want to predict the relationship). The first help you gave me actually gave me satisfactory results, since it was neat and resembled, for most part, the years from 2010 to 2014.

sys := (D(x))(t) = a*x(t)-a*x(t)^2/k-b*x(t)*y(t), (D(y))(t) = -beta*y(t)+c*x(t)*y(t);

res := dsolve({sys, x(0) = 6000, y(0) = 40}, numeric, parameters = [a, beta, k, b, c]);

res(parameters = [a = .71780, beta = .3067, b = 0.2072e-1, c = 0.9e-4, k = 20000]);

plots:-odeplot(res, [[t, x(t)], [t, y(t)]], 0 .. 40);

plots:-odeplot(res, [x(t), y(t)], 0 .. 30, view = [0 .. 7000, 0 .. 60])

#Thanks!!!!

However I still cannot make the dimensionless variables work. The lates help gives some errors. I even played around with it yesterday but I still got the same results. I will locate the errors where I highly believe they orginate.

restart;

sys := (D(x))(t) = a*x(t)-a*x(t)^2/k-b*x(t)*y(t), (D(y))(t) = -beta*y(t)+c*x(t)*y(t);

params := [a = .71780, beta = .3067, b = 0.2072e-1, c = 0.9e-4, k = 17000];

sol := dsolve({eval(sys, params), x(0) = 6000, y(0) = 40}, numeric);

plots:-odeplot(sol, [[t, x(t)], [t, 100*y(t)]], 0 .. 100, size = [1000, 300]);

# Error, (in plot/options2d) unexpected option: size = [1000, 300] (I know this one is not bad at all)

sol(100);

eqs := {T = 1/beta, X = k/(a*T), Y = beta/b, a = B*beta, k = a*A/c};

params := solve(eqs, {A, B, T, X, Y});

paramsConc := [a = .71780, beta = .3067, b = 0.2072e-1, c = 0.9e-4, k = 17000];

ABTXY := eval(params, paramsConc);

res := dsolve({SYS, u(0) = u0, v(0) = v0}, numeric, parameters = [u0, v0, A, B]);

# Error, (in dsolve/numeric/process_input) system must be entered as a set/list of expressions/equations

L := subs(ABTXY, [6000/X, 40/Y, A, B]);

res(parameters = L);

input := subs(ABTXY, [[[tau, X*u(tau)], [tau, 100*Y*v(tau)]], tau = 0 .. 100/T]);

plots:-odeplot(res, op(input), size = [1000, 300]);

# Error, (in plots/odeplot) input is not a valid dsolve/numeric solution

If you need more information that is needed to make this work I will tell you. I am grateful for the help man, thanks. I just want to see how dimensionless variable will work for this scenario.

## Final Help (I Think)...

@Preben Alsholm So thanks to you now I got new information on how to improve the project by introducing dimensionless variables. I get it that by using dimensionless variables it reduces the number of times I might have to solve the equation numerically. However, I still have struggle with the program. I tried to introduce my parameters to the method you provided before, but I had no luck. I tried to plug them in the method and even answer for T,X,Y,A,B but did not see any noticeable results or some errors. So I will really apreciated if you can show the method by incorporating my parameters.

parameters = [a = .71780, beta = .3067, b = 0.2072e-1, c = 0.9e-4, k = 17000]

t= 40

x= 6000

y=40

## Side Note...

@Preben Alsholm Also forgive me but I decided to take the parameter g out since i could not get concrite data for it. So it will look like this right?

sys:=D(x)(t)=a*x(t)-a*x(t)^2/k-b*x(t)*y(t), D(y)(t) = -beta*y(t)+c*x(t)*y(t);

PDEtools:-dchange({x(t)=X*u(tau),y(t)=Y*v(tau),t=T*tau},{sys},[tau,u,v]);

solve(%,{diff(u(tau),tau),diff(v(tau),tau)});
SYS1:=collect(%,[u,v],distributed,factor);

eval(SYS1,X=k/(a*T));
eval(%,T=1/(beta));
eval(%,Y=(beta)/b);
eval(%,k=(a/c)*A);
SYS:=op(eval(%,a=B*(beta)));

Please correct any mistakes if any.

## Dimensionless Variables...

@Preben Alsholm I am not quite exictly understanding the parameter B and A. Are they the result of an operation previously mentioned or i can choose them just like X,Y,T.

## ODE...

@Preben Alsholm Thanks for the fast reply yesterday. Currently I am working with the system you provided and it is working perfectly. I also wanted to tell you that I made a mistake in my first post by giving the parameter when I really meant alpha. I made the correction and again it works. So thank you for helping me.

I might need more help with this project in the future so I trust you can help me again.

 Page 1 of 1
﻿