Python Forum
Automatically generate coupled equations from given conditions - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: Homework (https://python-forum.io/forum-9.html)
+--- Thread: Automatically generate coupled equations from given conditions (/thread-8958.html)



Automatically generate coupled equations from given conditions - malusigumede - Mar-14-2018

I would like you to help me create a python code that will automatically generate equations from given conditions for the given function F.



The function is given by:

F(n1,n2)=Ax(n1,n2)+Bx(n1+1,n2)+Cx(n1-1,n2)+Dx(n1,n2+1)+Ex(n1,n2-1)

for n1+n2<N (where 0<n1,n2)

and

F(n1,n2)=Ax(n1,n2)

Example

For n1+n2<=2
F(0,0)=Ax(0,0)+Bx(1,0)+Dx(0,1)
F(1,0)=Ax(1,0)+Cx(0,0)+Bx(2,0)+Dx(1,1)
F(0,1)=Ax(0,1)+Ex(0,0)+Bx(1,1)+Dx(0,2)
F(1,1)=Ax(1,1)
F(0,2)=Ax(0,2)
F(2,0)=Ax(2,0)


RE: Automatically generate coupled equations from given conditions - j.crater - Mar-14-2018

We do not write code for others here. You are welcome to post your attempt at writing the program, and we can assist if you get errors or incorrect results.

Otherwise, if you want to hire someone to do the task for you, this thread will be moved to Jobs subforum.


RE: Automatically generate coupled equations from given conditions - Larz60+ - Mar-14-2018

We don't want to see some one offering homework as a job either.
Be aware that your professor probably uses this site and will notice.