Items tagged with function function Tagged Items Feed

sol := dsolve([ode2, theta(0) = (1/180)*Pi*10, (D(theta))(0) = 0], numeric)

sol(0)

[t = 0., theta(t) = .174532925199433, diff(theta(t), t) = 0.]

given a numerical solution in the above form, how can I integrate a function

f(theta(t)) numerically?

I tried to isolate theta(t) first:

x:=t->rhs(op(2,sol(t)))

But I can't integrate

phi:=t->int(x(t),t=0..t)

Hi everyone, I'm trying to find the value of f but I always have this error message : Error, (in BesselJ) too many levels of recursion.

Here is the function:

f(t)=BesselJ(0, t)+int(BesselJ(0, x)*f(t-x), x = 0 .. t)

 

Is there any way that I can isolate my f without having to rewrite the equation using laplace transform properties?

Thanks,

Frank

I need help writing a function which takes a number of integers (which are greater than or equal to 2) and returns a list where the nth entry in the list is given by the number of arguments which can be expressed in the form of x^n where x is an integer. The function must also disregard all of the terms after the final integer greater than 0 is produced ie does not show 0, 0, 0, 0, at the end of the list.

Eg if f was the function f(27) = [1,0,1]

f(2,3,4,9,81,1024) = [6,4,0,1,1,0,0,0,0,1]

I define a func

f(x,y):=piecewise(x=0 and y=0,139 ,x=1 and y=0,144,x=2 and y=0,149,x=3 and y=0,155,x=4 and y=0,155,x=5 and y=0,155,x=6 and y=0,155,x=7 and y=0,155,x=0 and y=1,144,x=1 and y=1,151,x=2 and y=1,153,x=3 and y=1,156,x=4 and y=1,159,x=5 and y=1,159,x=6 and y=1,159,x=7 and y=1,159,x=0 and y=2,150,x=1 and y=2,155,x=2 and y=2,160,x=3 and y=2,163,x=4 and y=2,158,x=5 and y=2,156,x=6 and y=2,156,x=7 and y=2,156,x=0 and y=3,159,x=1 and y=3,161,x=2 and y=3,162,x=3 and y=3,160,x=4 and y=3,160,x=5 and y=3,159,x=6 and y=3,159,x=7 and y=3,159,x=0 and y=4,159,x=1 and y=4,160,x=2 and y=4,161,x=3 and y=4,162,x=4 and y=4,162,x=5 and y=4,155,x=6 and y=4,155,x=7 and y=4,155,x=0 and y=5,161,x=1 and y=5,161,x=2 and y=5,161,x=3 and y=5,161,x=4 and y=5,160,x=5 and y=5,157,x=6 and y=5,157,x=7 and y=5,157,x=0 and y=6,162,x=1 and y=6,162,x=2 and y=6,161,x=3 and y=6,163,x=4 and y=6,162,x=5 and y=6,157,x=6 and y=6,157,x=7 and y=6,157,x=0 and y=7,162,x=1 and y=7,162,x=2 and y=7,161,x=3 and y=7,161,x=4 and y=7,163,x=5 and y=7,158,x=6 and y=7,158,x=7 and y=7,158)

It is really a chore . By the way , is there more concise way to definition of the same effet as this ? 

then I type:

sum(f(0, y), y = 0 .. 7) 

Maple just respond me a 0 

why ?

I need to create a function from one list to another, but I don't want to define an operation.  I only want to assign a 1-1 mapping from a list of 64 elements to another list of 64 elements, i.e. the 1st element in list a is assigned to the 1st element in list b, etc.  I see plenty of examples of how to do this with an operation, but I don't want the mapping to perform any operation, just the mapping.  How is this done?

Please have a visit of this qestion `http://math.stackexchange.com/q/574843/8581`. I did a very elementary attempt there for example for a function:

 > with(plots):
      h := x->piecewise(x < -2, x+3, x <= 2, 5-x^2, 3-x):
      t:=x->h(-x):
      a:= plot(h(x), x = 0 .. 10, color = red, thickness = 3):
      b:= plot(t(x), x = -10 .. 0, color = green, thickness = 3):
      display(a,b);

