Aaron's Homepage Forum
Aaron's Homepage Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Miscellaneous
 Lounge
 Math question
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

wasssup1990
Nobel Prize Winner

A Land Down Under
2261 Posts

Posted - Jan 29 2010 :  10:54:23 AM  Show Profile  Visit wasssup1990's Homepage  Reply with Quote
This might not be the best place to ask this question but I'll give it a shot.
What do you call a function that depends on itself?

Like a(t):
a(t) = sin(t)*a(t)

I don't know if this is valid in the mathematics world but I have been able to do it before or at least something that looks similar to this.

Thanks

When one person suffers from a delusion it is called insanity.
When many people suffer from a delusion it is called religion.

codingplanet
Mad Scientist

United Kingdom
195 Posts

Posted - Jan 29 2010 :  3:02:27 PM  Show Profile  Visit codingplanet's Homepage  Reply with Quote
I would say it is recursion or maybe a recursive function.

Edit: It is valid mathematical syntax (if that makes sense)

Edited by - codingplanet on Jan 29 2010 3:03:56 PM
Go to Top of Page

wasssup1990
Nobel Prize Winner

A Land Down Under
2261 Posts

Posted - Jan 29 2010 :  8:16:26 PM  Show Profile  Visit wasssup1990's Homepage  Reply with Quote
Thanks codingplanet.

I'm using a symbolic mathematics toolbox that comes with MATLAB called MuPAD.

a(t) := sin(t)*a(t):
f := plot::Function2d(a(t), t=0..10):
plot(f):

This won't yield a result because a(t) initially equals 0. I prefer to stick with continuous mathematics in my models and I don't want go discrete like I did with my physics simulator. Like where the force on an atom depends on the distance between the atoms. This can be considered recursive because the position of the atoms depends on the force applied to the atoms over time and then your feeding back the distance of the two atoms to recalculate the force vectors for the two atoms again.

So I looked up recursive functions as you mentioned and it seems to define what I am looking for.

I think I'll have to show you the actual problem that I have created at hand to see how we can fix it. I would really appreciate it if you could help me out.

Let me organize myself and I'll post it here.

Do you have MATLAB?

When one person suffers from a delusion it is called insanity.
When many people suffer from a delusion it is called religion.
Go to Top of Page

wasssup1990
Nobel Prize Winner

A Land Down Under
2261 Posts

Posted - Jan 29 2010 :  9:12:24 PM  Show Profile  Visit wasssup1990's Homepage  Reply with Quote
I have left out some parts and only included the necessary. You can see what depends on what.



Initial Conditions
tsim := 10:
pxi := 5:
pyi := 5:
vxi := 0.1:
vyi := -1:
m := 1:
Fxi := 0:
Fyi := 0:

Fx(t) := Fxi;
Fy(t) := Fyi;



Acceleration of particle
ax(t) := Fx(t)/m;
ay(t) := Fy(t)/m;



Velocity of particle
vx(t) := int(ax(t), t=0..t) + vxi;
vy(t) := int(ay(t), t=0..t) + vyi;



Position of particle from origin
px(t) := int(vx(t), t=0..t) + pxi;
py(t) := int(vy(t), t=0..t) + pyi;



d(t) := sqrt(px(t)^2 + py(t)^2);
d2(t) := diff(d(t), t);



Force on particle
Fx(t) := d2(t);
Fy(t) := 0;


When one person suffers from a delusion it is called insanity.
When many people suffer from a delusion it is called religion.
Go to Top of Page

codingplanet
Mad Scientist

United Kingdom
195 Posts

Posted - Jan 31 2010 :  3:36:22 PM  Show Profile  Visit codingplanet's Homepage  Reply with Quote
I've never used Matlab and to be honest I'm rather lost. I don't know where/what the problem is and I don't think I can help you, sorry.
Go to Top of Page

wasssup1990
Nobel Prize Winner

A Land Down Under
2261 Posts

Posted - Jan 31 2010 :  7:22:13 PM  Show Profile  Visit wasssup1990's Homepage  Reply with Quote
That's okay, thanks for trying to help anyway.

When one person suffers from a delusion it is called insanity.
When many people suffer from a delusion it is called religion.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Aaron's Homepage Forum © 1995-2020 AARONCAKE.NET Go To Top Of Page
This page was generated in 0.09 seconds. Snitz Forums 2000