Items tagged with interval

Feed

Hey there folks - I have the following headcracker...

I have 2 equations:

                    cos(a t) = cos(b t + c)
    &   
                    sin(a t) = sin(b t + c)
 

Where a, b and c are known constants, and t is a variable.

I would like to find a way to solve these 2 equations simultaneously, i.e. find the t values that solve both equations at the same time. Of course, there will be an infinite number of solutions, so I also need a way to define an interval that t needs to be restricted to, e.g. t = 0..20 * Pi .

The best I've managed is:
 

   ... but I can't seem to make this work for solving the 2 trig. equations simultaneously

nor can I figure out the syntax for getting all solutions compiled as a list, e.g.

- which would be enormously helpful for further calculations.

Can anyone give some help on this?

Regards,  Matthew

In functions such as fsolve, there is an optional parameter that allows one to specify the interval to perform the function on. Additionally, sometimes, if a solution is left out, one can specify an interval to search on to obtain the missing solution.

How does Maple determine the interval to search on if this is not specified?

 

(Additional Question - you don't have to answer this)

Ultimately, I am asking this question because I have a function for Newton's method; however, it requires an interval to run. I have read that fsolve uses Newton's method, so I am curious how to automatically select such an interval. Does anyone know how to implement such a thing?

Hello,

 

I got two problems creating a 3d-plot. First, as the title mentions, I want to cut out a distinct interval from my 3d-Plot.

For example when the graph is displayd from -y_max to y_max but I just want it to be shown from -y_max to -5 and from 5 to y_max again.

I also got a second question:

Another thing I want to do with this graph is redefining this axis with a parameter which is directly dependant from it.

Like for example I want to redefine the "y" axis with a" k" axis with k=y*2, so that in the end I have th

Let A and B two real closed intervals.
I define b(x) as B+x for any real x ; more precisely, if B=[B1, B2], b(x) = [B1+x, B2+x]

I want to build a function f(x) such that :

  1. if  A and b(x) do not overlap then f(x) = 0
  2. otherwise f(x) is some expression of the covering length


For example : if A=[0, 2] and B=[-2,-1], then

  1. f(x) = 0 if  -1+x < 0 or -2+x > 2
  2. otherwise f(x) = L   where L is the measure of the intersection of A and b(x)


I coded a few variants using piecewise or Heaviside functions. 
In some sense I have already answered my own question ... but no one is neither elegant nor concise.

I wonder if there exist a Maple function that returns the measure of the intersection of two real intervals (when they overlap) and 0 otherwise ?

 

Maybe this is trivial but could somebody tell me how to get bounds of interval returned by shake? For instance,

shake(sqrt(2)) gives INTERVAL(1.41421356167 .. 1.41421356308), and I would like to store the upper and lower bounds as rational numbers in two variables. 

Hi all

Assume that we have folowings:

Assume that we devide [0,1] to N subintervals and in each subinterval we have:

Also we want to approximate arbitrary function x(t) with following manner:

 

How can we produce these basic polynomials?

Thanks in advance

 

Mahmood   Dadkhah

Ph.D Candidate

Applied Mathematics Department

hello

how to solve lp  on maple when consrtaints are in interval 

eg

0<x<1

 i try to find this on maple,but i could not found my desired ans.

i got an assignment in which 15 constraints are given and all are in interval.

anyone know the ans then plz help me

Hello,

I use Maple 18. How can I produce a table of 50 values of the fanction f(x) in the interval [a,b]? size step is (b-a)/n

 

Hi all.

Assume that we have partitioned [0,a], into N equidistant subintervals and in each subinterval we have M sets of poly nomials of the following form:

where Tm(t)=tm( namely Taylor Series) and tf is a(final point)
for Example with N=4, M=3 we have:

now we want to approximate a function, asy f(t), in this interval with following form:

Assume that we have

where '"." means common derivetive. How can we do the later integran in right way?

Note that t is unknown

Mahmood   Dadkhah

Ph.D Candidate

Applied Mathematics Department

Dear all;

I need you help for solving this problem, and thanks in advantage for your help.

I have a polynom like  P =x^6-4*x^3+x-2;  and i would like to find an approximate value of the roots in some interval [a,b] =[-2,2] using sturm sequence.

The method is based on:

1) first construct the sturm sequence:

For given polynom P =x^6-4*x^3+x-2;

Let S0=P;

S1=diff(p,x);

let   s:=quo(S0,S1,x);
       S2:=-rem(S0,S1,x);

.... S[k+1-rem(S[k-1],S[k]);

 

S[k] is the sturm sequence.

2) let f(a)= number of change of sign in the sturm sequence and f(b) the same . so f(b)-f(a) give the number of roots in the interval [a,b].

3) If f(b)-f(a) =0 so there are no roots

and if f(a)-f(b)=1 one can find the root

4) if f(a) -f(b) >2  :

given toterance tol=0.001; for example

if the abs(a-b)<2*epsilon we display a message that there are k roots at (b+a)/2

with our error tolerance

5) otherwise if c=(b+a)/2 is not a root of P_k(x)  for any k, ( where p_k is an element of the sturm sequence ) 

we divide the interval into equal halves [a,c] and [x,b] and we run step 2 on each interval

else if c is a root of one of these p_k(x) add any time account to c so that c lies close the middle of [a,b] and not a root

