text:
# Heteroskedasticity and residuals normality

I have a linear regression that's quite good, I guess (it's for a university project so I don't really have to be super accurate).

Point is, if I plot the residuals vs. predicted values, there is (according to my teacher) an hint of heteroskedasticity.

But if I plot the Q-Q-Plot of the residuals, it's clear that they are normally distributed. Moreover, the Shapiro test on the residuals has a $p$-value of $0.8$, so I think there's no doubt the residuals are actually normally distributed.

Question: How can there be heteroskedasticity on predicted values if the residuals are normally distributed?

• One very short addition to @whubers excellent answer: You could use the ncvTest function of the car package for R to conduct a formal test for heteroscedasticity. In whuber's example, the command ncvTest(fit) yields a $p$-value that is almost zero and provides strong evidence against constant error variance (which was expected, of course). Jul 10, 2013 at 20:08

One way to approach this question is to look at it in reverse: how could we begin with normally distributed residuals and arrange them to be heteroscedastic? From this point of view the answer becomes obvious: associate the smaller residuals with the smaller predicted values.

To illustrate, here is an explicit construction.

The data at the left are clearly heteroscedastic relative to the linear fit (shown in red). This is driven home by the residuals vs predicted plot at the right. But--by construction--the unordered set of residuals is close to normally distributed, as their histogram in the middle shows. (The p-value in the Shapiro-Wilk test of normality is 0.60, obtained with the R command shapiro.test(residuals(fit)) issued after running the code below.)

Real data can look like this, too. The moral is that heteroscedasticity characterizes a relationship between residual size and predictions whereas normality tells us nothing about how the residuals relate to anything else.

Here is the R code for this construction.

set.seed(17)
n <- 256
x <- (1:n)/n                       # The set of x values
e <- rnorm(n, sd=1)                # A set of *normally distributed* values
i <- order(runif(n, max=dnorm(e))) # Put the larger ones towards the end on average
y <- 1 + 5 * x + e[rev(i)]         # Generate some y values plus "error" e.
fit <- lm(y ~ x)                   # Regress y against x.
par(mfrow=c(1,3))                  # Set up the plots ...
plot(x,y, main="Data", cex=0.8)
abline(coef(fit), col="Red")
hist(residuals(fit), main="Residuals")
plot(predict(fit), residuals(fit), cex=0.8, main="Residuals vs. Predicted")

• ok so you're saying that if I associate low residuals with high predicted values, heteroscedasticity can arise even if residuals are normally distributed? I think I've got it, though i should really think more about it.. anyhow thank you!
– Ant
Jul 10, 2013 at 21:17
• ...or low residuals with low predicted values (as in the example here), or even in more complex ways. For instance, heteroscedasticity exists when the average magnitude of residuals oscillates with the predicted value. (Most formal tests of heteroscedasticity will not detect this, but the usual diagnostic plots will clearly show it.)
– whuber
Jul 10, 2013 at 22:11

In weighted least squares (WLS) regression, it is the random factors of the estimated residuals that you might want to be able to see are normally distributed,  though it often isn't terribly important. The estimated residuals may be factored, as shown in a simple ( one regressor and through the origin) regression case, at the bottom of page 1, and bottom halves of pages 2 and 7 in https://www.researchgate.net/publication/263036348_Properties_of_Weighted_Least_Squares_Regression_for_Cutoff_Sampling_in_Establishment_Surveys Anyway, this might help show where normality can come into the picture.

• Welcome to the site, @JimKnaub. We'd love to have you around to lend your expertise on the occasional question. Why not register your account? You can find out how in the My Account section of our help center. Since you're new here, you may want to take our tour, which has information for new users. Jan 26, 2016 at 0:09
• We are trying to build a permanent repository of high-quality statistical information in the form of questions & answers. Thus, we're wary of answers that depend on links, due to linkrot. Can you post a full citation & a summary of the information (eg, figures / explanations) from the link so the information will stay useful even if the link goes dead? Jan 26, 2016 at 0:10

format: plain


text:
# zbMATH — the first resource for mathematics

