## Evaluating limit without L’Hospital’s – Mathematics Stack Exchange

I would like to evaluate the limit $$lim_{xto0}frac{2xsin(x)}{1-cos(x)}$$ It can be done with L’Hospital, but I would like to know if it is possible to do so without L’Hospital. I tried multiplying through by the conjugate of the denominator, which leads me to $$lim_{xto0}frac{2x(1+cos(x))}{sin(x)}$$ which is not very helpful, because it is still $$0/0$$. Any help would be much appreciated, thanks!

## time complexity – Algorithm for evaluating polynomials

I’m reading The Algorithm Design Manual and I stumbled upon this problem.
I can’t really get my head around this, I don’t even know how the number of multiplications could differ, what I mean is that there is no polynomial that would make this algorithm perform poorly.
I also have no idea how this could get improved, every operation seems necessary to me.

Any help would be much appreciated.

## evaluation – Evaluating function taken as input

Consider this toy example:

``````myDerivative(f_, x_) := D(f, {x, 2})
``````

This defines a function `myDerivative` that takes in a function `f` and a variable `x` and takes the second derivative of `f`, i.e. it returns $$f”$$. This works as expected:

``````myDerivative(x^2, x)
``````
``````2
``````

However, consider a slightly different version:

``````myDerivative2(f_, x_) := D(f(x^2), {x, 2})
``````

The difference here is that before differentiation, the function `f` is composed with `x^2`. This particular composition here is irrelevant, it’s just to highlight that I have to somehow evaluate the function `f` with my function, I can’t just leave as `f` like before. This no longer works:

``````myDerivative2(x^2, x)
``````
``````2(x^2) + 2 x Derivative(1)((2 x))(x^2) + 2 Derivative(1)((x^2))(x^2) + 2 x (Derivative(1)((2 x))(x^2) + 2 x ((x^2)^(Prime)(Prime))(x^2))
``````

It does, however, work if I supply a pure function, or just a head:

``````myDerivative2(#^2 &, x)
myDerivative2(Sin, x)
``````
``````12 x^2
2 Cos(x^2) - 4 x^2 Sin(x^2)
``````

How can I define `myDerivative2` such that `myDerivative(x^2, x)` works as expected, without resorting to inputting a pure function? Google surprisingly didn’t provide an answer to this (maybe I don’t know the right terms), all that I could find used pure functions like `#^2&` or `Sin` (just the head).

## integration – Evaluating \$int^1_0 x^alpha (1-x)^beta operatorname{Li}_2 (x), mathrm dx\$

Posses a following integral

$$int^1_0 x^alpha (1-x)^betaoperatorname{Li}_2 (x), mathrm dx$$

for general $$alpha,beta$$ a closed from solution? I was trying to solve by the method of series on the dilogarithm fuction. I was trying to solve an integral which is a linear combination of those integrals but I was unable to summ up the series containing product of harmonic numbers. I wonder whether a closed formula is indeed avalible.

## javascript – Evaluating two functions according to their performance

``````        //Function-A
function duplicatesNumber(text) {
var counts = {};
let textLowered = text.toLowerCase();
textLowered.split("").forEach(function (x) {
counts(x) = (counts(x) || 0) + 1;
});
return Object.entries(counts).filter(arr => arr(1) > 1).length
}

//Function-B
function duplicateCount(text) {
return text.toLowerCase().split('').filter(function (val, i, arr) {
return arr.indexOf(val) !== i && arr.lastIndexOf(val) === i;
}).length;
}

//Function-B
let start = performance.now();
console.log(duplicateCount("aaBBcDDcefgheeaas"))
let end = performance.now();
console.log("Function-B: "+ (end-start));

//Function-A
let start1 = performance.now();
console.log(duplicatesNumber("aaBBcDDcefgheeaas"))
let end1 = performance.now();
console.log("Function-A: "+ (end1-start1))
``````

## evaluation – Help evaluating integral with parameter

I’m evaluating this integral.
$$int_{-infty}^{-1}e^{xt}operatorname{Log}left(frac{x+1}{x}right), quad t>0$$

Please show me the input and the output. I tried this but it said the integral doesn’t converge. But it’s obviously converge when i look the graph.

## react native – undefined is not an object (evaluating this.props.navigation.dispatch)

I’m trying to use `this.props.navigation.dispatch(DrawerActions.toggleDrawer())` in the following code but it takes `this.props.navigation.dispatch` as undefined.
My code:

``````//...imports
//set the function drawer inside a bottom tab navigator (works fine)

drawer = () => {
return(
<Drawer.Navigator>
<Drawer.Screen name="first" component={firstScreen} />
<Drawer.Screen name="second" children={this.TopTabStack} />
</Drawer.Navigator>
)
}

TopTab = () => {
return(
<MaterialTopTabs.Navigator
initialRouteName="third"
>
<MaterialTopTabs.Screen name="third" component={thirdScreen} />
<MaterialTopTabs.Screen name="fourth" component={fourthScreen} />
</MaterialTopTabs.Navigator>
)
}

TopTabStack = () => {
return(
<Stack.Navigator>
<Stack.Screen name="second" children={this.TopTab} options={{
}} />
</Stack.Navigator>
)
}

TopTabRightStack = () => {
return(
<View>
</TouchableWithoutFeedback>
</View>
)
}
``````

## javascript – Unhandled promise rejection: TypeError: undefined is not an object (evaluating ‘_context.t0.data.error’) no expo

meu expo esta dando este erro na minha pagina de login, podem me ajudar?
aqui meu codigo

`````` export default class Signin extends Component {

state ={
errorMessage: null
}
``````

aqui eu uso o apisauce pra dar um post na minha api com as credenciais

``````   signin = async() => {
try{
const response = await api.post('/auth/authenticate')({
email:'teste93@teste.com',
})

const {user, token} = response.data
await AsyncStorage.multiSet((
('@backend : token', token)
('@backend : user',JSON.stringify(user) )
))
``````

o expo diz que o erro esta aqui

``````       }catch(response){
this.setState({errorMessage: response.data.error})
}

}

render() {
return (
<View style={styles.Container}>
{ this.state.errorMessage && <Text>{ this.state.errorMessage }</Text> }
<Button onPress={this.signin} title="Entrar"/>
</View>
);
}
}
``````

## evaluation strategies – Need help with my dissertation topic about Evaluating Raku language

I’m a student currently working on my dissertation about Raku. The topic is evaluating Raku(perl6) for student with relevant experience. I finally decided to choose to evaluate whether Raku is a good language when dealing with high concurrency for the angle of the topic. However, my problem is I can’t find any papers about Raku’s concurrency except official website. Also, I have no idea about how to evaluate Raku’s concurrency (e.g. what program should I use, which language should be compared with Raku). Could anyone give me some hints about it? That would be very very helpful to me. Thank you.

Also I’m thinking to change an angle for my dissertation. Does anyone have any idea about which characteristic of Raku I can choose to evaluate as my dissertation topic(gradual typing have been chosen by somone else)?

## Laplace Transform of ce^-st: Evaluating the limit of a product of functions, when one function has a complex number?

When evaluating the Laplace Transform of $$f(t)=ce^-st$$, assuming s is some complex number $$s=sigma+iomega$$

$$F(s)=frac cs(1-lim_{Tto infty}e^-sigma T(cosomega T-isinomega T))$$

I can see that $$e^-sigma T$$ will approach zero as long as $$sigma>0$$ but $$cosomega T-isinomega T$$ doesn’t approach anything.

I know that the limit of f(x)*g(x) is the limit of f(x) multiplied by the limit of g(x), provided that both functions have a limit.

But in this case, only one of them has a limit (equal to zero), while the other is undefined.

My textbook says that $$lim_{Tto infty}e^-sigma T(cosomega T-isinomega T))=0$$ provided that $$sigma >0$$

I don’t have experience evaluating limits like this, what am I missing?