6) Give all the roots ( approximate the rrots with small error epsilon).

 

I kindly  appreciate your help

 

 

 

If a dosage Q units of a certain drug is administrated to an individual, then the amount remaining in the bloodstream at the end of t minutes is given by Q*exp^-ct, where c>0. Suppose this same dosage is given at successive T-minute intervals.

 

a) Show that the amount A(k) of the drug is given by A(k) = ∑n=0k-1 Q*exp(^-ncT).

b) Find an upper bound for the amount of the drug in the bloodsteam after any number of doses.

c) Find the smallest time between doses that will ensure that A(k) does not exceed a certain level M for M>Q.

Hej hej,

is there a way to obtain confidence intervals for the parameters in a NonlinearFit? To give you an impression of the problem which I was working on, I created a minimial working example (not sure wheather that actually helps). In this particular case, I have two parameters to fit the coefficients of a binomial series to some data I obtained. Beyond the values of the parameters (in a least square fit), I'm also interested in some kind of confidence interval, to get a feeling about how realiable my values are. Is there a direct (or even indirect) way to obtain such a thing. Either directly as a Maple function (confidenceintervals is not supported for NonlinearFit, if I'm not mistaken) or as something I can implement myself (within a reasonable time frame, as in hours rather than days).
Thanks in advance!

Cheer,

Sören

restart; with(plots); with(Statistics)

alpha[0] := 1.000000000:

m__max := 4:

model := Fit(pochhammer(z__1, m)*h__exp^m/factorial(m), [seq(m, m = 0 .. m__max)], [seq(alpha[m], m = 0 .. m__max)], m, output = [leastsquaresfunction, residuals], weights = [seq(1/abs(alpha[m]), m = 0 .. m__max)], iterationlimit = 10000)

model := [pochhammer(1.42349754368085, m)*16.2763580438677^m/factorial(m), Vector[row](5, {(1) = 0., (2) = -0.120508651249829e-1, (3) = 0.113910530162494e-1, (4) = 0.348907003220054e-3, (5) = -0.305508272150429e-2})]

(1)

plots[multiple](logplot, [{seq([m, alpha[m]], m = 0 .. m__max)}, style = point, color = black], [{seq([m, model[1]], m = 0 .. m__max)}])

 

``

Download nonlinearfit-problem.mw

Hello I am a Maple 15 user and I am using the command fsolve to solve for the intersection of two curves over a specified interval in x, namely from 0 to the lim defined in the Maple document. The specified interval contains asymptotes and when I specify the full interval only one of the three solutions is returned even if I can see that there are three distinct solutions by looking at the plot of RHS and LHS. Should I use another technique to find the solution or is my implementation of fsolve command wrong?

Thanks in advance


restart

with(ListTools):

n1 := 1:

n2 := 1.50:

n3 := 1.40:

lambda := 1.3:

k0 := 2*Pi/lambda:

d := 3:

x0 := k0*d:

arg1 := sqrt(x0^2*(n2^2-n1^2)):

arg2 := sqrt(x0^2*(n2^2-n3^2)):

lim := FindMinimalElement([arg1, arg2]):

sqr1 := sqrt(x0^2*(n2^2-n1^2)-x^2):

sqr2 := sqrt(x0^2*(n2^2-n3^2)-x^2):

LHS := tan(x):

RHS := (sqr1+sqr2)/(x*(1-sqr1*sqr2/x^2)):

plot([LHS, RHS], x = 0 .. lim, y = -6 .. 6)

 

fsolve(RHS = LHS, x = (1/2)*Pi .. 3*Pi*(1/2))

2.634254816

(1)

fsolve(RHS = LHS, x = 3*Pi*(1/2) .. 9*Pi*(1/4))

5.222527128

(2)

fsolve(RHS = LHS, x = 9*Pi*(1/4) .. lim)

7.598486053

(3)

``


Download HW4Q2.mw

Hello,

 

I have a function, lets say g(x,y,...), that depends on many other functions. But I don´t want the results that are inside certain intervals, and I need to receive the results of those functions as something like NULL when asking for a result that is inside any of those intervals. That way, g(x,y,...) would also have to result in something like NULL if any of the lesser functions are NULL fora any given values.

 

I tryied using the piecewise command, and for the intervals that I wanted, it worked, but for those I wanted to be NULL, they were understood as 0, and so G(x,y,..) continued to exist but with a very different value.

 

To clarify what I need, I will try an exemple:

 

Imagine I have the function f(x)=x

 

I want to disconsider the results for x<2 and x>6, in a way that if I try the command 'f(1)', I will receive something like NULL and know that it is outside the range.

 

In the same way, I need the plot of this function f(X) to show the function only from 2 to 6, but not existing for the delimited intervals.

 

Ad if I continue and make g(x)=f(x)+10 , I don´t want g(x) to exist if f(x) doesn´t exist, and same for the g(x) plot, which shouldn´t be shown in the intervals where f(x) don´t exist.

 

 

Thank you very much for your atention!

 

 

I want to generate random numbers following the normal distribution within a fixed interval.

 

For example, I want generate 10 random numbers in the interval [2903.5-5, 2903.5+5]. These random numbers should follow the normal distribution with mean 2903.5 and  standard deviation \sigma=3.

 

How can I do this?

 

Thanks.

1 2 Page 1 of 2