But  I am eager to know  the formal codes if they exists. Thanks for your time.

I can't seem to find what's wrong with this function:

F:= x-> (-c-ax)/b;
G:=x-> (-d-ex)/f;
If -a/b = -e/f then print (false) else print (true); end if;

Hello,

For a control systems project I'am working on I need to minimize the actuator effort required to control an input voltage to certain output voltage. As a first experiment I chose a sinusoidal input ug and a sinusoidal output ul. The function to minimize is the funtion Uint. We know that when both the input voltage and output voltage share the frequency, phase and amplitude, that the control effort is zero. Running the animation (see Maple input below) shows that if the input and output voltage frequencies approach eachother the function Uint goes to zero. However, if the frequencies exactly match and I evaluate the function Uint I get a devision by zero notification (this could already be seen from the function of Uint). How can I solve this?

restart

with(plots):

u[G] := sin(omega[G]*t)

u[L] := sin(omega[L]*t)

U[int] := int((u[G]-u[L])^2, t)

omega[G] := 9:

animate(plot, [[u[G], u[L], (1/10)*U[int]], t = 0 .. 5, legend = ["Public grid voltage", "Local grid voltage (control goal)", "Cum. Actuator voltage (scaled)"]], omega[L] = 8 .. 10, gridlines = true, labels = ["Time [s]","Voltage [V]"], labeldirections = ["horizontal", "vertical"], labelfont = ["ARIAL", "bold", 12])

omega[L] := 9; t := 10; evalf(U[int])

NULL

 

Download 20131109_Division_by.mw

 

Thanks

Is there any way to write a function that determines the area of any n-sided polygon determined by a sequence of points? ie [[x_1, y_1]. [x_2, y_2], ... [x_n, y_n]] while returning 0 if any of the 2 segments intersect, otherwise print the area. Thanks for any help

I've been on this question a week now and still no conclusive answer! What I need is a function that produces the inequalities that determine a triangle given the 3 points and then using a 4th point, prints true if the 4th point satisfies 2 or 3 or the inequalities and prints false if it only satisfies 1 or none of the inequalities. I need to have this solved by tonight so any quick help would be greatly appreciated!

Consider the curve defined by f(x, y) = 3+2x+y+2x^2+2xy+3y^2 = 0.Locally on the curve we can view y as a function of x, i.e. y = y(x).Compute formulas for the first and second derivative of y with resoect to x.

Hi

I have entered two functions and got a solotion for them:

Now i want to know if there is someway Maple can do this automaticly:

 

So that i not have to do like i did here, manuel copy-paste the values into the function, or re-enter them.

 

Using Maple 17.02 on Windows 64-bit, but i guess that makes no differance, since it's java :) 

 

Try makeing it simple, i'm new with Maple.

 

Thanks in advance!

Emil Kristensen

 

after composite

test5 := subs(y=-q/p, subs(x=-q/p, x+y));
test6 := subs(p=x,subs(q=y,test5));

how to recover test6 := -2*y/x back to x+y with y/x or x/y;

I am trying to plot a function f(x).  Within the definition of f(x) I have some parameters, e.g., a, b, c tha have been defined.  Then these three parameter define a new parameter R.

The function is f(x)=R x.

 

 

a := 1;              Define a
1

b := 2;              Define b
2


c := 3;               Define c
3

R = a+2*b+3*c; Define R from a, b, c

R = 10 + 2 b~ (it should had given me 14)

F(x):=R*x;  Define the function
x -> R x


plot(R*x, x = -5 .. 5);   RECEIVE ERROR
Warning, expecting only range variable x in expression R*x to be plotted but found name R

 

 

I also tried to define R as R(a,b,c) and then F as F(R,x)...

but still it doesnot work.

Can anyone direct me to the right solution?

 

Thanks in advance.

NM

command vs function...

October 27 2013 stasya 15

In some tutorials for certain "Maple-words" a name "command" is used, while others use "function".

What is the difference between "function" and "command" in Maple?

3 4 5 6 7 8 9 Last Page 5 of 20