On zeros of Sobolev-type orthogonal polynomials. (English) Zbl 0768.33008
Some properties of the zeros of orthogonal polynomials $$Q_ n$$ corresponding with the inner product $\langle f,g\rangle=\int_ I f(x)g(x)d\mu(x)+\lambda f'(c)g'(c)$ are analyzed. In particular various interlacing properties with the zeros of the orthogonal polynomials associated with the measure $$\mu$$ and corresponding kernel polynomials are given and for $$c$$ to the right of the interval $$I$$ it is shown that the largest zero of $$Q_ n$$ is to the right of $$c$$ for $$n$$ large enough. Furthermore it is shown that the zeros of $$Q_ n$$ are an increasing function of $$\lambda$$.

##### MSC:
 33C45 Orthogonal polynomials and functions of hypergeometric type (Jacobi, Laguerre, Hermite, Askey scheme, etc.) 42C05 Orthogonal functions and polynomials, general theory of nontrigonometric harmonic analysis
##### Keywords:
Sobolev inner product; orthogonal polynomials; zeros


text:
×
Quantitative Finance

# Options: Level 1-2 Challenges

True, False or It depends?

If you own a call option on a stock, your potential profit is unlimited.

FB's current stock price is $75.89. A broker's market for the put option on the$80 strike expiring in 2 days is $3.75 bid at$4.00. Assuming no execution risk, what trade do you want to execute?

Note: The image does not reflect the prices stated in the problem.

###### Image credit: Thinkorswim

Sally expects that APPL stock will rise from its current price of $129 to$135 on March 20th. Assuming that her prediction comes true, which of the following option strategies would yield the most profit?

Note: No other corresponding trades are done. In particular, she does not hedge her delta exposure.

###### Image credit: Thinkorswim

Which option is worth more (more than or equal to)?

A) An American call on the $10 strike that expires in January B) An European call on the$10 strike that expires in January

True or False?

Because a call has unlimited profit potential, hence there is no upper bound on the price of a call

×


text:
Sine Rule IB Math Studies

Number and algebra, Descriptive statistics, Logic, sets and probability, Statistical applications, Geometry and trigonometry, Mathematical models, Introduction to differential calculus.

Sine Rule IB Math Studies

IB Mathematical Studies – Trigonometry, Sine Rule

How can we find the side $a$ of a triangle ABC given that $\hat{A}=30^{\circ} , c=6 \ and\ \hat{C}=60^{\circ}$ ?

Thanks!
hill

Posts: 0
Joined: Tue Mar 19, 2013 8:49 pm

Re: Sine Rule IB Math Studies

IB Maths SL – Trigonometry, Sine Rule

The Sine rule states

$\frac{a}{sinA}=\frac{b}{sinB}=\frac{c}{sinC}$

So in your case the side $a$ can be calculated as follows:

$\frac{a}{sin30^{\circ}}=\frac{6}{sin60^{\circ}}$

$a=\frac{1}{2} \frac{6}{\frac{\sqrt 3}{2}}=\frac{6}{ \sqrt 3}$

Hope these help!!
elizabeth

Posts: 0
Joined: Mon Jan 28, 2013 8:09 pm

Re: Sine Rule IB Math Studies

Thanks Elisabeth!!
hill

Posts: 0
Joined: Tue Mar 19, 2013 8:49 pm


text:
# 4.3 Logarithmic functions  (Page 2/9)

 Page 2 / 9

We can express the relationship between logarithmic form and its corresponding exponential form as follows:

${\mathrm{log}}_{b}\left(x\right)=y⇔{b}^{y}=x,\text{}b>0,b\ne 1$

Note that the base $\text{\hspace{0.17em}}b\text{\hspace{0.17em}}$ is always positive.

Because logarithm is a function, it is most correctly written as $\text{\hspace{0.17em}}{\mathrm{log}}_{b}\left(x\right),$ using parentheses to denote function evaluation, just as we would with $\text{\hspace{0.17em}}f\left(x\right).\text{\hspace{0.17em}}$ However, when the input is a single variable or number, it is common to see the parentheses dropped and the expression written without parentheses, as $\text{\hspace{0.17em}}{\mathrm{log}}_{b}x.\text{\hspace{0.17em}}$ Note that many calculators require parentheses around the $\text{\hspace{0.17em}}x.$

We can illustrate the notation of logarithms as follows:

Notice that, comparing the logarithm function and the exponential function, the input and the output are switched. This means $\text{\hspace{0.17em}}y={\mathrm{log}}_{b}\left(x\right)\text{\hspace{0.17em}}$ and $\text{\hspace{0.17em}}y={b}^{x}\text{\hspace{0.17em}}$ are inverse functions.

## Definition of the logarithmic function

A logarithm    base $\text{\hspace{0.17em}}b\text{\hspace{0.17em}}$ of a positive number $\text{\hspace{0.17em}}x\text{\hspace{0.17em}}$ satisfies the following definition.

For $\text{\hspace{0.17em}}x>0,b>0,b\ne 1,$

where,

• we read $\text{\hspace{0.17em}}{\mathrm{log}}_{b}\left(x\right)\text{\hspace{0.17em}}$ as, “the logarithm with base $\text{\hspace{0.17em}}b\text{\hspace{0.17em}}$ of $\text{\hspace{0.17em}}x$ ” or the “log base $\text{\hspace{0.17em}}b\text{\hspace{0.17em}}$ of $\text{\hspace{0.17em}}x."$
• the logarithm $\text{\hspace{0.17em}}y\text{\hspace{0.17em}}$ is the exponent to which $\text{\hspace{0.17em}}b\text{\hspace{0.17em}}$ must be raised to get $\text{\hspace{0.17em}}x.$

Also, since the logarithmic and exponential functions switch the $\text{\hspace{0.17em}}x\text{\hspace{0.17em}}$ and $\text{\hspace{0.17em}}y\text{\hspace{0.17em}}$ values, the domain and range of the exponential function are interchanged for the logarithmic function. Therefore,

• the domain of the logarithm function with base
• the range of the logarithm function with base

Can we take the logarithm of a negative number?

No. Because the base of an exponential function is always positive, no power of that base can ever be negative. We can never take the logarithm of a negative number. Also, we cannot take the logarithm of zero. Calculators may output a log of a negative number when in complex mode, but the log of a negative number is not a real number.

Given an equation in logarithmic form $\text{\hspace{0.17em}}{\mathrm{log}}_{b}\left(x\right)=y,$ convert it to exponential form.

1. Examine the equation $\text{\hspace{0.17em}}y={\mathrm{log}}_{b}x\text{\hspace{0.17em}}$ and identify $\text{\hspace{0.17em}}b,y,\text{and}x.$
2. Rewrite $\text{\hspace{0.17em}}{\mathrm{log}}_{b}x=y\text{\hspace{0.17em}}$ as $\text{\hspace{0.17em}}{b}^{y}=x.$

## Converting from logarithmic form to exponential form

Write the following logarithmic equations in exponential form.

1. ${\mathrm{log}}_{6}\left(\sqrt{6}\right)=\frac{1}{2}$
2. ${\mathrm{log}}_{3}\left(9\right)=2$

First, identify the values of $\text{\hspace{0.17em}}b,y,\text{and}x.\text{\hspace{0.17em}}$ Then, write the equation in the form $\text{\hspace{0.17em}}{b}^{y}=x.$

1. ${\mathrm{log}}_{6}\left(\sqrt{6}\right)=\frac{1}{2}$

Here, Therefore, the equation $\text{\hspace{0.17em}}{\mathrm{log}}_{6}\left(\sqrt{6}\right)=\frac{1}{2}\text{\hspace{0.17em}}$ is equivalent to $\text{\hspace{0.17em}}{6}^{\frac{1}{2}}=\sqrt{6}.$

2. ${\mathrm{log}}_{3}\left(9\right)=2$

Here, Therefore, the equation $\text{\hspace{0.17em}}{\mathrm{log}}_{3}\left(9\right)=2\text{\hspace{0.17em}}$ is equivalent to $\text{\hspace{0.17em}}{3}^{2}=9.\text{\hspace{0.17em}}$

Write the following logarithmic equations in exponential form.

1. ${\mathrm{log}}_{10}\left(1,000,000\right)=6$
2. ${\mathrm{log}}_{5}\left(25\right)=2$
1. ${\mathrm{log}}_{10}\left(1,000,000\right)=6\text{\hspace{0.17em}}$ is equivalent to $\text{\hspace{0.17em}}{10}^{6}=1,000,000$
2. ${\mathrm{log}}_{5}\left(25\right)=2\text{\hspace{0.17em}}$ is equivalent to $\text{\hspace{0.17em}}{5}^{2}=25$

