Bending of a bar under load: user defined

In the following three fields you will specify the computation of IE(x), c(x), p(x)
These three independent pieces of code have a common structure: for your computation you might use here variables i,j,k (e.g. for loops or counting), the logicals bool1, bool2 , bool3, a vector of 100 components v(.) , the variables h1,h2,h3,h4 (e.g. for intermediate calculations) which all are initialized with zero resp. false and the constants pi, e, sqrt2 (with their mathematical meaning).
No other variables can be used.
remember the special role of the first 6 columns in these pieces of code!
Here follows the code for IE(x). The input variable name is x, The output must be named IE

Here follows the code for c(x). The input variable name is x. The result must be named c.

And here the code for p(x), the load function. The input variable name is x. The result must be named p.

here you can fix the grid size by selecting the number of interior grid points
n = Important: 2 <= n <= 1000 !

Select the type of boundary conditions:
y(0)=y'(0)=0, y(1)=y'(1)=0
y(0)=y'(0)=0, y''(1)=y'''(1)=0
y''(0)=y'''(0)=0, y''(1)=y'''(1)=0

choose whether to see a printed table of the solution
no table output
print table

Click on "evaluate", in order to submit your input.

back to the theory page

 Back to the top!

27.11.2012