Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8456155
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T12:28:28+00:00 2026-06-10T12:28:28+00:00

integg <- function(t,a,b){ integrate(Vectorize(function(x){55}),lower=t-(a+b),upper=t-a) } I’m having what I think may be a simple

  • 0
   integg <- function(t,a,b){  

   integrate(Vectorize(function(x){55}),lower=t-(a+b),upper=t-a)   
   }

I’m having what I think may be a simple problem.

I am integrating a constant over bounds that may vary.

If you were to think of this constant as a function, it only exists for values on the x-axis that are >= 0. I cant just set the lower bound == 0. Because there may be times when the lower bound is some value > 0.

It would probably be best to just write the constant as a function somehow.

A second problem I’m having is that I would like to make that value 55 as an object (x) which I can include as an argument to the function integg()

I am using Vectorize because that’s the only way I know how to integrate constants.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T12:28:30+00:00Added an answer on June 10, 2026 at 12:28 pm

    Why not do exactly as you describe. Add x as an argument to your integg function

    integg <- function(t, a, b, intval) {
      u <- t - a
      l <- ifelse(u - b < 0, 0, u - b)
      integrate(Vectorize(function(foo, x) {55}), lower=l, upper=u, x=intval)
    }
    

    You could just write your own area calc if the function you’re integrating is always constant:

    integg2 <- function(t, a, b, intval) {
      u <- t - a 
      l <- ifelse(u - b < 0, 0, u - b)
      intval * (u - l)
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

it seems to me that keeping the branch object in Perforce may not be
I am trying to integrate a change list from one branch of code to
Say I have the unknown number of questions. For example: Is the sky blue
I currently have the below tables representing a bus network mapped in hibernate, accessed
Consider the following piece of code: def integ(fncts, propagate, stpSz): conditions = propagate.copy() iterator
Versions Excel 2007 (12.0.6425.1000) SP2, Visual Studio 2008 with VB.NET, Windows Vista The windup
A bunch of dotnet framework components use a DataSource component. I have an object
I'm trying to install Postgresql (8.2.15) additional supplied modules intarray and intagg for my
I've recently added a couple of fields to some tables in my database (SQL
The following code won't compile on Mac OS X 10.6; it gives an error

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.