## Converting from exponential to logarithmic form

To convert from exponents to logarithms, we follow the same steps in reverse. We identify the base $\text{\hspace{0.17em}}b,$ exponent $\text{\hspace{0.17em}}x,$ and output $\text{\hspace{0.17em}}y.\text{\hspace{0.17em}}$ Then we write $\text{\hspace{0.17em}}x={\mathrm{log}}_{b}\left(y\right).$

## Converting from exponential form to logarithmic form

Write the following exponential equations in logarithmic form.

1. ${2}^{3}=8$
2. ${5}^{2}=25$
3. ${10}^{-4}=\frac{1}{10,000}$

First, identify the values of $\text{\hspace{0.17em}}b,y,\text{and}x.\text{\hspace{0.17em}}$ Then, write the equation in the form $\text{\hspace{0.17em}}x={\mathrm{log}}_{b}\left(y\right).$

1. ${2}^{3}=8$

Here, $\text{\hspace{0.17em}}b=2,$ $\text{\hspace{0.17em}}x=3,$ and $\text{\hspace{0.17em}}y=8.\text{\hspace{0.17em}}$ Therefore, the equation $\text{\hspace{0.17em}}{2}^{3}=8\text{\hspace{0.17em}}$ is equivalent to $\text{\hspace{0.17em}}{\mathrm{log}}_{2}\left(8\right)=3.$

2. ${5}^{2}=25$

Here, $\text{\hspace{0.17em}}b=5,$ $\text{\hspace{0.17em}}x=2,$ and $\text{\hspace{0.17em}}y=25.\text{\hspace{0.17em}}$ Therefore, the equation $\text{\hspace{0.17em}}{5}^{2}=25\text{\hspace{0.17em}}$ is equivalent to $\text{\hspace{0.17em}}{\mathrm{log}}_{5}\left(25\right)=2.$

3. ${10}^{-4}=\frac{1}{10,000}$

Here, $\text{\hspace{0.17em}}b=10,$ $\text{\hspace{0.17em}}x=-4,$ and $\text{\hspace{0.17em}}y=\frac{1}{10,000}.\text{\hspace{0.17em}}$ Therefore, the equation $\text{\hspace{0.17em}}{10}^{-4}=\frac{1}{10,000}\text{\hspace{0.17em}}$ is equivalent to $\text{\hspace{0.17em}}{\text{log}}_{10}\left(\frac{1}{10,000}\right)=-4.$

