Solving equation with integration using MATLAB

Click For Summary
SUMMARY

This discussion focuses on solving an equation with integration in MATLAB, specifically addressing the challenges posed by the absolute value in the integrand. The key insight is that when the parameter m is an integer, the behavior of the expression can be categorized into two cases based on whether m is odd or even. For odd m, the expression simplifies to (expression)^m, while for even m, it requires consideration of the sign of the expression, leading to two possible forms: (expression)^m for positive values and -(expression)^m for negative values. The recommendation is to split the integration into cases based on these conditions.

PREREQUISITES
  • Understanding of MATLAB programming
  • Familiarity with integration techniques
  • Knowledge of absolute value functions in mathematics
  • Basic concepts of odd and even functions
NEXT STEPS
  • Explore MATLAB's integration functions, such as integral and integral2
  • Learn about conditional statements in MATLAB to handle different cases
  • Research the mathematical properties of odd and even functions
  • Investigate advanced integration techniques for piecewise functions
USEFUL FOR

Mathematicians, engineers, and students who are working on numerical integration problems in MATLAB, particularly those dealing with absolute values and piecewise functions.

kelvin490
Gold Member
Messages
227
Reaction score
3
I would like to solve an equation below using MATLAB:

f3kMQ.jpg


All the parameters except p are known, so I only need to solve for p. However since I need to consider the sign of the integrand and there is an absolute value sign in it I don't know how to solve it. Could anyone please help? Thank you.
 
Physics news on Phys.org
Consider different values of m. Is m an integer? If so, then you will have two cases:
You have sign(expression) * (abs(expression))^m
Odd m: sign(expression) * (abs(expression))^m is the same as (expression)^m

Even m: sign(expression) * (abs(expression))^m will have two choices:
if expression is positive, then the same as (expression)^m
if expression is negative, then the same as -(expression)^m

So see if you can split into cases like this and integrate in portions.
 

Similar threads

  • · Replies 5 ·
Replies
5
Views
4K
  • · Replies 10 ·
Replies
10
Views
3K
  • · Replies 9 ·
Replies
9
Views
4K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 3 ·
Replies
3
Views
5K
  • · Replies 6 ·
Replies
6
Views
4K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 22 ·
Replies
22
Views
4K
  • · Replies 1 ·
Replies
1
Views
3K