> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fincept.in/llms.txt
> Use this file to discover all available pages before exploring further.

# Cobb-Douglas Consumer Demand

> Compute optimal consumption bundle, utility level, expenditure, and indirect utility for a consumer with Cobb-Douglas preferences U(x1, x2) = x1^alpha * x2^(1-alpha). Used in microeconomic analysis to determine consumer choice under budget constraints, analyze income and substitution effects, and derive demand functions. [Tier: STANDARD, Credits: 2]



## OpenAPI

````yaml api-specs/economics.json post /quantlib/economics/equilibrium/cobb-douglas
openapi: 3.1.0
info:
  title: FinceptQuantLib API - Economics
  description: >-
    Economics module endpoints for FinceptQuantLib API - general equilibrium,
    game theory, auctions, and utility functions
  version: 3.0.0
  contact:
    name: Fincept API Support
    url: https://fincept.in
servers:
  - url: https://api.fincept.in
    description: Fincept API Production Server
security:
  - APIKeyHeader: []
tags:
  - name: quantlib-economics
    description: >-
      Economics module - general equilibrium, game theory, auctions, and utility
      theory
    x-displayName: Economics
paths:
  /quantlib/economics/equilibrium/cobb-douglas:
    post:
      tags:
        - quantlib-economics
      summary: Cobb-Douglas Consumer Demand
      description: >-
        Compute optimal consumption bundle, utility level, expenditure, and
        indirect utility for a consumer with Cobb-Douglas preferences U(x1, x2)
        = x1^alpha * x2^(1-alpha). Used in microeconomic analysis to determine
        consumer choice under budget constraints, analyze income and
        substitution effects, and derive demand functions. [Tier: STANDARD,
        Credits: 2]
      operationId: cobb_douglas_quantlib_economics_equilibrium_cobb_douglas_post
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - alpha
                - income
                - prices
              properties:
                alpha:
                  type: number
                  description: >-
                    Preference parameter for good 1 (must be between 0 and 1).
                    Represents the share of income spent on good 1.
                  minimum: 0
                  maximum: 1
                  example: 0.6
                income:
                  type: number
                  description: Consumer's total income or budget
                  minimum: 0
                  example: 1000
                prices:
                  type: array
                  description: Prices of the two goods [p1, p2]
                  items:
                    type: number
                    minimum: 0
                  minItems: 2
                  maxItems: 2
                  example:
                    - 10
                    - 5
            example:
              alpha: 0.6
              income: 1000
              prices:
                - 10
                - 5
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  data:
                    type: object
                    properties:
                      demand:
                        type: array
                        description: Optimal consumption bundle [x1*, x2*]
                        items:
                          type: number
                        example:
                          - 60
                          - 80
                      utility:
                        type: number
                        description: Utility level at optimal consumption
                        example: 68.96
                      expenditure:
                        type: number
                        description: >-
                          Minimum expenditure to achieve the utility level at
                          given prices
                        example: 1000
                      indirect_utility:
                        type: number
                        description: >-
                          Indirect utility V(p, m) as function of prices and
                          income
                        example: 68.96
              example:
                success: true
                data:
                  demand:
                    - 60
                    - 80
                  utility: 68.96
                  expenditure: 1000
                  indirect_utility: 68.96
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '402':
          $ref: '#/components/responses/InsufficientTierError'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: array
                    items:
                      type: object
                      properties:
                        loc:
                          type: array
                          items:
                            type: string
                        msg:
                          type: string
                        type:
                          type: string
              example:
                detail:
                  - loc:
                      - body
                      - alpha
                    msg: field required
                    type: value_error.missing
      security:
        - APIKeyHeader: []
components:
  responses:
    UnauthorizedError:
      description: Authentication information is missing or invalid
      content:
        application/json:
          schema:
            type: object
            properties:
              detail:
                type: string
                example: Invalid API key
    InsufficientTierError:
      description: API tier insufficient for this endpoint
      content:
        application/json:
          schema:
            type: object
            properties:
              detail:
                type: string
                example: Endpoint requires Basic tier or higher
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key
      description: >-
        API key for authentication. Get your key at
        https://api.fincept.in/auth/register

````