can I get some pretty basic questions
In what way does set notation relate to function notation
Ama
is precalculus needed to take caculus
It depends on what you already know. Just test yourself with some precalculus questions. If you find them easy, you're good to go.
Spiro
the solution doesn't seem right for this problem
what is the domain of f(x)=x-4/x^2-2x-15 then
x is different from -5&3
Seid
how to prroved cos⁴x-sin⁴x= cos²x-sin²x are equal
Don't think that you can.
Elliott
how do you provided cos⁴x-sin⁴x = cos²x-sin²x are equal
What are the question marks for?
Elliott
Someone should please solve it for me Add 2over ×+3 +y-4 over 5 simplify (×+a)with square root of two -×root 2 all over a multiply 1over ×-y{(×-y)(×+y)} over ×y
For the first question, I got (3y-2)/15 Second one, I got Root 2 Third one, I got 1/(y to the fourth power) I dont if it's right cause I can barely understand the question.
Is under distribute property, inverse function, algebra and addition and multiplication function; so is a combined question
Abena
find the equation of the line if m=3, and b=-2
graph the following linear equation using intercepts method. 2x+y=4
Ashley
how
Wargod
what?
John
ok, one moment
UriEl
how do I post your graph for you?
UriEl
it won't let me send an image?
UriEl
also for the first one... y=mx+b so.... y=3x-2
UriEl
y=mx+b you were already given the 'm' and 'b'. so.. y=3x-2
Tommy
Please were did you get y=mx+b from
Abena
y=mx+b is the formula of a straight line. where m = the slope & b = where the line crosses the y-axis. In this case, being that the "m" and "b", are given, all you have to do is plug them into the formula to complete the equation.
Tommy
thanks Tommy
Nimo
0=3x-2 2=3x x=3/2 then . y=3/2X-2 I think
Given
co ordinates for x x=0,(-2,0) x=1,(1,1) x=2,(2,4)
neil
"7"has an open circle and "10"has a filled in circle who can I have a set builder notation
x=-b+_Гb2-(4ac) ______________ 2a
I've run into this: x = r*cos(angle1 + angle2) Which expands to: x = r(cos(angle1)*cos(angle2) - sin(angle1)*sin(angle2)) The r value confuses me here, because distributing it makes: (r*cos(angle2))(cos(angle1) - (r*sin(angle2))(sin(angle1)) How does this make sense? Why does the r distribute once
so good
abdikarin
this is an identity when 2 adding two angles within a cosine. it's called the cosine sum formula. there is also a different formula when cosine has an angle minus another angle it's called the sum and difference formulas and they are under any list of trig identities
strategies to form the general term
carlmark
consider r(a+b) = ra + rb. The a and b are the trig identity.
Mike
How can you tell what type of parent function a graph is ?
generally by how the graph looks and understanding what the base parent functions look like and perform on a graph
William
if you have a graphed line, you can have an idea by how the directions of the line turns, i.e. negative, positive, zero
William
y=x will obviously be a straight line with a zero slope
William
y=x^2 will have a parabolic line opening to positive infinity on both sides of the y axis vice versa with y=-x^2 you'll have both ends of the parabolic line pointing downward heading to negative infinity on both sides of the y axis
William
y=x will be a straight line, but it will have a slope of one. Remember, if y=1 then x=1, so for every unit you rise you move over positively one unit. To get a straight line with a slope of 0, set y=1 or any integer.
Aaron
yes, correction on my end, I meant slope of 1 instead of slope of 0
William
what is f(x)=
I don't understand
Joe
Typically a function 'f' will take 'x' as input, and produce 'y' as output. As 'f(x)=y'. According to Google, "The range of a function is the complete set of all possible resulting values of the dependent variable (y, usually), after we have substituted the domain."
Thomas
Sorry, I don't know where the "Â"s came from. They shouldn't be there. Just ignore them. :-)
Thomas
Darius
Thanks.
Thomas
Â
Thomas
It is the Â that should not be there. It doesn't seem to show if encloses in quotation marks. "Â" or 'Â' ... Â
Thomas
Now it shows, go figure?
Thomas
what is this?
i do not understand anything
unknown
lol...it gets better
Darius
I've been struggling so much through all of this. my final is in four weeks 😭
Tiffany
this book is an excellent resource! have you guys ever looked at the online tutoring? there's one that is called "That Tutor Guy" and he goes over a lot of the concepts
Darius
thank you I have heard of him. I should check him out.
Tiffany
is there any question in particular?
Joe
I have always struggled with math. I get lost really easy, if you have any advice for that, it would help tremendously.
Tiffany
Sure, are you in high school or college?
Darius
Hi, apologies for the delayed response. I'm in college.
Tiffany
how to solve polynomial using a calculator


text:
# Metric Object¶

Note

Fields marked with an asterisk (*) are optional.

Metric Object Properties
Value Type Description
type string The type of metric being presented. Currently BidSwitch only supports using viewability as the metric type
value float

A decimal number representing the value of the metric being supplied

• viewability probability is in the range 0.0 – 1.0.
vendor* string Source of the value declared by the Supplier

## Metric JSON Example¶

{
"metric":[
{
"type":"viewability",
"value":0.85
}
]
}


text:
# Lagrange Multipliers to find max/min values

1. Oct 25, 2011

### arl146

1. The problem statement, all variables and given/known data
Use Lagange Multipliers to find the max and min values of the function subject to the given constraint(s). f(x,y)=exp(xy) ; constraint: x^3 + y^3 = 16

2. Relevant equations
$\nabla$f = $\nabla$g * $\lambda$
fx = gx * $\lambda$
fy = gy * $\lambda$

3. The attempt at a solution
Set the fx and fy eqns equal to 0. but i cant solve for x, y, and lambda... i guess my algebra isnt that strong

i got fx = $\lambda$ * gx
y*exy = 3x2$\lambda$

and for y:

x*exy = 3y2$\lambda$

and g(x,y) = x3 + y3 = 16

2. Oct 25, 2011

### arl146

no one can offer a little help? =/

3. Oct 25, 2011

### I like Serena

Hi arl146!

You need to solve this set of equations:
(1) y exy = 3x2λ
(2) x exy = 3y2λ
(3) x3 + y3 = 16

Can you find λ from equation (1)?
And also from equation (2)?
Then equate them to each other, effectively eliminating λ?

4. Oct 25, 2011

### HallsofIvy

Staff Emeritus
Since a specific value for $\lambda$ is not necessary for the solution, I find it is often simplest to start by eliminating $\lambda$ by dividing one equation by another. Here, start by dividing $ye^{xy}= 3x^2\lambda$ by $xe^{xy}= 3y^2\lambda$: $y/x= x^2/y^2$ which is the same as $x^3= y^3$. Putting that into $x^3+ y^3= 16$ gives $2x^3= 16$.

5. Oct 26, 2011

### arl146

well i sorta did something like that and got and y=x and with the whole x^3 + y^3 = 16 that means y=x=2. so theres what, is it called a critical pt still, at (2,2) ? so i just plug that into f(x,y)= exp(xy) ??
so you'd have f(2,2)=exp(4) .... is that all i do ? it just seems wrong.idk why haha

6. Oct 26, 2011

### I like Serena

Yes that's all you do. :)

The only thing remaining is finding out whether it's a maximum or a minimum...

7. Oct 26, 2011

### arl146

yea i think thats why i came here because i got confused with that one value. how do you know?

8. Oct 26, 2011

### I like Serena

Doesn't your class material cover that?

Anyway, I know of 3 methods:

1. Using the second derivative test (Hessian matrix).
I can't quickly find a easy example for it (yet).

2. Since you only have one extrema, you can pick any point that satisfies the constraint and calculate f(x,y) there. Compare it with the f(x,y) at the extremum and you know whether it's a maximum or a minimum.

3. Vary x with a small epsilon, and calculate how you need to vary y to match the constraint in first order approximation.
In your case (x + epsilon)^3 + (y - epsilon)^3 = 16.
Check what f(x + epsilon, y - epsilon) does relative to f(x,y).


text:
Scilab Home page | Wiki | Bug tracker | Forge | Mailing list archives | ATOMS | File exchange
Scilab-Branch-6.1-GIT
Change language to: Français - Português - 日本語 - Русский
Scilab Help >> Special Functions > besseli

# besseli

Modified Bessel functions of the first kind (Iα).

# besselj

Bessel functions of the first kind (Jα).

# besselk

Modified Bessel functions of the second kind (Kα).

# bessely

Bessel functions of the second kind (Yα).

# besselh

Bessel functions of the third kind (aka Hankel functions)

### Syntax

y = besseli(alpha, x [,ice])
y = besselj(alpha, x [,ice])
y = besselk(alpha, x [,ice])
y = bessely(alpha, x [,ice])
y = besselh(alpha, x)
y = besselh(alpha, K, x [,ice])

### Arguments

x

real or complex vector.

alpha

real vector

ice

integer flag, with default value 0

K

integer, with possible values 1 or 2, the Hankel function type.

### Description

• besseli(alpha,x) computes modified Bessel functions of the first kind (Iα), for real order alpha and argument x. besseli(alpha,x,1) computes besseli(alpha,x).*exp(-abs(real(x))).

• besselj(alpha,x) computes Bessel functions of the fisrt kind (Jα), for real order alpha and argument x. besselj(alpha,x,1) computes besselj(alpha,x).*exp(-abs(imag(x))).

• besselk(alpha,x) computes modified Bessel functions of the second kind (Kα), for real order alpha and argument x. besselk(alpha,x,1) computes besselk(alpha,x).*exp(x).

• bessely(alpha,x) computes Bessel functions of the second kind (Yalpha), for real order alpha and argument x. bessely(alpha,x,1) computes bessely(alpha,x).*exp(-abs(imag(x))).

• besselh(alpha [,K] ,x) computes Bessel functions of the third kind (Hankel function H1 or H2 depending on K), for real order alpha and argument x. If omitted K is supposed to be equal to 1. besselh(alpha,1,x,1) computes besselh(alpha,1,x).*exp(-%i*x) and besselh(alpha,2,x,1) computes besselh(alpha,2,x).*exp(%i*x)

### Remarks

If alpha and x are arrays of the same size, the result y is also that size. If either input is a scalar, it is expanded to the other input's size. If one input is a row vector and the other is a column vector, the result y is a two-dimensional table of function values.

Yα and Jα Bessel functions are 2 independent solutions of the Bessel 's differential equation :

Kα and Iα modified Bessel functions are 2 independent solutions of the modified Bessel 's differential equation :

Hα1 and Hα2, the Hankel functions of first and second kind, are linear linear combinations of Bessel functions of the first and second kinds:

### Examples

// besselI functions
// -----------------
x = linspace(0.01,10,5000)';
clf
subplot(2,1,1)
plot2d(x,besseli(0:4,x), style=2:6)
legend('I'+string(0:4),2);
xtitle("Some modified Bessel functions of the first kind")
subplot(2,1,2)
plot2d(x,besseli(0:4,x,1), style=2:6)
legend('I'+string(0:4),1);
xtitle("Some modified scaled Bessel functions of the first kind")

// besselJ functions
// -----------------
clf
x = linspace(0,40,5000)';
plot2d(x,besselj(0:4,x), style=2:6, leg="J0@J1@J2@J3@J4")
legend('I'+string(0:4),1);
xtitle("Some Bessel functions of the first kind")

// use the fact that J_(1/2)(x) = sqrt(2/(x pi)) sin(x)
// to compare the algorithm of besselj(0.5,x) with a more direct formula
x = linspace(0.1,40,5000)';
y1 = besselj(0.5, x);
y2 = sqrt(2 ./(%pi*x)).*sin(x);
er = abs((y1-y2)./y2);
ind = find(er > 0 & y2 ~= 0);
clf()
subplot(2,1,1)
plot2d(x,y1,style=2)
xtitle("besselj(0.5,x)")
subplot(2,1,2)
plot2d(x(ind), er(ind), style=2, logflag="nl")
xtitle("relative error between 2 formulae for besselj(0.5,x)")

// besselK functions
// =================
x = linspace(0.01,10,5000)';
clf()
subplot(2,1,1)
plot2d(x,besselk(0:4,x), style=0:4, rect=[0,0,6,10])
legend('K'+string(0:4),1);
xtitle("Some modified Bessel functions of the second kind")
subplot(2,1,2)
plot2d(x,besselk(0:4,x,1), style=0:4, rect=[0,0,6,10])
legend('K'+string(0:4),1);
xtitle("Some modified scaled Bessel functions of the second kind")

// besselY functions
// =================
x = linspace(0.1,40,5000)'; // Y Bessel functions are unbounded  for x -> 0+
clf()
plot2d(x,bessely(0:4,x), style=0:4, rect=[0,-1.5,40,0.6])
legend('Y'+string(0:4),4);
xtitle("Some Bessel functions of the second kind")

// besselH functions
// =================
x=-4:0.025:2; y=-1.5:0.025:1.5;
[X,Y] = ndgrid(x,y);
H = besselh(0,1,X+%i*Y);
clf();f=gcf();
xset("fpf"," ")
f.color_map=jetcolormap(16);
contour2d(x,y,abs(H),0.2:0.2:3.2,strf="034",rect=[-4,-1.5,3,1.5])
legends(string(0.2:0.2:3.2),1:16,"ur")
xtitle("Level curves of |H1(0,z)|")

### Used Functions

The source codes can be found in SCI/modules/special_functions/src/fortran/slatec and SCI/modules/special_functions/src/fortran

Slatec : dbesi.f, zbesi.f, dbesj.f, zbesj.f, dbesk.f, zbesk.f, dbesy.f, zbesy.f, zbesh.f

Drivers to extend definition area (Serge Steer INRIA): dbesig.f, zbesig.f, dbesjg.f, zbesjg.f, dbeskg.f, zbeskg.f, dbesyg.f, zbesyg.f, zbeshg.f